SlideShare a Scribd company logo
1 of 61
Download to read offline
Eric Chu, eCloudvalley Digital Technology
Secure Content Delivery Using
Amazon CloudFront
What to Expect from the Session
In this session we will talk about:
• Why security matters
• Key aspects of security
• How Amazon CloudFront can help
• Best practices for secured delivery on
Amazon CloudFront
Overview: Why Security Matters
• Customer Trust
• Regulatory Compliance
• Data Privacy
How AWS Can Help
Infrastructure
Security
Application
Security
Services Security
In the cloud, security is a shared responsibility
https://aws.amazon.com/compliance/shared-responsibility-model/
Encrypt data in transit
Encrypt data at rest
Protect your AWS Credentials
Rotate your keys
Secure your application, OS, Stack
and AMIs
Enforce IAM policies
Use MFA, VPC, Leverage S3
bucket policies
EC2 Security groups
EFS in EC2, ACM, etc.
SOC 1,2,3
ISO 27001/2 Certification
PCI DSS 2.0 Level 1-5
HIPAA/SOX Compliance
FedRAMP, FISMA & DIACAP
ITAR
How we secure
our infrastructure
How can you secure
your application?
What security options
and features are
available to you?
How CloudFront Can Help
Infrastructure
Security
Application
Security
Services Security
Security on CloudFront
SSL/TLS Options
Private Content
Origin Access Identities
Web Application Firewall
AWS CloudTrail
IAM Policies
Origin Protection
Rotate Keys
Rotate Certificates
PCI DSS 2.0 Level 1
ISO 9001, 27001,
27017, 27018
How CloudFront Can Help
What CloudFront
does automatically
What you can do
using CloudFront
features
+ =
What should you do?
Highly secure content
delivery
Infrastructure Security
How we secure our infrastructure
Infrastructure
Security
Application
Security
Services Security
Infrastructure Security
Facilities
Physical Security
Cache Infrastructure
Network Infrastructure
+ =
What should you do?
Highly Secure
Content Delivery
Infrastructure Security
• Bastion hosts for maintenance
• Two-factor authentication
• Encryption
• Separation to enhance containment
• Testing & metrics
CloudFront Edge Location
x
Infrastructure Security
Services Security
Security options and features available on CloudFront
Infrastructure
Security
Application
Security
Services Security
Services Security
High Security Ciphers
PFS
OCSP Stapling
Session Tickets
SSL/TLS Options
Private Content
Trusted Signers
Web Application Firewall
AWS CloudTrail
AWS Certificate
Manager
+ =
What should you do?
Highly Secure Content
Delivery
CloudFront can protect ‘Data in Transit’
CloudFront Protects Data in Transit
Origin
Edge
Location
User Request A
• Deliver content over
HTTPS to protect data
in transit
• HTTPS Authenticates
CloudFront to Viewers
• HTTPS Authenticates
Origin to CloudFront
CloudFront enables advanced SSL features
automatically
Advanced SSL/TLS
• Improved Security
• High security ciphers
• Perfect Forward Secrecy
• Improved SSL Performance
• Online Certificate Status Protocol
(OCSP Stapling)
• Session Tickets
Advanced SSL/TLS: Improved Security
• CloudFront uses high
security ciphers
• Employs ephemeral
key exchange
• Enables Perfect
Forward Secrecy
CloudFront
Edge location
Advanced SSL/TLS: Improved Performance
• Session Tickets
• Online Certificate Status Protocol (OCSP Stapling)
Session Tickets
• Session tickets allow client
to resume session
• CloudFront sends
encrypted session data to
client
• Client does an abbreviated
SSL handshake
CloudFront
Edge location
OCSP Stapling
1
2 3
4
5
Client
OCSP Responder
Origin Server
Amazon
CloudFront
1) Client sends TLS Client Hello
2) CloudFront requests certificate status from
OCSP responder
3) OCSP responder sends certificate status
4) CloudFront completes TLS handshake with
client
5) Request/response from Origin Server
OCSP Stapling
…
OCSP Stapling
Client Side Revocation Checks
0 50 100 150 200 250
(time in milliseconds)
0 50 100 150 200 250
(time in milliseconds)
TCP Handshake
Client Hello
Server Hello
DNS for OCSP Responder
TCP to OCSP Responder
OCSP Request/Response
… Follow Certificate Chain
Complete Handshake
Application Data
30%
Improvement
120 ms faster
Validate Origin Certificate
• CloudFront validates SSL certificates to origin
Origin domain name must match Subject
Name on certificate
Certificate must be issued by a Trusted CA
Certificate must be within expiration window
But there are things you need to do
Deliver Content using HTTPS
• CloudFront makes it easy
• Create one distribution, and deliver
both HTTP & HTTPS content
• There are other options as well:
• Strict HTTPS
• HTTP to HTTPS redirect
CloudFront TLS Options
• Default CloudFront
SSL Domain Name
• CloudFront certificate
shared across customers
• When to use?
• Example: dxxx.cloudfront.net
• SNI Custom SSL
• Bring your own SSL certificate
• OR use AWS Certificate Manager
• Relies on the SNI extension of
the Transport Layer Security
protocol
• When to use?
• Example: www.mysite.com
• Some older browsers/OS do not
support SNI extension
• Dedicated IP Custom
SSL
• Bring your own SSL certificate
• OR use AWS Certificate
Manager
• CloudFront allocates
dedicated IP addresses to
serve your SSL content
• When to use?
• Example: www.mysite.com
• Supported by all browsers/OS
Before (time-consuming & complex)
3rd Party
Certificate
Authority
3-5 days
Upload to IAM
via AWS CLI
Connect to CloudFront
via AWS CLI
After (simple & automated & super fast)
AWS
Certificate
Manager
End-to-end process
within minutes
Using a couple of
mouse clicks on the
console
Integrated with AWS Certificate Manager
MapBox
MapBox uses SNI Custom SSL
• They wanted to use a custom domain
• xxxxx.mapbox.com
• Their clients support TLS
• They wanted to use an economical option
HTTPS Usage Patterns
• Half bridge TLS termination
• Full bridge TLS termination
Half Bridge TLS Termination
CloudFront
HTTP
• Better performance by leveraging HTTP connections to
origin
region
Full Bridge TLS Termination
Amazon
CloudFront
HTTPS
• Secured connection all the way to origin
• Use origin ‘Match Viewer’ or ‘HTTPS Only’
region
MapBox uses multiple origins
• Have multiple API endpoints (origin servers)
• One with Half Bridge: HTTP from Edge to
Origin
• Second with Full Bridge: HTTPS from Edge
to Origin
You are not done yet…
You need to protect content cached at the
Edge
Access Control
• What if you want to…
• Deliver content only to selected customers
• Allow access to content only until ‘time n’
• Allow only certain IPs to access content
Access Control: Private Content
• Signed URLs
• Add signature to the Querystring in URL
• Your URL changes
• When should you use it?
• Restrict access to individual files
• Users are using a client that doesn't
support cookies
• You want to use an RTMP distribution
• Signed Cookies
• Add signature to a cookie
• Your URL does not change
• When should you use it?
• Restrict access to multiple files
• You don’t want to change URLs
Access Control: Private Content
• Here is an example of a policy statement
for signed URLs
Access Control: Private Content
• Under development mode?
• Make CloudFront accessible only from your
“Internal IP Addresses”
You are still not done…
What if you want to restrict access based on
parameters in the request?
Amazon CloudFront
Edge Location
Serving Unnecessary Requests
Costs Money
Scraper Bot
Host: www.internetkitties.com
User-Agent: badbot
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://www.InTeRnEkItTiEs.com/
Connection: keep-alive
AWS WAF
Host: www.internetkitties.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64)…..
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://www.mysite.com/
Connection: keep-alive
Amazon CloudFront
Edge Location
Access Control: Web Application
Firewall
Scraper Bot
Host: www.internetkitties.com
User-Agent: badbot
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://www.InTeRnEkItTiEs.com/
Connection: keep-alive
AWS WAF
Host: www.internetkitties.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64)…..
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://www.mysite.com/
Connection: keep-alive
MapBox uses AWS WAF to
protect from bots
•
Good Users
Bad Guys
Serve
r
AWS
WAF
Logs
Threat
Analysis
Rule Updater
AWS WAF example: A technical implementation
• Blocking bad bots dynamically with AWS WAF
web ACLs
AWS WAF Example: Blocking Bad Bots
• What We Need…
• IPSet: contains our list of blocked IP addresses
• Rule: blocks requests if requests match IP in our IPSet
• WebACL: allow requests by default, contains our Rule
• and…
• Mechanism to detect bad bots
• Mechanism to add bad bot IP address to IPSet
AWS WAF Example: Detecting Bad Bots
• Use robots.txt to specify which areas
of your site or webapp should not be
scraped
• Place file in your web root
• Ensure there are links pointing to non-
scrapable content
• Hide a trigger script that normal users
don’t see and good bots ignore
• $ cat webroot/robots.txt
• User-agent: *
• Disallow: /honeypot/
• <a href="/honeypot/"
class="hidden" aria-
hidden="true">click
me</a>
AWS WAF Example: Blacklist Bad Bots
• Bad bots (ignoring your robots.txt) will
request the hidden link
• Trigger script will detect the source IP of the
request
• Trigger script requests change token
• Trigger script adds source IP to IPSet
blacklist
• WebACL will block subsequent request
from that source
• $ aws --endpoint-url
https://waf.amazonaws.com/ waf get-
change-token
• {
• "ChangeToken": "acbc53f2-46db-4fbd-
b8d5-dfb8c466927f”
• }
• $ aws --endpoint-url
https://waf.amazonaws.com/ waf update-ip-
set --cli-input-json '{ "IPSetId": ”<<IP
SET ID>>", "ChangeToken": "acbc53f2-46db-
4fbd-b8d5-dfb8c466927f", "Updates": [ {
"Action": "INSERT", "IPSetDescriptor": {
"Type": "IPV4", "Value": ”<<SOURCE
IP>>/32" } } ] }’
• {
• "ChangeToken": "acbc53f2-46db-4fbd-
b8d5-dfb8c466927f”
• }
Preconfigured Protection & Tutorials
https://aws.amazon.com/waf/preconfiguredrules/
Types of attacks that need
automation
HTTP floods Scans & probesIP reputation lists Bots & scrapers
Attackers
Application Security
How can you secure your application and origin?
Infrastructure
Security
Application
Security
Services Security
Application Security
IAM Policies
Origin Protection
OAI
Rotate Keys
Rotate Certificates
+ =
What should you do?
Highly secure
content delivery
Hackers could still bypass CloudFront to
access your origin…
Access Control: Restricting Origin Access
• Amazon S3
• Origin Access Identify (OAI)
• Prevents direct access to your Amazon S3
bucket
• Ensures performance benefits to all
customers
• Custom Origin
• Block by IP Address
• Pre-shared Secret Header
• Whitelist only CloudFront
• Protects origin from overload
• Ensures performance benefits to all customers
Object Access Identity (OAI)
• Only CloudFront can
access Amazon S3
bucket
• We make it simple for
you
Amazon CloudFront
Region
Amazon S3
bucket
Custom
Origin
Shield Custom Origin
1. Whitelisting CloudFront IP Range
2. Whitelist a pre-shared secret origin header
Amazon CloudFront
Region
Amazon S3
bucket
Custom Origin
Shield Custom Origin
• Subscribe to SNS notifications on changes to IP ranges
• Automatically update security groups
• https://github.com/awslabs/aws-cloudfront-samples
AWS Lambda
Amazon CloudFront
Amazon SNS
Security Group
Web app
server
Web app
server
AWS IP Ranges
Update IP Range
SNS Message
Services Security: IAM
• AWS Managed Policies or create custom policies
• Regulate access to CloudFront APIs
• Describe user role or permissions
Origin Best Practices
• 1. Match Viewer
Origin Protocol
Policy
• Enable Only TLS 1.1 or
1.2 to Origin
• Enforce HTTPS Only
Connections to Origin
• 2. Restrict Access
using Security
Groups & Shared
Secret
• 3. Use a SHA256
certificate
security group
Origin Best Practices
• 4. Use ELB with
Custom certificate
• 5. Use ELB Pre-defined Policy • 6. Send HSTS Header
• *Strict-Transport-Security:
max-age=15552000;
• *X-Frame-Options: SAMEORIGIN
• *X-XSS-Protection: 1;
mode=block Options
You can request an SSL Certificate from
AWS Certificate Manager
Services Security : IAM Examples
• Example 1: Create groups with just access to create invalidations
• Example 2: Just read access to your distributions & configuration
AWS CloudTrail
• Record CloudFront API calls history for:
• Security analysis
• Resource change tracking
• Compliance auditing
CloudWatch Alarm
CloudTrailCloudFront
Distribution Updates
How to validate your security
configurations
https://www.ssllabs.com/ssltest/
Thank You

More Related Content

What's hot

Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 

What's hot (20)

Amazon API Gateway
Amazon API GatewayAmazon API Gateway
Amazon API Gateway
 
Encryption and Key Management in AWS
Encryption and Key Management in AWSEncryption and Key Management in AWS
Encryption and Key Management in AWS
 
AWS Security Checklist
AWS Security ChecklistAWS Security Checklist
AWS Security Checklist
 
Security Architectures on AWS
Security Architectures on AWSSecurity Architectures on AWS
Security Architectures on AWS
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Monitoring real-life Azure applications: When to use what and why
Monitoring real-life Azure applications: When to use what and whyMonitoring real-life Azure applications: When to use what and why
Monitoring real-life Azure applications: When to use what and why
 
Top 10 AWS Identity and Access Management (IAM) Best Practices (SEC301) | AWS...
Top 10 AWS Identity and Access Management (IAM) Best Practices (SEC301) | AWS...Top 10 AWS Identity and Access Management (IAM) Best Practices (SEC301) | AWS...
Top 10 AWS Identity and Access Management (IAM) Best Practices (SEC301) | AWS...
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
Getting Started with Amazon Inspector
Getting Started with Amazon InspectorGetting Started with Amazon Inspector
Getting Started with Amazon Inspector
 
AWS Security Week: AWS Secrets Manager
AWS Security Week: AWS Secrets ManagerAWS Security Week: AWS Secrets Manager
AWS Security Week: AWS Secrets Manager
 
Serverless Framework Intro
Serverless Framework IntroServerless Framework Intro
Serverless Framework Intro
 
Using AWS Key Management Service for Secure Workloads
Using AWS Key Management Service for Secure WorkloadsUsing AWS Key Management Service for Secure Workloads
Using AWS Key Management Service for Secure Workloads
 
Introduction to Azure monitor
Introduction to Azure monitorIntroduction to Azure monitor
Introduction to Azure monitor
 
Amazon Virtual Private Cloud (VPC) - Networking Fundamentals and Connectivity...
Amazon Virtual Private Cloud (VPC) - Networking Fundamentals and Connectivity...Amazon Virtual Private Cloud (VPC) - Networking Fundamentals and Connectivity...
Amazon Virtual Private Cloud (VPC) - Networking Fundamentals and Connectivity...
 
AWS WAF
AWS WAFAWS WAF
AWS WAF
 
Application & Account Monitoring in AWS
Application & Account Monitoring in AWSApplication & Account Monitoring in AWS
Application & Account Monitoring in AWS
 
AWS Secrets Manager
AWS Secrets ManagerAWS Secrets Manager
AWS Secrets Manager
 
Introduction of AWS KMS
Introduction of AWS KMSIntroduction of AWS KMS
Introduction of AWS KMS
 
Intro to AWS Lambda
Intro to AWS Lambda Intro to AWS Lambda
Intro to AWS Lambda
 
Azure Migration Program Pitch Deck
Azure Migration Program Pitch DeckAzure Migration Program Pitch Deck
Azure Migration Program Pitch Deck
 

Viewers also liked

基于Aws的dev ops实践指南 王毅
基于Aws的dev ops实践指南 王毅基于Aws的dev ops实践指南 王毅
基于Aws的dev ops实践指南 王毅
Mason Mei
 

Viewers also liked (20)

如何利用 Amazon EMR 及Athena 打造高成本效益的大數據環境
如何利用 Amazon EMR 及Athena 打造高成本效益的大數據環境如何利用 Amazon EMR 及Athena 打造高成本效益的大數據環境
如何利用 Amazon EMR 及Athena 打造高成本效益的大數據環境
 
客戶導入雲端的經驗分享 [Panel Discussion]
客戶導入雲端的經驗分享 [Panel Discussion]客戶導入雲端的經驗分享 [Panel Discussion]
客戶導入雲端的經驗分享 [Panel Discussion]
 
如何規劃與執行大型資料中心遷移和案例分享
如何規劃與執行大型資料中心遷移和案例分享如何規劃與執行大型資料中心遷移和案例分享
如何規劃與執行大型資料中心遷移和案例分享
 
無伺服器架構和Containers on AWS入門
無伺服器架構和Containers on AWS入門 無伺服器架構和Containers on AWS入門
無伺服器架構和Containers on AWS入門
 
基于Aws的dev ops实践指南 王毅
基于Aws的dev ops实践指南 王毅基于Aws的dev ops实践指南 王毅
基于Aws的dev ops实践指南 王毅
 
基于AWS Lambda的无服务器架构在Strikingly中的应用
基于AWS Lambda的无服务器架构在Strikingly中的应用基于AWS Lambda的无服务器架构在Strikingly中的应用
基于AWS Lambda的无服务器架构在Strikingly中的应用
 
AWS ELB Tips & Best Practices
AWS ELB Tips & Best PracticesAWS ELB Tips & Best Practices
AWS ELB Tips & Best Practices
 
初探 AWS 平台上的 Docker 服務
初探 AWS 平台上的 Docker 服務初探 AWS 平台上的 Docker 服務
初探 AWS 平台上的 Docker 服務
 
2016 AWS Summit TPE - Hiiir 如何透過 AWS IAM 做好雲端權限控管
2016 AWS Summit TPE - Hiiir 如何透過 AWS IAM 做好雲端權限控管2016 AWS Summit TPE - Hiiir 如何透過 AWS IAM 做好雲端權限控管
2016 AWS Summit TPE - Hiiir 如何透過 AWS IAM 做好雲端權限控管
 
AWS電商和零售業解決方案介紹
AWS電商和零售業解決方案介紹AWS電商和零售業解決方案介紹
AWS電商和零售業解決方案介紹
 
初探AWS 平台上的 NoSQL 雲端資料庫服務
初探AWS 平台上的 NoSQL 雲端資料庫服務初探AWS 平台上的 NoSQL 雲端資料庫服務
初探AWS 平台上的 NoSQL 雲端資料庫服務
 
以AWS Lambda與Amazon API Gateway打造無伺服器後端
以AWS Lambda與Amazon API Gateway打造無伺服器後端以AWS Lambda與Amazon API Gateway打造無伺服器後端
以AWS Lambda與Amazon API Gateway打造無伺服器後端
 
AWS Summit OaaS Talk by ChinaNetCloud
AWS Summit OaaS Talk by ChinaNetCloudAWS Summit OaaS Talk by ChinaNetCloud
AWS Summit OaaS Talk by ChinaNetCloud
 
(SDD422) Amazon VPC Deep Dive | AWS re:Invent 2014
(SDD422) Amazon VPC Deep Dive | AWS re:Invent 2014(SDD422) Amazon VPC Deep Dive | AWS re:Invent 2014
(SDD422) Amazon VPC Deep Dive | AWS re:Invent 2014
 
Amazon EC2 and AWS Elastic Beanstalk Introduction
Amazon EC2 and AWS Elastic Beanstalk IntroductionAmazon EC2 and AWS Elastic Beanstalk Introduction
Amazon EC2 and AWS Elastic Beanstalk Introduction
 
Getting Started with AWS EC2. From Zero to Hero
Getting Started with AWS EC2. From Zero to HeroGetting Started with AWS EC2. From Zero to Hero
Getting Started with AWS EC2. From Zero to Hero
 
1. 利用微服務架構建立雲端影音平台 (Building Media Platform by Microservices Architecture)
1.	利用微服務架構建立雲端影音平台 (Building Media Platform by Microservices Architecture)1.	利用微服務架構建立雲端影音平台 (Building Media Platform by Microservices Architecture)
1. 利用微服務架構建立雲端影音平台 (Building Media Platform by Microservices Architecture)
 
管理程式對AWS LAMBDA持續交付
管理程式對AWS LAMBDA持續交付管理程式對AWS LAMBDA持續交付
管理程式對AWS LAMBDA持續交付
 
AWS Elastic Beanstalk運作微服務與Docker
AWS Elastic Beanstalk運作微服務與Docker AWS Elastic Beanstalk運作微服務與Docker
AWS Elastic Beanstalk運作微服務與Docker
 
Aws容器服务详解
Aws容器服务详解Aws容器服务详解
Aws容器服务详解
 

Similar to 透過Amazon CloudFront 和AWS WAF來執行安全的內容傳輸

Best practices for content delivery using amazon cloud front
Best practices for content delivery using amazon cloud frontBest practices for content delivery using amazon cloud front
Best practices for content delivery using amazon cloud front
Amazon Web Services
 

Similar to 透過Amazon CloudFront 和AWS WAF來執行安全的內容傳輸 (20)

Secure Content Delivery Using Amazon CloudFront and AWS WAF
Secure Content Delivery Using Amazon CloudFront and AWS WAFSecure Content Delivery Using Amazon CloudFront and AWS WAF
Secure Content Delivery Using Amazon CloudFront and AWS WAF
 
Secure Content Delivery Using Amazon CloudFront and AWS WAF
Secure Content Delivery Using Amazon CloudFront and AWS WAFSecure Content Delivery Using Amazon CloudFront and AWS WAF
Secure Content Delivery Using Amazon CloudFront and AWS WAF
 
Secure Content Delivery Using Amazon CloudFront
Secure Content Delivery Using Amazon CloudFrontSecure Content Delivery Using Amazon CloudFront
Secure Content Delivery Using Amazon CloudFront
 
(STG205) Secure Content Delivery Using Amazon CloudFront
(STG205) Secure Content Delivery Using Amazon CloudFront(STG205) Secure Content Delivery Using Amazon CloudFront
(STG205) Secure Content Delivery Using Amazon CloudFront
 
Secure Content Delivery Using Amazon CloudFront and AWS WAF
Secure Content Delivery Using Amazon CloudFront and AWS WAFSecure Content Delivery Using Amazon CloudFront and AWS WAF
Secure Content Delivery Using Amazon CloudFront and AWS WAF
 
AWS re:Invent 2016: Offload Security Heavy-lifting to the AWS Edge (CTD204)
AWS re:Invent 2016: Offload Security Heavy-lifting to the AWS Edge (CTD204)AWS re:Invent 2016: Offload Security Heavy-lifting to the AWS Edge (CTD204)
AWS re:Invent 2016: Offload Security Heavy-lifting to the AWS Edge (CTD204)
 
SRV206 Getting Started with Amazon CloudFront Content Delivery Network
SRV206 Getting Started with Amazon CloudFront Content Delivery NetworkSRV206 Getting Started with Amazon CloudFront Content Delivery Network
SRV206 Getting Started with Amazon CloudFront Content Delivery Network
 
AWS re:Invent 2016: Introduction to Amazon CloudFront (CTD205)
AWS re:Invent 2016: Introduction to Amazon CloudFront (CTD205)AWS re:Invent 2016: Introduction to Amazon CloudFront (CTD205)
AWS re:Invent 2016: Introduction to Amazon CloudFront (CTD205)
 
Deep Dive on Lambda@Edge - August 2017 AWS Online Tech Talks
Deep Dive on Lambda@Edge - August 2017 AWS Online Tech TalksDeep Dive on Lambda@Edge - August 2017 AWS Online Tech Talks
Deep Dive on Lambda@Edge - August 2017 AWS Online Tech Talks
 
Deep Dive on Accelerating Content, APIs, and Applications with Amazon CloudFr...
Deep Dive on Accelerating Content, APIs, and Applications with Amazon CloudFr...Deep Dive on Accelerating Content, APIs, and Applications with Amazon CloudFr...
Deep Dive on Accelerating Content, APIs, and Applications with Amazon CloudFr...
 
(STG206) Using Amazon CloudFront For Your Websites & Apps
(STG206) Using Amazon CloudFront For Your Websites & Apps(STG206) Using Amazon CloudFront For Your Websites & Apps
(STG206) Using Amazon CloudFront For Your Websites & Apps
 
AWS Summit Auckland 2014 | Understanding AWS Security
AWS Summit Auckland 2014 | Understanding AWS Security AWS Summit Auckland 2014 | Understanding AWS Security
AWS Summit Auckland 2014 | Understanding AWS Security
 
AWS Webcast - Best Practices for Content Delivery using Amazon CloudFront
AWS Webcast - Best Practices for Content Delivery using Amazon CloudFrontAWS Webcast - Best Practices for Content Delivery using Amazon CloudFront
AWS Webcast - Best Practices for Content Delivery using Amazon CloudFront
 
Best practices for content delivery using amazon cloud front
Best practices for content delivery using amazon cloud frontBest practices for content delivery using amazon cloud front
Best practices for content delivery using amazon cloud front
 
SRV418 Deep Dive on Accelerating Content, APIs, and Applications with Amazon ...
SRV418 Deep Dive on Accelerating Content, APIs, and Applications with Amazon ...SRV418 Deep Dive on Accelerating Content, APIs, and Applications with Amazon ...
SRV418 Deep Dive on Accelerating Content, APIs, and Applications with Amazon ...
 
Protecting Your Data in AWS
Protecting Your Data in AWSProtecting Your Data in AWS
Protecting Your Data in AWS
 
Securing Your Data in AWS
Securing Your Data in AWSSecuring Your Data in AWS
Securing Your Data in AWS
 
Understanding AWS Security
Understanding AWS SecurityUnderstanding AWS Security
Understanding AWS Security
 
Introduction to AWS Security
Introduction to AWS SecurityIntroduction to AWS Security
Introduction to AWS Security
 
SRV418 Deep Dive on Accelerating Content, APIs, and Applications with Amazon ...
SRV418 Deep Dive on Accelerating Content, APIs, and Applications with Amazon ...SRV418 Deep Dive on Accelerating Content, APIs, and Applications with Amazon ...
SRV418 Deep Dive on Accelerating Content, APIs, and Applications with Amazon ...
 

More from Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

More from Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 
Come costruire un'architettura Serverless nel Cloud AWS
Come costruire un'architettura Serverless nel Cloud AWSCome costruire un'architettura Serverless nel Cloud AWS
Come costruire un'architettura Serverless nel Cloud AWS
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

透過Amazon CloudFront 和AWS WAF來執行安全的內容傳輸

  • 1. Eric Chu, eCloudvalley Digital Technology Secure Content Delivery Using Amazon CloudFront
  • 2. What to Expect from the Session In this session we will talk about: • Why security matters • Key aspects of security • How Amazon CloudFront can help • Best practices for secured delivery on Amazon CloudFront
  • 3. Overview: Why Security Matters • Customer Trust • Regulatory Compliance • Data Privacy
  • 4. How AWS Can Help Infrastructure Security Application Security Services Security In the cloud, security is a shared responsibility https://aws.amazon.com/compliance/shared-responsibility-model/ Encrypt data in transit Encrypt data at rest Protect your AWS Credentials Rotate your keys Secure your application, OS, Stack and AMIs Enforce IAM policies Use MFA, VPC, Leverage S3 bucket policies EC2 Security groups EFS in EC2, ACM, etc. SOC 1,2,3 ISO 27001/2 Certification PCI DSS 2.0 Level 1-5 HIPAA/SOX Compliance FedRAMP, FISMA & DIACAP ITAR How we secure our infrastructure How can you secure your application? What security options and features are available to you?
  • 5. How CloudFront Can Help Infrastructure Security Application Security Services Security Security on CloudFront SSL/TLS Options Private Content Origin Access Identities Web Application Firewall AWS CloudTrail IAM Policies Origin Protection Rotate Keys Rotate Certificates PCI DSS 2.0 Level 1 ISO 9001, 27001, 27017, 27018
  • 6. How CloudFront Can Help What CloudFront does automatically What you can do using CloudFront features + = What should you do? Highly secure content delivery
  • 7. Infrastructure Security How we secure our infrastructure Infrastructure Security Application Security Services Security
  • 8. Infrastructure Security Facilities Physical Security Cache Infrastructure Network Infrastructure + = What should you do? Highly Secure Content Delivery
  • 9. Infrastructure Security • Bastion hosts for maintenance • Two-factor authentication • Encryption • Separation to enhance containment • Testing & metrics CloudFront Edge Location x
  • 11. Services Security Security options and features available on CloudFront Infrastructure Security Application Security Services Security
  • 12. Services Security High Security Ciphers PFS OCSP Stapling Session Tickets SSL/TLS Options Private Content Trusted Signers Web Application Firewall AWS CloudTrail AWS Certificate Manager + = What should you do? Highly Secure Content Delivery
  • 13. CloudFront can protect ‘Data in Transit’
  • 14. CloudFront Protects Data in Transit Origin Edge Location User Request A • Deliver content over HTTPS to protect data in transit • HTTPS Authenticates CloudFront to Viewers • HTTPS Authenticates Origin to CloudFront
  • 15. CloudFront enables advanced SSL features automatically
  • 16. Advanced SSL/TLS • Improved Security • High security ciphers • Perfect Forward Secrecy • Improved SSL Performance • Online Certificate Status Protocol (OCSP Stapling) • Session Tickets
  • 17. Advanced SSL/TLS: Improved Security • CloudFront uses high security ciphers • Employs ephemeral key exchange • Enables Perfect Forward Secrecy CloudFront Edge location
  • 18. Advanced SSL/TLS: Improved Performance • Session Tickets • Online Certificate Status Protocol (OCSP Stapling)
  • 19. Session Tickets • Session tickets allow client to resume session • CloudFront sends encrypted session data to client • Client does an abbreviated SSL handshake CloudFront Edge location
  • 20. OCSP Stapling 1 2 3 4 5 Client OCSP Responder Origin Server Amazon CloudFront 1) Client sends TLS Client Hello 2) CloudFront requests certificate status from OCSP responder 3) OCSP responder sends certificate status 4) CloudFront completes TLS handshake with client 5) Request/response from Origin Server
  • 21. OCSP Stapling … OCSP Stapling Client Side Revocation Checks 0 50 100 150 200 250 (time in milliseconds) 0 50 100 150 200 250 (time in milliseconds) TCP Handshake Client Hello Server Hello DNS for OCSP Responder TCP to OCSP Responder OCSP Request/Response … Follow Certificate Chain Complete Handshake Application Data 30% Improvement 120 ms faster
  • 22. Validate Origin Certificate • CloudFront validates SSL certificates to origin Origin domain name must match Subject Name on certificate Certificate must be issued by a Trusted CA Certificate must be within expiration window
  • 23. But there are things you need to do
  • 24. Deliver Content using HTTPS • CloudFront makes it easy • Create one distribution, and deliver both HTTP & HTTPS content • There are other options as well: • Strict HTTPS • HTTP to HTTPS redirect
  • 25. CloudFront TLS Options • Default CloudFront SSL Domain Name • CloudFront certificate shared across customers • When to use? • Example: dxxx.cloudfront.net • SNI Custom SSL • Bring your own SSL certificate • OR use AWS Certificate Manager • Relies on the SNI extension of the Transport Layer Security protocol • When to use? • Example: www.mysite.com • Some older browsers/OS do not support SNI extension • Dedicated IP Custom SSL • Bring your own SSL certificate • OR use AWS Certificate Manager • CloudFront allocates dedicated IP addresses to serve your SSL content • When to use? • Example: www.mysite.com • Supported by all browsers/OS
  • 26. Before (time-consuming & complex) 3rd Party Certificate Authority 3-5 days Upload to IAM via AWS CLI Connect to CloudFront via AWS CLI After (simple & automated & super fast) AWS Certificate Manager End-to-end process within minutes Using a couple of mouse clicks on the console Integrated with AWS Certificate Manager
  • 28. MapBox uses SNI Custom SSL • They wanted to use a custom domain • xxxxx.mapbox.com • Their clients support TLS • They wanted to use an economical option
  • 29. HTTPS Usage Patterns • Half bridge TLS termination • Full bridge TLS termination
  • 30. Half Bridge TLS Termination CloudFront HTTP • Better performance by leveraging HTTP connections to origin region
  • 31. Full Bridge TLS Termination Amazon CloudFront HTTPS • Secured connection all the way to origin • Use origin ‘Match Viewer’ or ‘HTTPS Only’ region
  • 32. MapBox uses multiple origins • Have multiple API endpoints (origin servers) • One with Half Bridge: HTTP from Edge to Origin • Second with Full Bridge: HTTPS from Edge to Origin
  • 33. You are not done yet… You need to protect content cached at the Edge
  • 34. Access Control • What if you want to… • Deliver content only to selected customers • Allow access to content only until ‘time n’ • Allow only certain IPs to access content
  • 35. Access Control: Private Content • Signed URLs • Add signature to the Querystring in URL • Your URL changes • When should you use it? • Restrict access to individual files • Users are using a client that doesn't support cookies • You want to use an RTMP distribution • Signed Cookies • Add signature to a cookie • Your URL does not change • When should you use it? • Restrict access to multiple files • You don’t want to change URLs
  • 36. Access Control: Private Content • Here is an example of a policy statement for signed URLs
  • 37. Access Control: Private Content • Under development mode? • Make CloudFront accessible only from your “Internal IP Addresses”
  • 38. You are still not done… What if you want to restrict access based on parameters in the request?
  • 39. Amazon CloudFront Edge Location Serving Unnecessary Requests Costs Money Scraper Bot Host: www.internetkitties.com User-Agent: badbot Accept: image/png,image/*;q=0.8,*/*;q=0.5 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Referer: http://www.InTeRnEkItTiEs.com/ Connection: keep-alive AWS WAF Host: www.internetkitties.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64)….. Accept: image/png,image/*;q=0.8,*/*;q=0.5 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Referer: http://www.mysite.com/ Connection: keep-alive
  • 40. Amazon CloudFront Edge Location Access Control: Web Application Firewall Scraper Bot Host: www.internetkitties.com User-Agent: badbot Accept: image/png,image/*;q=0.8,*/*;q=0.5 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Referer: http://www.InTeRnEkItTiEs.com/ Connection: keep-alive AWS WAF Host: www.internetkitties.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64)….. Accept: image/png,image/*;q=0.8,*/*;q=0.5 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Referer: http://www.mysite.com/ Connection: keep-alive
  • 41. MapBox uses AWS WAF to protect from bots • Good Users Bad Guys Serve r AWS WAF Logs Threat Analysis Rule Updater
  • 42. AWS WAF example: A technical implementation • Blocking bad bots dynamically with AWS WAF web ACLs
  • 43. AWS WAF Example: Blocking Bad Bots • What We Need… • IPSet: contains our list of blocked IP addresses • Rule: blocks requests if requests match IP in our IPSet • WebACL: allow requests by default, contains our Rule • and… • Mechanism to detect bad bots • Mechanism to add bad bot IP address to IPSet
  • 44. AWS WAF Example: Detecting Bad Bots • Use robots.txt to specify which areas of your site or webapp should not be scraped • Place file in your web root • Ensure there are links pointing to non- scrapable content • Hide a trigger script that normal users don’t see and good bots ignore • $ cat webroot/robots.txt • User-agent: * • Disallow: /honeypot/ • <a href="/honeypot/" class="hidden" aria- hidden="true">click me</a>
  • 45. AWS WAF Example: Blacklist Bad Bots • Bad bots (ignoring your robots.txt) will request the hidden link • Trigger script will detect the source IP of the request • Trigger script requests change token • Trigger script adds source IP to IPSet blacklist • WebACL will block subsequent request from that source • $ aws --endpoint-url https://waf.amazonaws.com/ waf get- change-token • { • "ChangeToken": "acbc53f2-46db-4fbd- b8d5-dfb8c466927f” • } • $ aws --endpoint-url https://waf.amazonaws.com/ waf update-ip- set --cli-input-json '{ "IPSetId": ”<<IP SET ID>>", "ChangeToken": "acbc53f2-46db- 4fbd-b8d5-dfb8c466927f", "Updates": [ { "Action": "INSERT", "IPSetDescriptor": { "Type": "IPV4", "Value": ”<<SOURCE IP>>/32" } } ] }’ • { • "ChangeToken": "acbc53f2-46db-4fbd- b8d5-dfb8c466927f” • }
  • 46. Preconfigured Protection & Tutorials https://aws.amazon.com/waf/preconfiguredrules/
  • 47. Types of attacks that need automation HTTP floods Scans & probesIP reputation lists Bots & scrapers Attackers
  • 48. Application Security How can you secure your application and origin? Infrastructure Security Application Security Services Security
  • 49. Application Security IAM Policies Origin Protection OAI Rotate Keys Rotate Certificates + = What should you do? Highly secure content delivery
  • 50. Hackers could still bypass CloudFront to access your origin…
  • 51. Access Control: Restricting Origin Access • Amazon S3 • Origin Access Identify (OAI) • Prevents direct access to your Amazon S3 bucket • Ensures performance benefits to all customers • Custom Origin • Block by IP Address • Pre-shared Secret Header • Whitelist only CloudFront • Protects origin from overload • Ensures performance benefits to all customers
  • 52. Object Access Identity (OAI) • Only CloudFront can access Amazon S3 bucket • We make it simple for you Amazon CloudFront Region Amazon S3 bucket Custom Origin
  • 53. Shield Custom Origin 1. Whitelisting CloudFront IP Range 2. Whitelist a pre-shared secret origin header Amazon CloudFront Region Amazon S3 bucket Custom Origin
  • 54. Shield Custom Origin • Subscribe to SNS notifications on changes to IP ranges • Automatically update security groups • https://github.com/awslabs/aws-cloudfront-samples AWS Lambda Amazon CloudFront Amazon SNS Security Group Web app server Web app server AWS IP Ranges Update IP Range SNS Message
  • 55. Services Security: IAM • AWS Managed Policies or create custom policies • Regulate access to CloudFront APIs • Describe user role or permissions
  • 56. Origin Best Practices • 1. Match Viewer Origin Protocol Policy • Enable Only TLS 1.1 or 1.2 to Origin • Enforce HTTPS Only Connections to Origin • 2. Restrict Access using Security Groups & Shared Secret • 3. Use a SHA256 certificate security group
  • 57. Origin Best Practices • 4. Use ELB with Custom certificate • 5. Use ELB Pre-defined Policy • 6. Send HSTS Header • *Strict-Transport-Security: max-age=15552000; • *X-Frame-Options: SAMEORIGIN • *X-XSS-Protection: 1; mode=block Options You can request an SSL Certificate from AWS Certificate Manager
  • 58. Services Security : IAM Examples • Example 1: Create groups with just access to create invalidations • Example 2: Just read access to your distributions & configuration
  • 59. AWS CloudTrail • Record CloudFront API calls history for: • Security analysis • Resource change tracking • Compliance auditing CloudWatch Alarm CloudTrailCloudFront Distribution Updates
  • 60. How to validate your security configurations https://www.ssllabs.com/ssltest/