AcademyCloudFoundations Module 04
AcademyCloudFoundations Module 04
© 2022, 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
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 2
Module objectives
After completing this module, you should be able to:
• Recognize the shared responsibility model
• Identify the responsibility of the customer and AWS
• Recognize IAM users, groups, and roles
• Describe different types of security credentials in IAM
• Identify the steps to securing a new AWS account
• Explore IAM users and groups
• Recognize how to secure AWS data
• Recognize AWS compliance programs
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 3
Section 1: AWS shared responsibility
model
Module 4: AWS Cloud Security
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS shared responsibility model
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 5
AWS responsibility: Security of the cloud
AWS responsibilities:
• Physical security of data centers
AWS services • Controlled, need-based access
• Virtualization infrastructure
• Instance isolation
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 6
Customer responsibility: Security in the cloud
Customer responsibilities:
• Amazon Elastic Compute Cloud (Amazon EC2)
instance operating system
Customer data
• Including patching, maintenance
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 7
Service characteristics and security responsibility (1 of 2)
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 8
Service characteristics and security responsibility (2 of 2)
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 9
Activity: AWS
shared
responsibility model
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 10
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?
2. Physical security of the data 7. Oracle upgrades or patches If
center? Oracle runs on an EC2
instance?
3. Virtualization infrastructure?
Amazon Simple Amazon Oracle 8. S3 bucket access
4. EC2 security group settings? configuration?
Storage Service EC2 instance
(Amazon S3) 5. Configuration of applications
that run on the EC2 instance?
AWS Global Infrastructure
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 11
Activity: Scenario 1 of 2 Answers
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
© 2022, 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 2. Configuring the subnet? 7. Ensuring low-latency network
Management (AWS CLI) connection between the web
Console Internet 3. Configuring the VPC? server and the S3 bucket?
VPC gateway 4. Protecting against network 8. Enforcing multi-factor
outages in AWS Regions? authentication for all user
Subnet 5. Securing the SSH keys logins?
Web server on
Amazon EC2
S3 bucket with
objects
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 13
Activity: Scenario 2 of 2 Answers
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 • ANSWER: AWS • ANSWER: AWS
Line Interface
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
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 14
Section 1 key • AWS and the customer share security 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
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 15
Section 2: AWS Identity and Access
Management (IAM)
Module 4: AWS Cloud Security
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Identity and Access Management (IAM)
• Use IAM to manage access to AWS resources –
• A resource is an entity in an AWS account that you can work with
• Example resources; An Amazon EC2 instance or an Amazon S3 bucket
• Which resources can be accessed and what can the user do to the resource
• How resources can be accessed
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 18
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
• Secret access key AWS CLI AWS Tools
and SDKs
• Provides AWS CLI and AWS SDK access
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 19
IAM MFA
• MFA provides increased security.
Username and
password
MFA token
After the user or application is connected to the AWS account, what are they allowed to do?
EC2 instances
Full
access
Read-
only S3 bucket
IAM user,
IAM group,
or IAM role
IAM policies
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 21
IAM: Authorization
• Assign permissions by creating an IAM policy.
Note: The scope of IAM service configurations is global. Settings apply across all AWS Regions.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 22
IAM policies
• An IAM policy is a document that defines permissions
• Enables fine-grained access control
• Two types of policies – identity-based and resource-based
• Identity-based policies – IAM entities
• Attach a policy to any IAM entity
• An IAM user, an IAM group, or an IAM role Attach to
IAM user
one of
• Policies specify:
• Actions that may be performed by the entity
• Actions that may not be performed by the entity IAM policy IAM group
• Resource-based policies
• Attached to a resource (such as an S3 bucket)
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 23
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.
}
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 24
Resource-based policies
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 25
IAM permissions
How IAM determines permissions:
Implicit deny
Yes Yes
Deny Allow
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 26
IAM groups
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 27
IAM roles
• An IAM role is an IAM identity with specific permissions
• Similar to an IAM user
• Attach permissions policies to it
• Different from an IAM user IAM role
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 28
Example use of an IAM role
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 29
Section 2 key • IAM policies are constructed with JavaScript 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.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 30
Recorded demo:
IAM
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 31
Section 3: Securing a new AWS
account
Module 4: AWS Cloud Security
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS account root user access versus IAM access
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 33
Securing a new AWS account: Account root user
Step 1: Stop using the account root user as soon as possible.
• The account root user has unrestricted access to all your resources.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 34
Securing a new AWS account: MFA
Step 2: Enable multi-factor authentication (MFA).
• Require MFA for your account root user and for all IAM users.
• You can also use MFA to control access to AWS service APIs.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 35
Securing a new AWS account: AWS CloudTrail
Step 3: Use AWS CloudTrail.
• CloudTrail tracks user activity on your account.
• Logs all API requests to resources in all supported services your account.
• Basic AWS CloudTrail event history is enabled by default and is free.
• It contains all management event data on latest 90 days of account activity.
• To access CloudTrail –
1. Log in to the AWS Management Console and choose the CloudTrail service.
2. Click Event history to view, filter, and search the last 90 days of events.
• To enable logs beyond 90 days and enable specified event alerting, create a trail.
1. From the CloudTrail Console trails page, click Create trail.
2. Give it a name, apply it to all Regions, and create a new Amazon S3 bucket for log storage.
3. Configure access restrictions on the S3 bucket (for example, only admin users should have access).
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 36
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.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 37
Optional: Securing a new AWS
account – Full walkthrough
Module 4: AWS Cloud Security
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
IAM security status review
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 39
Activate MFA on the account root user
Custom
sign-in
link
MFA
activation
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 40
Activate MFA on account root user
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 41
MFA on account root user is activated
MFA MFA
activated
Setup
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 42
Create an individual IAM user (1 of 5)
IAM user
creation
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 43
Create an individual IAM user (2 of 5)
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 44
Create an individual IAM user (3 of 5)
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 45
Create an individual IAM user (4 of 5)
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 46
Create an individual IAM user (5 of 5)
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 47
IAM user creation successful
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 48
IAM Dashboard security status
Password
policy
creation
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 49
Set an IAM password policy
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 50
Security status checks completed
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 51
Section 3 key Best practices to secure an AWS account:
• Secure logins with multi-factor authentication (MFA).
takeaways
• 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.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 52
Lab 1:
Introduction to IAM
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 53
Lab 1: Tasks
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 54
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
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 55
~ 40 minutes
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 56
Lab debrief:
Key takeaways
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 57
Section 4: Securing accounts
Module 4: AWS Cloud Security
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Organizations
• AWS Organizations enables you to consolidate multiple AWS accounts so that
you centrally manage them.
• 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
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 59
AWS Organizations: Service control policies
• Service control policies (SCPs) offer centralized control over accounts.
• Limit permissions that are available in an account that is part of an organization.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 60
AWS Key Management Service (AWS KMS)
AWS Key Management Service (AWS KMS) features:
• Enables you to create and manage encryption keys
• 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)
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 61
Amazon Cognito
Amazon Cognito features:
• Adds user sign-up, sign-in, and access control to your web and mobile applications.
• 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
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 62
AWS Shield
• AWS Shield features:
• Is a managed distributed denial of service (DDoS) protection service
• AWS Shield Standard enabled for at no additional cost. AWS Shield Advanced is an
optional paid service.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 63
Section 5: Securing data on AWS
Module 4: AWS Cloud Security
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Encryption of data at rest
• Encryption encodes data with a secret key, which makes it unreadable
• Only those who have the secret key can decode the data
• AWS KMS can manage your secret keys
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 65
Encryption of data in transit
• Encryption of data in transit (data moving across a network)
• Transport Layer Security (TLS)—formerly SSL—is an open standard protocol
• AWS Certificate Manager provides a way to manage, deploy, and renew TLS or SSL certificates
• Secure HTTP (HTTPS) creates a secure tunnel
• Uses TLS or SSL for the bidirectional exchange of data
• AWS services support data in transit encryption.
• Two examples:
TLS encrypted
data traffic TLS or SSL
encrypted Amazon S3
Amazon EC2 Amazon EFS AWS Storage Gateway
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 66
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.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 67
Section 6: Working to ensure compliance
Module 4: AWS Cloud Security
© 2022, 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.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 69
AWS Config
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 70
AWS Artifact
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 71
Section 6 key
• AWS security compliance programs provide
takeaways information about the policies, processes, and controls
that are established and operated by AWS.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 72
Section 7: Additional security services
and resources
Module 4: AWS Cloud Security
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Service Catalog
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 74
Selected additional security services
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 75
Module wrap-up
Module 4: AWS Cloud Security
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Module summary
In summary, in this module you learned how to:
• Recognize the shared responsibility model
• Identify the responsibility of the customer and AWS
• Recognize IAM users, groups, and roles
• Describe different types of security credentials in IAM
• Identify the steps to securing a new AWS account
• Explore IAM users and groups
• Recognize how to secure AWS data
• Recognize AWS compliance programs
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 77
Complete the knowledge check
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 78
Sample exam question
Which of the following is AWS's responsibility under the
AWS shared responsibility model?
Choice Response
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 79
Sample exam question answer
Which of the following is AWS's responsibility under the
AWS shared responsibility model?
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 80
Additional resources
• AWS Cloud Security: https://aws.amazon.com/security/
• AWS Security Resources: https://aws.amazon.com/security/security-learning/?cards-top.sort-
by=item.additionalFields.sortDate&cards-top.sort-order=desc&awsf.Types=*all
• AWS Security Blog: https://aws.amazon.com/blogs/security/
• Security Bulletins : https://aws.amazon.com/security/security-bulletins/?card-body.sort-
by=item.additionalFields.bulletinId&card-body.sort-order=desc&awsf.bulletins-
flag=*all&awsf.bulletins-year=*all
• Vulnerability and Penetration testing: https://aws.amazon.com/security/penetration-testing/
• AWS Well-Architected Framework – Security pillar:
https://d1.awsstatic.com/whitepapers/architecture/AWS-Security-Pillar.pdf
• AWS documentation - IAM Best Practices:
https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 81
Thank you
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 82