AcademyCloudFoundations Module 04 AWS Cloud Security
AcademyCloudFoundations Module 04 AWS Cloud Security
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Module overview
Topics Activities
• AWS shared responsibility model • AWS shared responsibility model activity
• AWS Identity and Access Management (IAM)
• Securing a new AWS account Demo
• Securing accounts • Recorded demonstration of IAM
• Securing data on AWS
• Working to ensure compliance
Lab
• Introduction to AWS IAM
Knowledge check
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 3
Module objectives
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 4
M o d u l e 4 : AWS C l o u d S e c u r i t y
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS shared responsibility model
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 6
AWS responsibility: Security of the cloud
AWS responsibilities:
• Physical security of data centers
AWS services • Controlled, need-based access
• Virtualization infrastructure
• Instance isolation
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 7
Customer responsibility: Security in the cloud
Customer responsibilities:
• Amazon Elastic Compute Cloud (Amazon EC2)
Customer data instance operating system
• Including patching, maintenance
Applications, IAM • Applications
• Passwords, role-based access, etc.
Operating system, network, and firewall configuration
• Security group configuration
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 8
Service characteristics and security
responsibility
Example services managed by the customer Infrastructure as a service (IaaS)
• Customer has more flexibility over configuring
networking and storage settings
• Customer is responsible for managing more aspects of
Amazon Amazon Elastic Amazon the security
EC2 Block Store Virtual Private Cloud
(Amazon EBS) (Amazon VPC) • Customer configures the access controls
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 9
Service characteristics and security
responsibility (continued)
SaaS examples Software as a service (SaaS)
• Software is centrally hosted
• Licensed on a subscription model or pay-as-you-go
basis.
AWS Trusted AWS Shield Amazon Chime • Services are typically accessed via web browser,
Advisor mobile app, or application programming interface
(API)
• Customers do not need to manage the infrastructure
that supports the service
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 10
Activity: AWS shared
responsibility model
11 © 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Activity: Scenario 1 of 2
Consider this deployment. Who is responsible – AWS or the customer?
AWS Cloud 1. Upgrades and patches to the 6. Oracle upgrades or patches If
Virtual Private Cloud operating system on the EC2 the Oracle instance runs as an
(VPC) instance? Amazon RDS instance?
• ANSWER: The customer • ANSWER: AWS
2. Physical security of the data 7. Oracle upgrades or patches If
center? Oracle runs on an EC2
Amazon Simple Amazon Oracle • ANSWER: AWS instance?
Storage Service EC2 instance • ANSWER: The customer
3. Virtualization infrastructure?
(Amazon S3) 8. S3 bucket access
• ANSWER: AWS
configuration?
AWS Global Infrastructure 4. EC2 security group settings? • ANSWER: The customer
• ANSWER: The customer
5. Configuration of applications
that run on the EC2 instance?
• ANSWER: The customer
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 12
Activity: Scenario 2 of 2
Consider this deployment. Who is responsible – AWS or the customer?
Secure Shell
(SSH) keys 1. Ensuring that the AWS 6. Ensuring network isolation
Management Console is not between AWS customers'
AWS Command hacked? data?
AWS Line Interface • ANSWER: AWS • ANSWER: AWS
Management (AWS CLI)
Console 2. Configuring the subnet? 7. Ensuring low-latency network
Internet connection between the web
• ANSWER: The customer
VPC gateway server and the S3 bucket?
3. Configuring the VPC? • ANSWER: AWS
Subnet • ANSWER: The customer
8. Enforcing multi-factor
4. Protecting against network authentication for all user
Web server on outages in AWS Regions? logins?
Amazon EC2 • ANSWER: AWS • ANSWER: The customer
5. Securing the SSH keys
• ANSWER: The customer
S3 bucket with
objects
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 13
• AWS and the customer share security
Section 1 key responsibilities:
• AWS is responsible for security of the cloud
takeaways • Customer is responsible for security in the cloud
• AWS is responsible for protecting the
infrastructure—including hardware, software,
networking, and facilities—that run AWS Cloud
services
• For services that are categorized as infrastructure
as a service (IaaS), the customer is responsible for
performing necessary security configuration and
management tasks
• For example, guest OS updates and security patches,
firewall, security group configurations
14 © 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved.
M od u le 4 : AWS Clou d S ec u rity
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Identity and Access Management (IAM)
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 16
IAM: Essential components
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 17
Authenticate as an IAM user to gain access
When you define an IAM user, you select what types of access the user is permitted to use.
Programmatic access
• Authenticate using:
• Access key ID
AWS CLI AWS Tools
• Secret access key and SDKs
• Provides AWS CLI and AWS SDK access
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 18
IAM MFA
• MFA provides increased security.
MFA token
EC2 instances
Full
access
Read-
only S3 bucket
IAM user,
IAM group,
or IAM role
IAM policies
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 20
IAM: Authorization
Note: The scope of IAM service configurations is global. Settings apply across all AWS Regions.
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 21
IAM policies
• Resource-based policies
• Attached to a resource (such as an S3 bucket)
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 22
IAM policy example
{
"Version": "2012-10-17",
Explicit allow gives users access to a specific
"Statement":[{
DynamoDB table and…
"Effect":"Allow",
"Action":["DynamoDB:*","s3:*"],
"Resource":[
"arn:aws:dynamodb:region:account-number-without-hyphens:table/table-name",
"arn:aws:s3:::bucket-name", …Amazon S3 buckets.
"arn:aws:s3:::bucket-name/*"]
}, Explicit deny ensures that the users cannot use any other AWS actions
{ or resources other than that table and those buckets.
"Effect":"Deny",
"Action":["dynamodb:*","s3:*"],
"NotResource":["arn:aws:dynamodb:region:account-number-without-hyphens:table/table-name”,
"arn:aws:s3:::bucket-name",
"arn:aws:s3:::bucket-name/*"]
} An explicit deny statement takes precedence
] over an allow statement.
}
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 23
Resource-based policies
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 24
IAM permissions
Implicit deny
Yes Yes
Deny Allow
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 25
IAM groups
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 26
IAM roles
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 27
Example use of an IAM role
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 28
• IAM policies are constructed with JavaScript
Section 2 key Object Notation (JSON) and define
permissions.
takeaways • IAM policies can be attached to any IAM entity.
• Entities are IAM users, IAM groups, and IAM roles.
• An IAM user provides a way for a person,
application, or service to authenticate to AWS.
• An IAM group is a simple way to attach the
same policies to multiple users.
• An IAM role can have permissions policies
attached to it, and can be used to delegate
temporary access to users or applications.
29 © 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Recorded demo:
IAM
30 © 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved.
M od u le 4 : AWS Clou d S ec u rity
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS account root user access versus IAM
access
Account IAM • Best practice: Do not use the AWS
root user account root user except when
necessary.
• Access to the account root user requires
logging in with the email address (and
password) that you used to create the
account.
• Example actions that can only be done
with the account root user:
• Update the account root user password
• Change the AWS Support plan
• Restore an IAM user's permissions
• Change account settings (for example,
contact information, allowed Regions)
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 32
Securing a new AWS account: Account root user
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 35
Securing a new AWS account: Billing reports
Step 4: Enable a billing report, such as the AWS Cost and Usage Report.
• Billing reports provide information about your use of AWS resources and estimated
costs for that use.
• The AWS Cost and Usage Report tracks your AWS usage and provides estimated charges
associated with your AWS account, either by the hour or by the day.
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 36
Best practices to secure an AWS account:
Section 3 key • Secure logins with multi-factor authentication
takeaways (MFA).
• Delete account root user access keys.
• Create individual IAM users and grant
permissions according to the principle of least
privilege.
• Use groups to assign permissions to IAM users.
• Configure a strong password policy.
• Delegate using roles instead of sharing
credentials.
• Monitor account activity by using AWS
CloudTrail.
51 © 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Lab 1:
Introduction to
IAM
52 © 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Lab 1: Tasks
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 53
Lab 1: Final product
Account
AWS account
Users Groups
user-2
Amazon EC2
read-only access
Amazon EC2 – IAM inline IAM managed
View, start, and policy policy S3 read-only
stop access access
user-3 user-1
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 54
Begin Lab 1: Introduction to AWS IAM
~ 40 minutes
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 55
Lab debrief:
Key takeaways
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 56
M od u le 4 : AWS Clou d S ec u rity
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Organizations
• Group AWS accounts into organizational units (OUs) and attach different access
policies to each OU.
• Use service control policies to establish control over the AWS services and API
actions that each AWS account can access
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 58
AWS Organizations: Service control policies
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 59
AWS Key Management Service (AWS KMS)
• Enables you to control the use of encryption across AWS services and in your
applications.
• Uses hardware security modules (HSMs) that are validated by Federal Information
Processing Standards (FIPS) 140-2 to protect keys
AWS Key Management
Service (AWS KMS)
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 60
Amazon Cognito
• Supports sign-in with social identity providers, such as Facebook, Google, and
Amazon; and enterprise identity providers, such as Microsoft Active Directory via
Security Assertion Markup Language (SAML) 2.0.
Amazon Cognito
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 61
AWS Shield
• AWS Shield Standard enabled for at no additional cost. AWS Shield Advanced is an
optional paid service.
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 62
M od u le 4 : AWS Clou d S ec u rity
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Encryption of data at rest
TLS encrypted
data traffic TLS or SSL
encrypted Amazon S3
Amazon EC2 Amazon EFS AWS Storage Gateway
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 65
Securing Amazon S3 buckets and objects
• Newly created S3 buckets and objects are private and protected by default.
• When use cases require sharing data objects on Amazon S3 –
• It is essential to manage and control the data access.
• Follow the permissions that follow the principle of least privilege and consider using
Amazon S3 encryption.
• Tools and options for controlling access to S3 data include –
• Amazon S3 Block Public Access feature: Simple to use.
• IAM policies: A good option when the user can authenticate using IAM.
• Bucket policies
• Access control lists (ACLs): A legacy access control mechanism.
• AWS Trusted Advisor bucket permission check: A free feature.
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 66
M od u le 4 : AWS Clou d S ec u rity
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS compliance programs
• Customers are subject to many different security and compliance regulations and requirements.
• AWS engages with certifying bodies and independent auditors to provide customers with detailed
information about the policies, processes, and controls that are established and operated by AWS.
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 68
AWS Config
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 69
AWS Artifact
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 70
Section 6 key • AWS security compliance programs
takeaways provide information about the policies,
processes, and controls that are
established and operated by AWS.
71 © 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved.
M od u le 4 : AWS Clou d S ec u rity
Module wrap-up
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Module summary
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 76
Complete the knowledge check
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 77
Sample exam question
© 2019 Amazon Web Services, Inc. or its Affiliates. All rights reserved. 78
Additional resources
• Security Bulletins
© 2019 Amazon Web Services, Inc. or its affiliates. All rights reserved. This work may not be reproduced or redistributed, in whole or in part, without prior written permission from Amazon
Web Services, Inc. Commercial copying, lending, or selling is prohibited. Corrections or feedback on the course, please email us at: [email protected]. For all other
questions, contact us at: https://aws.amazon.com/contact-us/aws-training/. All trademarks are the property of their owners.