SlideShare a Scribd company logo
1 of 65
The fundamentals of
AWS Cloud Security
C I T Y N A M E
D
A
T
E
Learn a few patterns, secure everything in AWS
Data encryption
AWS Key Management Service
(AWS KMS)
Network security controls
Amazon Virtual Private Cloud
(Amazon VPC)
Permissions management
AWS Identity and Access Management
(AWS IAM)
Agenda
A Builder-focused introduction to AWS Security Controls
• Control your Cloud Infrastructure: AWS IAM
• Control your Data: AWS KMS
• Control your Network: Amazon VPC
You will leave this session
with the foundation you need to secure an AWS environment 🛠⛅️🚀
IAM
Everything to know about IAM
• What it is
• I = Authentication (support for human and application caller Identities)
• AM = Authorization (powerful, flexible permissions language for controlling
access to cloud resources)
• Why it matters to you: Every AWS service uses IAM to
authenticate and authorize API calls
• What builders need to know
• How to make authenticated API calls to AWS from IAM identities
• Basic fluency in IAM policy language
• Where to find and how to understand service-specific authorization control details
AWS identities for human callers: IAM users
AWS account
IAM user
Long-term security
credential
AWS identities for human callers: Federated Identities
AWS account
IAM role
Administrator
IAM role
Developer
Temporary security
credentials
AWS identities for non-human callers …
Amazon EC2
instance
AWS Lambda
function
Amazon SageMaker
notebook
AWS Glue
crawler
Amazon ECS
task
Amazon Comprehend AWS SMS
Amazon Lex
AWS AppSync
AWS Config
Amazon Connect
Amazon EMR
Amazon ECS Amazon ML
DMS Amazon SageMaker
Creating a role in the AWS Management Console
How an Authentication works in AWS
Caller IAM role
AWS Services
(e.g., Amazon S3)
AWS Management
Console
AWS Command
Line Interface
(AWS CLI)
AWS Tools
and SDKs
via
API request signed
with secret key
AWS managed policies for
common sets of permissions
Reading and writing IAM policy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"dynamodb:*"
],
"Resource": "*"
}
]
}
Allowed to take all
Amazon DynamoDB actions
Reading and writing IAM policy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"dynamodb:BatchGetItem",
"dynamodb:GetItem",
"dynamodb:Query"
],
"Resource": "*"
}
]
}
Allowed to take only a few
specific DynamoDB actions
Reading and writing IAM policy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"dynamodb:BatchGetItem",
"dynamodb:GetItem",
"dynamodb:Query",
],
"Resource": [
"arn:aws:dynamodb:ap-southeast-1:111122223333:table/MyTableName",
"arn:aws:dynamodb:ap-southeast-1:111122223333:table/MyTableName/index/*"
]
}
]
}
Allowed to take specific DynamoDB actions
on a specific table and its indexes
S S
Reading and writing IAM policy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "secretsmanager:GetSecretValue",
"Resource": "*",
"Condition": {
"StringEquals": {
"secretsmanager:ResourceTag/Project": "${aws:PrincipalTag/Project}"
}
}
}
]
}
You can read secrets whose
project tag matches your own
Red Blue
How to write a least-privilege IAM Policy
IAM in an AWS enterprise environment
AWS Cloud
Account
Account
Account
Account
Working across AWS account boundaries
Account 111122223333 Account 444455556666
Caller IAM role
Caller IAM policy
Target S3 bucket
other-account-bucket
Working across AWS account boundaries
S3 bucket
policy
Account 111122223333
Caller IAM role
Account 444455556666
Target S3 bucket
other-account-bucket
Caller IAM policy
Working across AWS account boundaries
Target DynamoDB Table
MyTable
Account 111122223333 Account 444455556666
Caller IAM role
Working across AWS account boundaries
Target DynamoDB table
MyTable
Cross-account
access IAM role
Account 111122223333 Account 444455556666
Caller IAM role
Working across AWS account boundaries
Target DynamoDB table
MyTable
Cross-account
access IAM role
Account 111122223333 Account 444455556666
Caller IAM role
Working across AWS account boundaries
Target DynamoDB table
MyTable
Cross-account
access IAM role
Account 111122223333 Account 444455556666
Caller IAM role
Organizational unit (OU) Organizational unit (OU)
Managing multi-account environments with
AWS Organizations
AWS Cloud
Account Account Account
Account
AWS organization
Organizational unit (OU) Organizational unit (OU)
AWS Cloud
Account Account Account
Account
AWS organization
Managing multi-account environments with
AWS Organizations
AWS Single Sign-On
Organizations provides Guardrails for IAM
Organizational unit (OU) Organizational unit (OU)
AWS Cloud
Account Account Account
Account
AWS organization
AWS KMS
Everything to know about AWS KMS
• What it is: AWS-managed encryption/decryption service
• Why it matters to you: Many data-handling AWS services offer simple
AWS KMS integrations; if you know how to use AWS KMS, you can
protect your data at rest simply with no management overhead
• What builders need to know
• The basics of how to use an AWS KMS key
• Familiarity with the AWS KMS integrations offered by many AWS data-handling services
• How to use IAM to control access to keys
👌
The mechanics of an AWS KMS key
For encrypting individual pieces of data (<=4KB)
• KMS.Encrypt(“hello world”)  AQICAHiwKPHZcwiIv….
• KMS.Decrypt(“AQICAHiwKPHZcwiIv….”)  “hello world”
For encrypting application data, use envelope encryption
• KMS.GenerateDataKey  symmetric data key (plaintext and encrypted)
• Use plaintext data key to encrypt your data, then discard
• Store encrypted data key alongside your data
• To decrypt
• KMS.Decrypt(encryptedDataKey)  plaintextDataKey
• Then, decrypt the data with the plaintext symmetric key
AWS KMS key
EncryptedDataKey
AQIDAHiwKPHZcwiIv+V4760rokzKMlVWo0M9O2D5yV
e3tqrBtwGBaaY6AwTrEcsjY0gTN8J8AAAAfjB8Bgk…
EncryptedPayload
AQICAHiwKPHZcwiIv+V4760rokzKMlVWo0M9O2D5yV
e3tqrBtwGEZdK9s3SxlUE11PSPSadGAAAAaTBnBgk…
Encrypting the easy way with AWS Service Integrations
Amazon S3-Managed Keys manages
the encryption key
Encrypting the easy way with AWS Service Integrations
An AWS KMS key in your account is used for
encryption: Customer-Managed Key (CMK)
IAM permissions for AWS KMS keys
{
"Effect": "Allow",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::my-bucket/*"
}
IAM permissions for AWS KMS keys
{
"Effect": "Allow",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::my-bucket/*"
}
{
"Effect": "Allow",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::my-bucket/*"
},
{
"Effect": "Allow",
"Action": "kms:Decrypt",
"Resource": "arn:aws:kms:ap-southeast1:111122223333:key/01234567-89ab-cdef-0123-456789abcdef"
}
IAM permissions for AWS KMS keys
Amazon VPC
Everything to know about Amazon VPC
• What it is: “Your virtual data center in the cloud”
(i.e., the network for your cloud infrastructure)
• Why it matters to you: When you deploy cloud infrastructure,
your VPC is the network that provides connectivity to and from
that infrastructure
• What builders need to know
• VPC core concepts: Subnets and security groups
• Routing basics in VPC
• Private connectivity capabilities
What a VPC is and what goes in it
Region (e.g., ap-southeast-1)
What a VPC is and what goes in it
Region (e.g., ap-southeast-1)
Availability Zone: ap-southeast-1a Availability Zone: ap-southeast-1b Availability Zone: ap-southeast-1c
What a VPC is and what goes in it
Region (e.g., ap-southeast-1)
Availability Zone: ap-southeast-1a Availability Zone: ap-southeast-1b Availability Zone: ap-southeast-1c
VPC: 10.0.0.0/16
What a VPC is and what goes in it
Region (e.g., ap-southeast-1)
Availability Zone: ap-southeast-1a Availability Zone: ap-southeast-1b Availability Zone: ap-southeast-1c
VPC: 10.0.0.0/16
Public subnet: 10.0.0.0/24
Private subnet: 10.0.50.0/24
Public subnet: 10.0.1.0/24
Private subnet: 10.0.51.0/24
Public subnet: 10.0.2.0/24
Private subnet: 10.0.52.0/24
What a VPC is and what goes in it
Region (e.g., ap-southeast-1)
Availability Zone: ap-southeast-1a Availability Zone: ap-southeast-1b Availability Zone: ap-southeast-1c
VPC: 10.0.0.0/16
Public subnet: 10.0.0.0/24
Private subnet: 10.0.50.0/24
Public subnet: 10.0.1.0/24
Private subnet: 10.0.51.0/24
Public subnet: 10.0.2.0/24
Private subnet: 10.0.52.0/24
EC2 instances EC2 instances EC2 instances
Amazon RDS Amazon RDS
If you understand nothing else about VPC . . .
EC2 instances EC2 instances EC2 instances
VPC: 10.0.0.0/16
Security group
Security group
Security group
. . . understand security groups
Region (e.g., ap-southeast-1)
Availability Zone: ap-southeast-1a Availability Zone: ap-southeast-1b Availability Zone: ap-southeast-1c
Amazon RDS Amazon RDS
If you understand nothing else about VPC . . .
. . . understand security groups
EC2 instances EC2 instances EC2 instances
VPC: 10.0.0.0/16
Security group
Security group
Security group
Region (e.g., ap-southeast-1)
Availability Zone: ap-southeast-1a Availability Zone: ap-southeast-1b Availability Zone: ap-southeast-1c
Amazon RDS Amazon RDS
If you understand nothing else about VPC . . .
. . . understand security groups
EC2 instances EC2 instances EC2 instances
VPC: 10.0.0.0/16
Security group
Security group
Security group
Region (e.g., ap-southeast-1)
Availability Zone: ap-southeast-1a Availability Zone: ap-southeast-1b Availability Zone: ap-southeast-1c
Amazon RDS Amazon RDS
EC2 instances EC2 instances EC2 instances
VPC: 10.0.0.0/16
Security group
Security group
Security group
Region (e.g., ap-southeast-1)
Availability Zone: ap-southeast-1a Availability Zone: ap-southeast-1b Availability Zone: ap-southeast-1c
Amazon RDS Amazon RDS
If you understand nothing else about VPC . . .
. . . understand security groups
If you understand only two things about VPC . . .
Public subnet: 10.0.0.0/24
Private subnet: 10.0.50.0/24
Public subnet: 10.0.1.0/24
Private subnet: 10.0.51.0/24
Public subnet: 10.0.2.0/24
Private subnet: 10.0.52.0/24
VPC: 10.0.0.0/16
. . . understand routing
Region (e.g., ap-southeast-1)
Availability Zone: ap-southeast-1a Availability Zone: ap-southeast-1b Availability Zone: ap-southeast-1c
If you understand only two things about VPC . . .
Public subnet: 10.0.0.0/24
Private subnet: 10.0.50.0/24
Public subnet: 10.0.1.0/24
Private subnet: 10.0.51.0/24
Public subnet: 10.0.2.0/24
Private subnet: 10.0.52.0/24
VPC: 10.0.0.0/16
. . . understand routing
Region (e.g., ap-southeast-1)
Availability Zone: ap-southeast-1a Availability Zone: ap-southeast-1b Availability Zone: ap-southeast-1c
Internet
gateway
AWS resources not in your VPC
VPC: 10.0.0.0/16
Region (e.g., ap-southeast-1)
$ dig logs.ap-southeast-1.amazonaws.com
+short
52.94.221.80
VPC endpoints: Private connectivity to AWS services
Private subnet: 10.0.50.0/24 Private subnet: 10.0.51.0/24 Private subnet: 10.0.52.0/24
VPC: 10.0.0.0/16
Region (e.g., ap-southeast-1)
VPC endpoints: Private connectivity to AWS services
Private subnet: 10.0.50.0/24 Private subnet: 10.0.51.0/24 Private subnet: 10.0.52.0/24
VPC endpoint
10.0.50.125
VPC endpoint
10.0.51.39
VPC endpoint
10.0.52.82
Security group
VPC: 10.0.0.0/16
Region (e.g., ap-southeast-1)
Private subnet: 10.0.50.0/24 Private subnet: 10.0.51.0/24 Private subnet: 10.0.52.0/24
VPC endpoint
10.0.50.125
VPC endpoint
10.0.51.39
VPC endpoint
10.0.52.82
VPC: 10.0.0.0/16
Region (e.g., ap-southeast-1)
VPC endpoints: Network as security perimeter
From this network, allow only
callers from my AWS organization
VPC endpoint policy
VPC: 10.0.0.0/16
Region (e.g., ap-southeast-1)
VPC endpoints: Authorization using network path
{
"Effect": "Allow",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::my-bucket/*",
"Condition": {
"StringEquals": {
"aws:SourceVpce": "vpce-11112222"
}
}
}
VPC: 10.0.0.0/16
Region (e.g., ap-southeast-1)
VPC endpoints: Authorization using network path
{
"Effect": "Deny",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::my-bucket/*",
"Condition": {
"StringNotEqualsIfExists": {
"aws:SourceVpce": "vpce-11112222",
"aws:PrincipalOrgId": "o-a1b2c3"
}
}
}
Learn a few patterns, secure everything in AWS
Data encryption
AWS KMS
Network security controls
Amazon VPC
Learn a few patterns, secure everything in AWS
Network security controls
Amazon VPC
Data encryption
AWS KMS
Learn a few patterns, secure everything in AWS
Network security controls
Amazon VPC
Data encryption
AWS KMS
Learn a few patterns, secure everything in AWS
Network security controls
Amazon VPC
Data encryption
AWS KMS
Isolation with IAM and VPC in one account?
“Gray” boundaries
Complicated and messy over time
Difficult to track resources
People stepping on each other
AWS Account
Thank you!
https://www.facebook.com/groups/devax https://job4u.io/

More Related Content

What's hot

What's hot (20)

Getting started with aws io t.compressed.compressed
Getting started with aws io t.compressed.compressedGetting started with aws io t.compressed.compressed
Getting started with aws io t.compressed.compressed
 
Hybrid Infrastructure Integration
Hybrid Infrastructure IntegrationHybrid Infrastructure Integration
Hybrid Infrastructure Integration
 
E301 Elastic Beanstalk PaaS
E301 Elastic Beanstalk PaaSE301 Elastic Beanstalk PaaS
E301 Elastic Beanstalk PaaS
 
Protecting Your Data in AWS
Protecting Your Data in AWSProtecting Your Data in AWS
Protecting Your Data in AWS
 
AWS re:Invent 2016: re:Source Mini Con for Security Services State of the Uni...
AWS re:Invent 2016: re:Source Mini Con for Security Services State of the Uni...AWS re:Invent 2016: re:Source Mini Con for Security Services State of the Uni...
AWS re:Invent 2016: re:Source Mini Con for Security Services State of the Uni...
 
Automating Security in Cloud Workloads with DevSecOps
Automating Security in Cloud Workloads with DevSecOps Automating Security in Cloud Workloads with DevSecOps
Automating Security in Cloud Workloads with DevSecOps
 
AWS re:Invent 2016: Accenture Cloud Platform Serverless Journey (ARC202)
AWS re:Invent 2016: Accenture Cloud Platform Serverless Journey (ARC202)AWS re:Invent 2016: Accenture Cloud Platform Serverless Journey (ARC202)
AWS re:Invent 2016: Accenture Cloud Platform Serverless Journey (ARC202)
 
Creating Your Virtual Data Center
Creating Your Virtual Data CenterCreating Your Virtual Data Center
Creating Your Virtual Data Center
 
AWS re:Invent 2016: From Monolithic to Microservices: Evolving Architecture P...
AWS re:Invent 2016: From Monolithic to Microservices: Evolving Architecture P...AWS re:Invent 2016: From Monolithic to Microservices: Evolving Architecture P...
AWS re:Invent 2016: From Monolithic to Microservices: Evolving Architecture P...
 
Deep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECSDeep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECS
 
Migrating your Databases to AWS: Deep Dive on Amazon RDS and AWS Database Mig...
Migrating your Databases to AWS: Deep Dive on Amazon RDS and AWS Database Mig...Migrating your Databases to AWS: Deep Dive on Amazon RDS and AWS Database Mig...
Migrating your Databases to AWS: Deep Dive on Amazon RDS and AWS Database Mig...
 
SEC306 Using Microsoft Active Directory Across On-Premises and AWS Cloud Wind...
SEC306 Using Microsoft Active Directory Across On-Premises and AWS Cloud Wind...SEC306 Using Microsoft Active Directory Across On-Premises and AWS Cloud Wind...
SEC306 Using Microsoft Active Directory Across On-Premises and AWS Cloud Wind...
 
Network Security and Access Control within AWS
Network Security and Access Control within AWSNetwork Security and Access Control within AWS
Network Security and Access Control within AWS
 
Compliance in the Cloud Using Security by Design
Compliance in the Cloud Using Security by DesignCompliance in the Cloud Using Security by Design
Compliance in the Cloud Using Security by Design
 
NEW LAUNCH! Bringing AWS Lambda to the Edge
NEW LAUNCH! Bringing AWS Lambda to the EdgeNEW LAUNCH! Bringing AWS Lambda to the Edge
NEW LAUNCH! Bringing AWS Lambda to the Edge
 
AWS re:Invent 2016: Building SaaS Offerings for Desktop Apps with Amazon AppS...
AWS re:Invent 2016: Building SaaS Offerings for Desktop Apps with Amazon AppS...AWS re:Invent 2016: Building SaaS Offerings for Desktop Apps with Amazon AppS...
AWS re:Invent 2016: Building SaaS Offerings for Desktop Apps with Amazon AppS...
 
AWS March 2016 Webinar Series Getting Started with Serverless Architectures
AWS March 2016 Webinar Series   Getting Started with Serverless ArchitecturesAWS March 2016 Webinar Series   Getting Started with Serverless Architectures
AWS March 2016 Webinar Series Getting Started with Serverless Architectures
 
Security best practices on AWS - Pop-up Loft TLV 2017
Security best practices on AWS - Pop-up Loft TLV 2017Security best practices on AWS - Pop-up Loft TLV 2017
Security best practices on AWS - Pop-up Loft TLV 2017
 
AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302)
AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302)AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302)
AWS re:Invent 2016: Taking DevOps to the AWS Edge (CTD302)
 
Deep Dive on Serverless Stack
Deep Dive on Serverless StackDeep Dive on Serverless Stack
Deep Dive on Serverless Stack
 

Similar to The fundamentals of AWS Cloud Security 🛠⛅️🚀

Similar to The fundamentals of AWS Cloud Security 🛠⛅️🚀 (20)

Well-Architected for Security: Advanced Session
Well-Architected for Security: Advanced SessionWell-Architected for Security: Advanced Session
Well-Architected for Security: Advanced Session
 
A Practitioners Guide to Securing Your Cloud
A Practitioners Guide to Securing Your CloudA Practitioners Guide to Securing Your Cloud
A Practitioners Guide to Securing Your Cloud
 
Protecting Your Data with Encryption on AWS
Protecting Your Data with Encryption on AWSProtecting Your Data with Encryption on AWS
Protecting Your Data with Encryption on AWS
 
Secure Your AWS Account and Your Organization's Accounts - SID202 - Chicago A...
Secure Your AWS Account and Your Organization's Accounts - SID202 - Chicago A...Secure Your AWS Account and Your Organization's Accounts - SID202 - Chicago A...
Secure Your AWS Account and Your Organization's Accounts - SID202 - Chicago A...
 
Secure your AWS Account and your Organization's Accounts
Secure your AWS Account and your Organization's Accounts Secure your AWS Account and your Organization's Accounts
Secure your AWS Account and your Organization's Accounts
 
Protecting Your Greatest Asset (Your Data): Security Best Practices on Dynamo...
Protecting Your Greatest Asset (Your Data): Security Best Practices on Dynamo...Protecting Your Greatest Asset (Your Data): Security Best Practices on Dynamo...
Protecting Your Greatest Asset (Your Data): Security Best Practices on Dynamo...
 
Best Practices of IoT in the Cloud
Best Practices of IoT in the CloudBest Practices of IoT in the Cloud
Best Practices of IoT in the Cloud
 
윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션
윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션
윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션
 
Customer Case Study: Land Registry as a Service in the Cloud - AWS PS Summit ...
Customer Case Study: Land Registry as a Service in the Cloud - AWS PS Summit ...Customer Case Study: Land Registry as a Service in the Cloud - AWS PS Summit ...
Customer Case Study: Land Registry as a Service in the Cloud - AWS PS Summit ...
 
Best Practices for IoT Security in the Cloud
Best Practices for IoT Security in the CloudBest Practices for IoT Security in the Cloud
Best Practices for IoT Security in the Cloud
 
AWS Security Week: CAF Detective Controls - Gain Visibility & Record Change
AWS Security Week: CAF Detective Controls - Gain Visibility & Record ChangeAWS Security Week: CAF Detective Controls - Gain Visibility & Record Change
AWS Security Week: CAF Detective Controls - Gain Visibility & Record Change
 
Network Security and Access Control within AWS
Network Security and Access Control within AWS Network Security and Access Control within AWS
Network Security and Access Control within AWS
 
Securing Your Virtual Data Center in the Cloud (NET202) - AWS re:Invent 2018
Securing Your Virtual Data Center in the Cloud (NET202) - AWS re:Invent 2018Securing Your Virtual Data Center in the Cloud (NET202) - AWS re:Invent 2018
Securing Your Virtual Data Center in the Cloud (NET202) - AWS re:Invent 2018
 
Mastering Access Control Policies
Mastering Access Control PoliciesMastering Access Control Policies
Mastering Access Control Policies
 
SEC301 Security @ (Cloud) Scale
SEC301 Security @ (Cloud) ScaleSEC301 Security @ (Cloud) Scale
SEC301 Security @ (Cloud) Scale
 
How to implement data encryption at rest in compliance with enterprise requir...
How to implement data encryption at rest in compliance with enterprise requir...How to implement data encryption at rest in compliance with enterprise requir...
How to implement data encryption at rest in compliance with enterprise requir...
 
Best Practices for IoT Security in the Cloud
Best Practices for IoT Security in the CloudBest Practices for IoT Security in the Cloud
Best Practices for IoT Security in the Cloud
 
Deep Dive on AWS IoT
Deep Dive on AWS IoTDeep Dive on AWS IoT
Deep Dive on AWS IoT
 
The fundamentals of AWS cloud security - FND209-R - AWS re:Inforce 2019
The fundamentals of AWS cloud security - FND209-R - AWS re:Inforce 2019 The fundamentals of AWS cloud security - FND209-R - AWS re:Inforce 2019
The fundamentals of AWS cloud security - FND209-R - AWS re:Inforce 2019
 
Detective Controls: Gain Visibility and Record Change
Detective Controls: Gain Visibility and Record ChangeDetective Controls: Gain Visibility and Record Change
Detective Controls: Gain Visibility and Record Change
 

More from Thanh Nguyen

More from Thanh Nguyen (20)

Building a NFT Marketplace DApp
Building a NFT Marketplace DAppBuilding a NFT Marketplace DApp
Building a NFT Marketplace DApp
 
Serverless Architecture 101 ⚡
Serverless Architecture 101 ⚡Serverless Architecture 101 ⚡
Serverless Architecture 101 ⚡
 
Migrating Monolithic Applications with the Strangler Pattern
Migrating Monolithic Applications with the Strangler Pattern Migrating Monolithic Applications with the Strangler Pattern
Migrating Monolithic Applications with the Strangler Pattern
 
SmartChat WhatsApp-clone using AWS Amplify AppSync
SmartChat WhatsApp-clone using AWS Amplify AppSyncSmartChat WhatsApp-clone using AWS Amplify AppSync
SmartChat WhatsApp-clone using AWS Amplify AppSync
 
Introduction to Ethereum Blockchain & Smart Contract
Introduction to Ethereum Blockchain & Smart ContractIntroduction to Ethereum Blockchain & Smart Contract
Introduction to Ethereum Blockchain & Smart Contract
 
Amazon AWS Free-Tier
Amazon AWS Free-TierAmazon AWS Free-Tier
Amazon AWS Free-Tier
 
Rapid Software Development Process
Rapid Software Development ProcessRapid Software Development Process
Rapid Software Development Process
 
PMI ACP Classroom Question Paper
PMI ACP Classroom Question PaperPMI ACP Classroom Question Paper
PMI ACP Classroom Question Paper
 
PMI ACP Classroom Question Paper with Answers
PMI ACP Classroom Question Paper with AnswersPMI ACP Classroom Question Paper with Answers
PMI ACP Classroom Question Paper with Answers
 
PMI-ACP Case Study
PMI-ACP Case StudyPMI-ACP Case Study
PMI-ACP Case Study
 
PMI-ACP Lesson 12 Knowledge and Skills Nugget 4
PMI-ACP Lesson 12 Knowledge and Skills Nugget 4PMI-ACP Lesson 12 Knowledge and Skills Nugget 4
PMI-ACP Lesson 12 Knowledge and Skills Nugget 4
 
PMI-ACP Lesson 12 Knowledge and Skills Nugget 3
PMI-ACP Lesson 12 Knowledge and Skills Nugget 3PMI-ACP Lesson 12 Knowledge and Skills Nugget 3
PMI-ACP Lesson 12 Knowledge and Skills Nugget 3
 
PMI-ACP Lesson 12 Knowledge and Skills Nugget 2
PMI-ACP Lesson 12 Knowledge and Skills Nugget 2PMI-ACP Lesson 12 Knowledge and Skills Nugget 2
PMI-ACP Lesson 12 Knowledge and Skills Nugget 2
 
PMI-ACP Lesson 12 Knowledge and Skills Nugget 1
PMI-ACP Lesson 12 Knowledge and Skills Nugget 1PMI-ACP Lesson 12 Knowledge and Skills Nugget 1
PMI-ACP Lesson 12 Knowledge and Skills Nugget 1
 
PMI-ACP Lesson 11 Agile Value Stream Analysis
PMI-ACP Lesson 11 Agile Value Stream AnalysisPMI-ACP Lesson 11 Agile Value Stream Analysis
PMI-ACP Lesson 11 Agile Value Stream Analysis
 
PMI-ACP Lesson 10 Agile Metrics
PMI-ACP Lesson 10 Agile MetricsPMI-ACP Lesson 10 Agile Metrics
PMI-ACP Lesson 10 Agile Metrics
 
PMI-ACP Lesson 9 Agile Risk Management
PMI-ACP Lesson 9 Agile Risk ManagementPMI-ACP Lesson 9 Agile Risk Management
PMI-ACP Lesson 9 Agile Risk Management
 
PMI-ACP Lesson 08 Nugget 2 Agile & Scrum - Value-Based Prioritization
PMI-ACP Lesson 08 Nugget 2 Agile & Scrum - Value-Based PrioritizationPMI-ACP Lesson 08 Nugget 2 Agile & Scrum - Value-Based Prioritization
PMI-ACP Lesson 08 Nugget 2 Agile & Scrum - Value-Based Prioritization
 
PMI-ACP Lesson 08 Nugget 1 Agile & Scrum Value-based Prioritization
PMI-ACP Lesson 08 Nugget 1 Agile & Scrum Value-based PrioritizationPMI-ACP Lesson 08 Nugget 1 Agile & Scrum Value-based Prioritization
PMI-ACP Lesson 08 Nugget 1 Agile & Scrum Value-based Prioritization
 
PMI-ACP Lesson 07 Soft Skills Negotiation
PMI-ACP Lesson 07 Soft Skills NegotiationPMI-ACP Lesson 07 Soft Skills Negotiation
PMI-ACP Lesson 07 Soft Skills Negotiation
 

Recently uploaded

Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 

Recently uploaded (20)

SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
Top 10 Symfony Development Companies 2024
Top 10 Symfony Development Companies 2024Top 10 Symfony Development Companies 2024
Top 10 Symfony Development Companies 2024
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
THE BEST IPTV in GERMANY for 2024: IPTVreel
THE BEST IPTV in  GERMANY for 2024: IPTVreelTHE BEST IPTV in  GERMANY for 2024: IPTVreel
THE BEST IPTV in GERMANY for 2024: IPTVreel
 
Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKConnecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAK
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 

The fundamentals of AWS Cloud Security 🛠⛅️🚀

  • 1. The fundamentals of AWS Cloud Security C I T Y N A M E D A T E
  • 2. Learn a few patterns, secure everything in AWS Data encryption AWS Key Management Service (AWS KMS) Network security controls Amazon Virtual Private Cloud (Amazon VPC) Permissions management AWS Identity and Access Management (AWS IAM)
  • 3. Agenda A Builder-focused introduction to AWS Security Controls • Control your Cloud Infrastructure: AWS IAM • Control your Data: AWS KMS • Control your Network: Amazon VPC You will leave this session with the foundation you need to secure an AWS environment 🛠⛅️🚀
  • 4.
  • 5. IAM
  • 6. Everything to know about IAM • What it is • I = Authentication (support for human and application caller Identities) • AM = Authorization (powerful, flexible permissions language for controlling access to cloud resources) • Why it matters to you: Every AWS service uses IAM to authenticate and authorize API calls • What builders need to know • How to make authenticated API calls to AWS from IAM identities • Basic fluency in IAM policy language • Where to find and how to understand service-specific authorization control details
  • 7. AWS identities for human callers: IAM users AWS account IAM user Long-term security credential
  • 8. AWS identities for human callers: Federated Identities AWS account IAM role Administrator IAM role Developer Temporary security credentials
  • 9. AWS identities for non-human callers … Amazon EC2 instance AWS Lambda function Amazon SageMaker notebook AWS Glue crawler Amazon ECS task
  • 10. Amazon Comprehend AWS SMS Amazon Lex AWS AppSync AWS Config Amazon Connect Amazon EMR Amazon ECS Amazon ML DMS Amazon SageMaker Creating a role in the AWS Management Console
  • 11. How an Authentication works in AWS Caller IAM role AWS Services (e.g., Amazon S3) AWS Management Console AWS Command Line Interface (AWS CLI) AWS Tools and SDKs via API request signed with secret key
  • 12. AWS managed policies for common sets of permissions
  • 13. Reading and writing IAM policy { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "dynamodb:*" ], "Resource": "*" } ] } Allowed to take all Amazon DynamoDB actions
  • 14. Reading and writing IAM policy { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "dynamodb:BatchGetItem", "dynamodb:GetItem", "dynamodb:Query" ], "Resource": "*" } ] } Allowed to take only a few specific DynamoDB actions
  • 15. Reading and writing IAM policy { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "dynamodb:BatchGetItem", "dynamodb:GetItem", "dynamodb:Query", ], "Resource": [ "arn:aws:dynamodb:ap-southeast-1:111122223333:table/MyTableName", "arn:aws:dynamodb:ap-southeast-1:111122223333:table/MyTableName/index/*" ] } ] } Allowed to take specific DynamoDB actions on a specific table and its indexes
  • 16. S S Reading and writing IAM policy { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "secretsmanager:GetSecretValue", "Resource": "*", "Condition": { "StringEquals": { "secretsmanager:ResourceTag/Project": "${aws:PrincipalTag/Project}" } } } ] } You can read secrets whose project tag matches your own Red Blue
  • 17. How to write a least-privilege IAM Policy
  • 18. IAM in an AWS enterprise environment AWS Cloud Account Account Account Account
  • 19. Working across AWS account boundaries Account 111122223333 Account 444455556666 Caller IAM role Caller IAM policy Target S3 bucket other-account-bucket
  • 20. Working across AWS account boundaries S3 bucket policy Account 111122223333 Caller IAM role Account 444455556666 Target S3 bucket other-account-bucket Caller IAM policy
  • 21. Working across AWS account boundaries Target DynamoDB Table MyTable Account 111122223333 Account 444455556666 Caller IAM role
  • 22. Working across AWS account boundaries Target DynamoDB table MyTable Cross-account access IAM role Account 111122223333 Account 444455556666 Caller IAM role
  • 23. Working across AWS account boundaries Target DynamoDB table MyTable Cross-account access IAM role Account 111122223333 Account 444455556666 Caller IAM role
  • 24. Working across AWS account boundaries Target DynamoDB table MyTable Cross-account access IAM role Account 111122223333 Account 444455556666 Caller IAM role
  • 25. Organizational unit (OU) Organizational unit (OU) Managing multi-account environments with AWS Organizations AWS Cloud Account Account Account Account AWS organization
  • 26. Organizational unit (OU) Organizational unit (OU) AWS Cloud Account Account Account Account AWS organization Managing multi-account environments with AWS Organizations AWS Single Sign-On
  • 27. Organizations provides Guardrails for IAM Organizational unit (OU) Organizational unit (OU) AWS Cloud Account Account Account Account AWS organization
  • 28.
  • 30. Everything to know about AWS KMS • What it is: AWS-managed encryption/decryption service • Why it matters to you: Many data-handling AWS services offer simple AWS KMS integrations; if you know how to use AWS KMS, you can protect your data at rest simply with no management overhead • What builders need to know • The basics of how to use an AWS KMS key • Familiarity with the AWS KMS integrations offered by many AWS data-handling services • How to use IAM to control access to keys
  • 31. 👌
  • 32. The mechanics of an AWS KMS key For encrypting individual pieces of data (<=4KB) • KMS.Encrypt(“hello world”)  AQICAHiwKPHZcwiIv…. • KMS.Decrypt(“AQICAHiwKPHZcwiIv….”)  “hello world” For encrypting application data, use envelope encryption • KMS.GenerateDataKey  symmetric data key (plaintext and encrypted) • Use plaintext data key to encrypt your data, then discard • Store encrypted data key alongside your data • To decrypt • KMS.Decrypt(encryptedDataKey)  plaintextDataKey • Then, decrypt the data with the plaintext symmetric key AWS KMS key EncryptedDataKey AQIDAHiwKPHZcwiIv+V4760rokzKMlVWo0M9O2D5yV e3tqrBtwGBaaY6AwTrEcsjY0gTN8J8AAAAfjB8Bgk… EncryptedPayload AQICAHiwKPHZcwiIv+V4760rokzKMlVWo0M9O2D5yV e3tqrBtwGEZdK9s3SxlUE11PSPSadGAAAAaTBnBgk…
  • 33.
  • 34. Encrypting the easy way with AWS Service Integrations Amazon S3-Managed Keys manages the encryption key
  • 35. Encrypting the easy way with AWS Service Integrations An AWS KMS key in your account is used for encryption: Customer-Managed Key (CMK)
  • 36. IAM permissions for AWS KMS keys { "Effect": "Allow", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::my-bucket/*" }
  • 37. IAM permissions for AWS KMS keys { "Effect": "Allow", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::my-bucket/*" }
  • 38. { "Effect": "Allow", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::my-bucket/*" }, { "Effect": "Allow", "Action": "kms:Decrypt", "Resource": "arn:aws:kms:ap-southeast1:111122223333:key/01234567-89ab-cdef-0123-456789abcdef" } IAM permissions for AWS KMS keys
  • 39.
  • 41. Everything to know about Amazon VPC • What it is: “Your virtual data center in the cloud” (i.e., the network for your cloud infrastructure) • Why it matters to you: When you deploy cloud infrastructure, your VPC is the network that provides connectivity to and from that infrastructure • What builders need to know • VPC core concepts: Subnets and security groups • Routing basics in VPC • Private connectivity capabilities
  • 42. What a VPC is and what goes in it Region (e.g., ap-southeast-1)
  • 43. What a VPC is and what goes in it Region (e.g., ap-southeast-1) Availability Zone: ap-southeast-1a Availability Zone: ap-southeast-1b Availability Zone: ap-southeast-1c
  • 44. What a VPC is and what goes in it Region (e.g., ap-southeast-1) Availability Zone: ap-southeast-1a Availability Zone: ap-southeast-1b Availability Zone: ap-southeast-1c VPC: 10.0.0.0/16
  • 45. What a VPC is and what goes in it Region (e.g., ap-southeast-1) Availability Zone: ap-southeast-1a Availability Zone: ap-southeast-1b Availability Zone: ap-southeast-1c VPC: 10.0.0.0/16 Public subnet: 10.0.0.0/24 Private subnet: 10.0.50.0/24 Public subnet: 10.0.1.0/24 Private subnet: 10.0.51.0/24 Public subnet: 10.0.2.0/24 Private subnet: 10.0.52.0/24
  • 46. What a VPC is and what goes in it Region (e.g., ap-southeast-1) Availability Zone: ap-southeast-1a Availability Zone: ap-southeast-1b Availability Zone: ap-southeast-1c VPC: 10.0.0.0/16 Public subnet: 10.0.0.0/24 Private subnet: 10.0.50.0/24 Public subnet: 10.0.1.0/24 Private subnet: 10.0.51.0/24 Public subnet: 10.0.2.0/24 Private subnet: 10.0.52.0/24 EC2 instances EC2 instances EC2 instances Amazon RDS Amazon RDS
  • 47. If you understand nothing else about VPC . . . EC2 instances EC2 instances EC2 instances VPC: 10.0.0.0/16 Security group Security group Security group . . . understand security groups Region (e.g., ap-southeast-1) Availability Zone: ap-southeast-1a Availability Zone: ap-southeast-1b Availability Zone: ap-southeast-1c Amazon RDS Amazon RDS
  • 48. If you understand nothing else about VPC . . . . . . understand security groups EC2 instances EC2 instances EC2 instances VPC: 10.0.0.0/16 Security group Security group Security group Region (e.g., ap-southeast-1) Availability Zone: ap-southeast-1a Availability Zone: ap-southeast-1b Availability Zone: ap-southeast-1c Amazon RDS Amazon RDS
  • 49. If you understand nothing else about VPC . . . . . . understand security groups EC2 instances EC2 instances EC2 instances VPC: 10.0.0.0/16 Security group Security group Security group Region (e.g., ap-southeast-1) Availability Zone: ap-southeast-1a Availability Zone: ap-southeast-1b Availability Zone: ap-southeast-1c Amazon RDS Amazon RDS
  • 50. EC2 instances EC2 instances EC2 instances VPC: 10.0.0.0/16 Security group Security group Security group Region (e.g., ap-southeast-1) Availability Zone: ap-southeast-1a Availability Zone: ap-southeast-1b Availability Zone: ap-southeast-1c Amazon RDS Amazon RDS If you understand nothing else about VPC . . . . . . understand security groups
  • 51. If you understand only two things about VPC . . . Public subnet: 10.0.0.0/24 Private subnet: 10.0.50.0/24 Public subnet: 10.0.1.0/24 Private subnet: 10.0.51.0/24 Public subnet: 10.0.2.0/24 Private subnet: 10.0.52.0/24 VPC: 10.0.0.0/16 . . . understand routing Region (e.g., ap-southeast-1) Availability Zone: ap-southeast-1a Availability Zone: ap-southeast-1b Availability Zone: ap-southeast-1c
  • 52. If you understand only two things about VPC . . . Public subnet: 10.0.0.0/24 Private subnet: 10.0.50.0/24 Public subnet: 10.0.1.0/24 Private subnet: 10.0.51.0/24 Public subnet: 10.0.2.0/24 Private subnet: 10.0.52.0/24 VPC: 10.0.0.0/16 . . . understand routing Region (e.g., ap-southeast-1) Availability Zone: ap-southeast-1a Availability Zone: ap-southeast-1b Availability Zone: ap-southeast-1c Internet gateway
  • 53. AWS resources not in your VPC VPC: 10.0.0.0/16 Region (e.g., ap-southeast-1) $ dig logs.ap-southeast-1.amazonaws.com +short 52.94.221.80
  • 54. VPC endpoints: Private connectivity to AWS services Private subnet: 10.0.50.0/24 Private subnet: 10.0.51.0/24 Private subnet: 10.0.52.0/24 VPC: 10.0.0.0/16 Region (e.g., ap-southeast-1)
  • 55. VPC endpoints: Private connectivity to AWS services Private subnet: 10.0.50.0/24 Private subnet: 10.0.51.0/24 Private subnet: 10.0.52.0/24 VPC endpoint 10.0.50.125 VPC endpoint 10.0.51.39 VPC endpoint 10.0.52.82 Security group VPC: 10.0.0.0/16 Region (e.g., ap-southeast-1)
  • 56. Private subnet: 10.0.50.0/24 Private subnet: 10.0.51.0/24 Private subnet: 10.0.52.0/24 VPC endpoint 10.0.50.125 VPC endpoint 10.0.51.39 VPC endpoint 10.0.52.82 VPC: 10.0.0.0/16 Region (e.g., ap-southeast-1) VPC endpoints: Network as security perimeter From this network, allow only callers from my AWS organization VPC endpoint policy
  • 57. VPC: 10.0.0.0/16 Region (e.g., ap-southeast-1) VPC endpoints: Authorization using network path { "Effect": "Allow", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::my-bucket/*", "Condition": { "StringEquals": { "aws:SourceVpce": "vpce-11112222" } } }
  • 58. VPC: 10.0.0.0/16 Region (e.g., ap-southeast-1) VPC endpoints: Authorization using network path { "Effect": "Deny", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::my-bucket/*", "Condition": { "StringNotEqualsIfExists": { "aws:SourceVpce": "vpce-11112222", "aws:PrincipalOrgId": "o-a1b2c3" } } }
  • 59.
  • 60. Learn a few patterns, secure everything in AWS Data encryption AWS KMS Network security controls Amazon VPC
  • 61. Learn a few patterns, secure everything in AWS Network security controls Amazon VPC Data encryption AWS KMS
  • 62. Learn a few patterns, secure everything in AWS Network security controls Amazon VPC Data encryption AWS KMS
  • 63. Learn a few patterns, secure everything in AWS Network security controls Amazon VPC Data encryption AWS KMS
  • 64. Isolation with IAM and VPC in one account? “Gray” boundaries Complicated and messy over time Difficult to track resources People stepping on each other AWS Account

Editor's Notes

  1. What about IAM or VPC, How we used to do this was IAM and VPC boundaries. App per VPC, dev team per IAM group, etc. But the problem persisted because… Here are some more shortcomings: Mary needs access to EC2, Joe needs access to beanstalk (which needs EC2 also), and Mike needs access to RDS. Once that’s all setup, Willy needs to work on a special project and he wants his own VPC and full admin privileges. The whole work is heavily relying on the wisdom of the Ops guys. Wait, whose server is this that’s been running for 4mnths on a c3.8xl with no tags; can we just terminate it? Someone dropped a key on github and that server has been bitcoin mining!? Now Joe terminated one of the prod web tier instances by mistake… content owner: Sam Elmalak <selmalak@amazon.com>