SlideShare a Scribd company logo
1 of 19
Download to read offline
S3 Bucket Policies
Jiri Pihik
Identity Management, Automation
Concepts
Users
Instances
Services
Metadata
Configuration
Security
Data
Data read-only
S3 bucket layered permissions
Bucket policy
Metadata
Configuration
Security
Data
Data read-only
~ 46 permissions to define S3 bucket access
s3:PutBucketCORS
s3:PutBucketVersioning
s3:PutBucketWebsite
s3:DeleteBucketWebsite
s3:GetLifecycleConfiguration
s3:PutLifecycleConfiguration
s3:PutReplicationConfiguration
s3:GetReplicationConfiguration
...
Who are
you?
What IP
do you
have?
Is this right time to
access me?
Who are
you?
What IP
do you
have?
Is this right time to
access me? Which parts of me
you can access?
What can you do
here?
Can you set
lifecycle here?
Are you able to
write content?
Bucket access logging
my-s3-log-system
Example log
0b0fbd7ab5d1058f35535fec64595ed51f7fa26ef77ac8e5d88230898be92e2f my-corp-
bucket [21/Jan/2016:12:47:32 +0000] 125.12.36.95 arn:aws:sts::012345678912:
assumed-role/my-role/pihik 9E15D396E0071675 REST.PUT.OBJECT report.html
"PUT /report.html HTTP/1.1" 200 - - 5134 457 6 "-" "aws-cli/1.9.21 Python/2.7.11
Windows/7 botocore/1.3.21" -
aws-cli s3 upload object
Use cases
● Prevent unauthorized access to your S3 resources
● Enables you to store application configs, secrets in S3 bucket
● Enables development for 3rd parties
● Ensure only users from corp network can access your S3 resources
● S3 static websites
● Enables fine-grained permissions inside bucket - one folder for public access,
another one for internal assets
● Improve your compliance level
DEMO!
Example bucket policies
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"s3:PutObject"
],
"Effect": "Allow",
"Resource": "arn:aws:s3:::my-corp-bucket/reports/*.pdf",
"Condition": {
"IpAddress": {
"aws:SourceIp": "108.72.209.118"
}
}
}
]
}
3rd party vendor access
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Principal": "*",
"Action": "s3:*",
"Resource": "arn:aws:s3:::corp-bucket/tools/*",
"Condition": {
"NotIpAddress": {
"aws:SourceIp": [
"125.10.15.0/16",
"125.12.36.95",
"10.0.0.0/24"
]
}
}
}
]
}
restricted access only to corp network
How to read that crazy stuff?!
How to read that crazy stuff?!
Deny all S3 actions
on specified resource
IF
ip address IS NOT 125.x.x.x
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Principal": "*",
"Action": "s3:*",
"Resource": "arn:aws:s3:::corp-bucket/tools/*",
"Condition": {
"NotIpAddress": {
"aws:SourceIp": [
"125.10.15.0/16",
"125.12.36.95",
"10.0.0.0/24"
]
}
}
}
]
}
DENY
ALL S3
ACTIONS
ON SPECIFIED RESOURCE
IF
IP ADDRESS IS NOT
125.x.x.x, OR …OR ...
"Condition" : {
"DateGreaterThan" : {
"aws:CurrentTime" : "2016-02-09T12:00:00Z"
},
"DateLessThan": {
"aws:CurrentTime" : "2016-02-09T15:00:00Z"
},
"IpAddress" : {
"aws:SourceIp" : ["192.0.2.0/24", "203.0.113.0/24"]
}
}
Limited 3rd party bucket access
IP address AND specific time range
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Principal": "*",
"Action": "s3:*",
"Resource": "arn:aws:s3:::my-corp-bucket/finance/*",
"Condition": {
"Null": {
"aws:MultiFactorAuthAge": true
}
}
},
{
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:GetObject"
],
"Resource": "arn:aws:s3:::my-corp-bucket/public/*"
}
]
}
require MFA for sensitive data access
folder /public is accessible via internet

More Related Content

Similar to S3 Bucket Policies

Similar to S3 Bucket Policies (20)

(SEC402) Intrusion Detection in the Cloud | AWS re:Invent 2014
(SEC402) Intrusion Detection in the Cloud | AWS re:Invent 2014(SEC402) Intrusion Detection in the Cloud | AWS re:Invent 2014
(SEC402) Intrusion Detection in the Cloud | AWS re:Invent 2014
 
Amazon s3 adds new s3 event notifications for s3 lifecycle, s3 intelligent ti...
Amazon s3 adds new s3 event notifications for s3 lifecycle, s3 intelligent ti...Amazon s3 adds new s3 event notifications for s3 lifecycle, s3 intelligent ti...
Amazon s3 adds new s3 event notifications for s3 lifecycle, s3 intelligent ti...
 
