# Example of S3 Bucket Policy to allow from IP address and Domain name | |
{ | |
"Version": "2008-10-17", | |
"Id": "http referer policy example", | |
"Statement": [ | |
{ | |
"Sid": "Allow get requests originated from www.example.com and example.com", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "*" | |
}, | |
"Action": "s3:GetObject", | |
"Resource": "arn:aws:s3:::324324234324/*", | |
"Condition": { | |
"StringLike": { | |
"aws:Referer": [ | |
"https://www.devopsschool.com/*", | |
"https://devopsschool.com/*", | |
"https://devopsschool.com*", | |
"https://devopsschool.com" | |
] | |
} | |
} | |
}, | |
{ | |
"Sid": "Allow get requests originated from www.example.com and example.com", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "*" | |
}, | |
"Action": "s3:GetObject", | |
"Resource": "arn:aws:s3:::43223423432/*", | |
"Condition": { | |
"IpAddress": { | |
"aws:SourceIp": ["132.148.28.44/30","10.193.44.89/30"] | |
} | |
} | |
} | |
] | |
} |
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND