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)
Customer data instance operating system
• Including patching, maintenance
Applications, IAM • Applications
Operating system, network, and firewall • Passwords, role-based access, etc.
configuration • Security group configuration
Client-side Network
data Server-side traffic • OS or host-based firewalls
encryption encryption protection
• Including intrusion detection or prevention systems
and data (file system or (encryption,
integrity data) integrity, • Network configurations
authentication identity)
Customer-configurable • Account management
• Login and permission settings for each user
© 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. 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 6. Oracle upgrades or
Virtual Private Cloud the operating system on patches If the Oracle
(VPC) the EC2 instance? instance runs as an
Amazon RDS instance?
2. Physical security of the
data center? 7. Oracle upgrades or
patches If Oracle runs on
3. Virtualization an EC2 instance?
Amazon Simple Amazon Oracle infrastructure?
Storage EC2 instance 8. S3 bucket access
4. EC2 security group configuration?
Service settings?
(Amazon S3)
5. Configuration of
AWS Global Infrastructure applications that run on
the EC2 instance?
© 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 6. Oracle upgrades or
Virtual Private Cloud the operating system on patches If the Oracle
the EC2 instance? instance runs as an
(VPC)
• ANSWER: The customer Amazon RDS instance?
2. Physical security of the data • ANSWER: AWS
center? 7. Oracle upgrades or
Amazon Simple • ANSWER: AWS patches If Oracle runs on
Amazon Oracle
Storage 3. Virtualization an EC2 instance?
EC2 instance
Service infrastructure? • ANSWER: The
(Amazon S3) • ANSWER: AWS customer
AWS Global Infrastructure 4. EC2 security group 8. S3 bucket access
settings? configuration?
• 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
1. Ensuring that the AWS 6. Ensuring network
(SSH) keys
Management Console is isolation between AWS
AWS Command not hacked? customers' data?
AWS Line Interface 2. Configuring the subnet? 7. Ensuring low-latency
Management (AWS CLI) network connection
Console Internet 3. Configuring the VPC? between the web server
gateway 4. Protecting against and the S3 bucket?
VPC
network outages in AWS 8. Enforcing multi-factor
Subnet Regions? authentication for all user
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
1. Ensuring that the AWS 6. Ensuring network
(SSH) keys
Management Console is isolation between AWS
AWS Command not hacked? customers' data?
AWS Line Interface • ANSWER: AWS • ANSWER: AWS
Management (AWS CLI)
Console 2. Configuring the subnet? 7. Ensuring low-latency
Internet network connection
• ANSWER: The
VPC gateway
customer between the web server
and the S3 bucket?
Subnet 3. Configuring the VPC? • ANSWER: AWS
• ANSWER: The
customer 8. Enforcing multi-factor
Web server on authentication for all user
4. Protecting against logins?
Amazon EC2 network outages in AWS • ANSWER: The
Regions? customer
• ANSWER: AWS
S3 bucket 5. Securing the SSH keys
with objects • ANSWER: The
customer
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 14
• AWS and the customer share security responsibilities:
Section 1 key • 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
Full
instances
acces
s
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 IAM group
policy
• A single policy can be attached to multiple entities
• A single entity can have multiple policies attached to it IAM role
• 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
• Permissions granted by attaching IAM policy Carlos Salazar Li Juan Zhang Wei
or policies to the group
Márcia Oliveira Mary Major John Stiles
• A user can belong to multiple groups
Richard Roe Li Juan
• There is no default group
© 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
• IAM policies are constructed with JavaScript Object
Section 2 key 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
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