Building a Data Lake on S3 for IoT Workloads
Building a Data Lake on S3 for IoT WorkloadsBuilding a Data Lake on S3 for IoT Workloads
Building a Data Lake on S3 for IoT Workloads
 
Query your data in S3 with SQL and optimize for cost and performance
Query your data in S3 with SQL and optimize for cost and performanceQuery your data in S3 with SQL and optimize for cost and performance
Query your data in S3 with SQL and optimize for cost and performance
 
Builders' Day - Best Practises for S3 - BL
Builders' Day - Best Practises for S3 - BLBuilders' Day - Best Practises for S3 - BL
Builders' Day - Best Practises for S3 - BL
 
Microsoft Azure News - 2018 March
Microsoft Azure News - 2018 MarchMicrosoft Azure News - 2018 March
Microsoft Azure News - 2018 March
 
Using CloudTrail to Enhance Compliance and Governance of S3 - AWS Online Tech...
Using CloudTrail to Enhance Compliance and Governance of S3 - AWS Online Tech...Using CloudTrail to Enhance Compliance and Governance of S3 - AWS Online Tech...
Using CloudTrail to Enhance Compliance and Governance of S3 - AWS Online Tech...
 
Microsoft Sentinel Deployment V1.pptx
Microsoft Sentinel Deployment V1.pptxMicrosoft Sentinel Deployment V1.pptx
Microsoft Sentinel Deployment V1.pptx
 
SRV208 S3 One Zone-IA and S3 Select GA
SRV208 S3 One Zone-IA and S3 Select GASRV208 S3 One Zone-IA and S3 Select GA
SRV208 S3 One Zone-IA and S3 Select GA
 
Compliance-Data-Archival
Compliance-Data-ArchivalCompliance-Data-Archival
Compliance-Data-Archival
 
Accelerated Data Lakes Deep Dive Webinar - Paul Macey
Accelerated Data Lakes Deep Dive Webinar - Paul MaceyAccelerated Data Lakes Deep Dive Webinar - Paul Macey
Accelerated Data Lakes Deep Dive Webinar - Paul Macey
 
Deep Dive on Amazon S3 Security and Management (E2471STG303-R1) - AWS re:Inve...
Deep Dive on Amazon S3 Security and Management (E2471STG303-R1) - AWS re:Inve...Deep Dive on Amazon S3 Security and Management (E2471STG303-R1) - AWS re:Inve...
Deep Dive on Amazon S3 Security and Management (E2471STG303-R1) - AWS re:Inve...
 
Deep Dive on Amazon S3 & Amazon Glacier Storage Management - STG311 - re:Inve...
Deep Dive on Amazon S3 & Amazon Glacier Storage Management - STG311 - re:Inve...Deep Dive on Amazon S3 & Amazon Glacier Storage Management - STG311 - re:Inve...
Deep Dive on Amazon S3 & Amazon Glacier Storage Management - STG311 - re:Inve...
 
STG311_Deep Dive on Amazon S3 & Amazon Glacier Storage Management
STG311_Deep Dive on Amazon S3 & Amazon Glacier Storage ManagementSTG311_Deep Dive on Amazon S3 & Amazon Glacier Storage Management
STG311_Deep Dive on Amazon S3 & Amazon Glacier Storage Management
 
Web scraping in python
Web scraping in pythonWeb scraping in python
Web scraping in python
 
Bigger, Better Bitbucket: Growing Git with Data Center
Bigger, Better Bitbucket: Growing Git with Data CenterBigger, Better Bitbucket: Growing Git with Data Center
Bigger, Better Bitbucket: Growing Git with Data Center
 
(STG401) Amazon S3 Deep Dive & Best Practices
(STG401) Amazon S3 Deep Dive & Best Practices(STG401) Amazon S3 Deep Dive & Best Practices
(STG401) Amazon S3 Deep Dive & Best Practices
 
AWS _Course Content.pdf
AWS _Course Content.pdfAWS _Course Content.pdf
AWS _Course Content.pdf
 
Understanding Security and Compliance in Microsoft Teams - M365 Saturday Bang...
Understanding Security and Compliance in Microsoft Teams - M365 Saturday Bang...Understanding Security and Compliance in Microsoft Teams - M365 Saturday Bang...
Understanding Security and Compliance in Microsoft Teams - M365 Saturday Bang...
 
PLNOG23 - Paweł Rzepa - Attacking AWS: the full cyber kill chain
PLNOG23 - Paweł Rzepa - Attacking AWS: the full cyber kill chainPLNOG23 - Paweł Rzepa - Attacking AWS: the full cyber kill chain
PLNOG23 - Paweł Rzepa - Attacking AWS: the full cyber kill chain
 

Recently uploaded

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
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
 
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
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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
 

S3 Bucket Policies