100% found this document useful (2 votes)
2K views54 pages

CloudFoundations - 04 - AWS Cloud Security

The module objectives are to teach students about: - The shared responsibility model between AWS and customers for security - Identity and Access Management (IAM) users, groups, roles, and credentials - Securing a new AWS account - AWS compliance programs The document discusses the shared responsibility model where AWS is responsible for security of the cloud including infrastructure and customer is responsible for security in the cloud including operating systems, applications, and data. It provides examples of where responsibilities lie for different AWS services like compute, storage, and databases.

Uploaded by

Jan jan1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
2K views54 pages

CloudFoundations - 04 - AWS Cloud Security

The module objectives are to teach students about: - The shared responsibility model between AWS and customers for security - Identity and Access Management (IAM) users, groups, roles, and credentials - Securing a new AWS account - AWS compliance programs The document discusses the shared responsibility model where AWS is responsible for security of the cloud including infrastructure and customer is responsible for security in the cloud including operating systems, applications, and data. It provides examples of where responsibilities lie for different AWS services like compute, storage, and databases.

Uploaded by

Jan jan1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 54

Module 4: AWS Cloud Security

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

3
M o d u l e 4 : AWS C l o u d S e c u r i t y

Section 1: AWS shared responsibility model


AWS shared responsibility model

5
AWS responsibility: Security of the cloud

AWS responsibilities:
• Physical security of data centers
AWS services • Controlled, need-based access

• Hardware and software infrastructure


Compute Storage Database Networking
• Storage decommissioning, host operating system
(OS) access logging, and auditing
AWS Global Regions
Infrastructure
Availability Zones
Edge locations • Network infrastructure
• Intrusion detection

• Virtualization infrastructure
• Instance isolation

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
• Passwords, role-based access, etc.
Operating system, network, and firewall configuration
• Security group configuration

Client-side data Server-side


Network traffic • OS or host-based firewalls
protection • Including intrusion detection or prevention
encryption and encryption
(encryption, systems
data integrity (file system or
integrity,
authentication data)
identity) • Network configurations
Customer-configurable • Account management
• Login and permission settings for each user

7
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

Example services managed by AWS Platform as a service (PaaS)


• Customer does not need to manage the underlying
infrastructure
• AWS handles the operating system, database patching,
firewall configuration, and disaster recovery
AWS Amazon AWS Elastic
Lambda Relational Database Beanstalk • Customer can focus on managing code or data
Service (Amazon RDS)

8
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

9
Activity: AWS shared
responsibility model

Photo by Pixabay from Pexels.

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?
• 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

11
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
12
• AWS and the customer share security
Section 1 key responsibilities:

takeaways • AWS is responsible for security of the cloud


• 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

13
M od u le 4 : AWS Clou d S ec u rity

Section 2: AWS Identity and Access Management (IAM)


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

• Example – Control who can terminate Amazon EC2 instances

AWS Identity and Access


• Define fine-grained access rights – Management
• Who can access the resource (IAM)
• Which resources can be accessed and what can the user do to the resource
• How resources can be accessed

• IAM is a no-cost AWS account feature

15
IAM: Essential components

A person or application that can authenticate with an AWS


account.
IAM user

A collection of IAM users that are granted identical


authorization.
IAM group

The document that defines which resources can be


accessed and the level of access to each resource.
IAM policy

Useful mechanism to grant a set of permissions for


IAM role making AWS service requests.

16
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

AWS Management Console access


• Authenticate using:
• 12-digit Account ID or alias
• IAM user name AWS Management
Console
• IAM password
• If enabled, multi-factor authentication (MFA) prompts for an authentication code.

17
IAM MFA
• MFA provides increased security.

• In addition to user name and password, MFA requires a unique


authentication code to access AWS services.

User name and


password

MFA

MFA token

AWS Management Console


18
Authorization: What actions are permitted
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

19
IAM: Authorization

• Assign permissions by creating an IAM policy.

• Permissions determine which resources and operations are allowed:


• All permissions are implicitly denied by default.
• If something is explicitly denied, it is never allowed.

Best practice: Follow the principle of least privilege. IAM


permissions

Note: The scope of IAM service configurations is global. Settings apply across all AWS Regions.

20
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 IAM entities
• Identity-based policies –
• Attach a policy to any IAM entity Attach to
IAM user
• An IAM user, an IAM group, or an IAM role one of
• Policies specify:
• Actions that may be performed by the entity
IAM policy IAM group
• Actions that may not be performed by the entity
• 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)
21
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.
}
22
Resource-based policies

• Identity-based policies are attached to a


user, group, or role
• Resource-based policies are attached to AWS Account
a resource (not to a user, group or role) IAM user S3 bucket
• Characteristics of resource-based MaryMajor photos
policies – attached Defined inline
• Specifies who has access to the resource on the bucket
and what actions they can perform on it
• The policies are inline only, not managed
Identity-based Resource-based
• Resource-based policies are supported policy policy
only by some AWS services Policy grants list, Policy grants user
read objects to the MaryMajor list, read
photos bucket objects

23
IAM permissions

How IAM determines permissions:

Is the permission Is the permission


explicitly denied ? No explicitly allowed ? No Deny

Implicit deny

Yes Yes

Deny Allow

24
IAM groups

• An IAM group is a collection of IAM users AWS account


• A group is used to grant the same
permissions to multiple users IAM group: IAM group: IAM group:
• Permissions granted by attaching IAM policy or Admins Developers Testers
policies to the group
Carlos Salazar Li Juan Zhang Wei
• A user can belong to multiple groups
Márcia Oliveira Mary Major John Stiles
• There is no default group
Richard Roe Li Juan
• Groups cannot be nested

25
IAM roles

• An IAM role is an IAM identity with specific permissions


• Similar to an IAM user
• Attach permissions policies to it
IAM role
• Different from an IAM user
• Not uniquely associated with one person
• Intended to be assumable by a person, application, or service
• Role provides temporary security credentials
• Examples of how IAM roles are used to delegate access –
• Used by an IAM user in the same AWS account as the role
• Used by an AWS service—such as Amazon EC2—in the same account as the role
• Used by an IAM user in a different AWS account than the role

26
Example use of an IAM role

Scenario: AWS Cloud


• An application that runs on an EC2 instance Application has
needs access to an S3 bucket permissions to
Amazon EC2 instance access the S3
bucket
Solution: Application
3
Amazon S3
• Define an IAM policy that grants access to
Role assumed by bucket
the S3 bucket. 2
the EC2 instance photos
• Attach the policy to a role
• Allow the EC2 instance to assume the role
attached
IAM role IAM policy
1
grants access to
photos bucket

27
• IAM policies are constructed with JavaScript
Section 2 key Object Notation (JSON) and define
takeaways permissions.
• 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.

28
M od u le 4 : AWS Clou d S ec u rity

Section 3: Securing a new AWS account


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)

31
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.

• To stop using the account root user:


1. While you are logged in as the account root user, create an IAM user for yourself.
Save the access keys if needed.
2. Create an IAM group, give it full administrator permissions, and add the IAM user
to the group.
3. Disable and remove your account root user access keys, if they exist.
4. Enable a password policy for users.
5. Sign in with your new IAM user credentials.
6. Store your account root user credentials in a secure place.
32
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.

• Options for retrieving the MFA token –


• Virtual MFA-compliant applications:
• Google Authenticator.
• Authy Authenticator (Windows phone app). MFA
• U2F security key devices:
MFA token
• For example, YubiKey.
• Hardware MFA options:
• Key fob or display card offered by Gemalto.
33
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).

34
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.

• AWS delivers the reports to an Amazon S3 bucket that you specify.

• Report is updated at least once per day.

• 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.

35
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.

50
M od u le 4 : AWS Clou d S ec u rity

Section 4: Securing accounts


AWS Organizations

• AWS Organizations enables you to consolidate multiple AWS accounts so


that you centrally manage them.
AWS Organizations

• Security features of AWS Organizations:

• Group AWS accounts into organizational units (OUs) and attach different access
policies to each OU.

• Integration and support for IAM


• Permissions to a user are the intersection of what is allowed by AWS Organizations and
what is granted by IAM in that account.

• Use service control policies to establish control over the AWS services and API
actions that each AWS account can access

57
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.

• Ensures that accounts comply with access control guidelines.

• SCPs are similar to IAM permissions policies –


• They use similar syntax.
• However, an SCP never grants permissions.
• Instead, SCPs specify the maximum permissions for an organization.

58
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.

• Integrates with AWS CloudTrail to log all key usage.

• 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)

59
Amazon Cognito

Amazon Cognito features:


• Adds user sign-up, sign-in, and access control to your web and mobile applications.

• Scales to millions of users.

• 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
60
AWS Shield

• AWS Shield features:


• Is a managed distributed denial of service (DDoS) protection service

• Safeguards applications running on AWS

• Provides always-on detection and automatic inline mitigations

• AWS Shield Standard enabled for at no additional cost. AWS Shield Advanced is an
optional paid service.

• Use it to minimize application downtime and latency.


AWS Shield

61
M od u le 4 : AWS Clou d S ec u rity

Section 5: Securing data on AWS


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

• AWS supports encryption of data at rest


• Data at rest = Data stored physically (on disk or on tape)
• You can encrypt data stored in any service that is supported by AWS KMS,
including:
• Amazon S3
• Amazon EBS
• Amazon Elastic File System (Amazon EFS)
• Amazon RDS managed databases
63
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:
AWS Cloud Corporate data center AWS Cloud

TLS encrypted
data traffic TLS or SSL
encrypted Amazon S3
Amazon EC2 Amazon EFS AWS Storage Gateway

64
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.

65
M od u le 4 : AWS Clou d S ec u rity

Section 6: Working to ensure compliance


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.

• Compliance programs can be broadly categorized –


• Certifications and attestations
• Assessed by a third-party, independent auditor
• Examples: ISO 27001, 27017, 27018, and ISO/IEC 9001
• Laws, regulations, and privacy
• AWS provides security features and legal agreements to support compliance
• Examples: EU General Data Protection Regulation (GDPR), HIPAA
• Alignments and frameworks
• Industry- or function-specific security or compliance requirements
• Examples: Center for Internet Security (CIS), EU-US Privacy Shield certified

67
AWS Config

• Assess, audit, and evaluate the


AWS Config Example AWS Config Dashboard view configurations of AWS resources.
• Use for continuous monitoring of
configurations.
• Automatically evaluate
recorded configurations versus
desired configurations.
• Review configuration changes.
• View detailed configuration histories.
• Simplify compliance auditing and security
analysis.

68
AWS Artifact

• Is a resource for compliance-related information


• Provide access to security and compliance reports, and select
AWS Artifact
online agreements
• Can access example downloads:
• AWS ISO certifications
• Payment Card Industry (PCI) and Service Organization Control (SOC)
reports
• Access AWS Artifact directly from the AWS Management
Console
• Under Security, Identify & Compliance, click Artifact.

69
Section 6 key • AWS security compliance programs
takeaways provide information about the policies,
processes, and controls that are
established and operated by AWS.

• AWS Config is used to assess, audit, and


evaluate the configurations of AWS
resources.

• AWS Artifact provides access to security


and compliance reports.

70
M od u le 4 : AWS Clou d S ec u rity

Module wrap-up
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

75
Complete the knowledge check

76
Sample exam question

Which of the following is AWS's responsibility under the


AWS shared responsibility model?

A. Configuring third-party applications


B. Maintaining physical hardware
C. Securing application access and data
D. Managing custom Amazon Machine Images (AMIs)

77
Additional resources

• AWS Cloud Security home page

• AWS Security Resources

• AWS Security Blog

• Security Bulletins

• Vulnerability and Penetration testing

• AWS Well-Architected Framework – Security pillar

• AWS documentation - IAM Best Practices


78

You might also like