-
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::<Bucket Name>",
"arn:aws:s3:::<Bucket Name>/*"
]
} ,
{
"Effect": "Allow",
"Action": "s3:ListAllMyBuckets",
"Resource": "*"
}
]
}
- permissions -> bucket policy
- Static Website Hosting
Enable website hosting
- Permissions
{
"Version": "2008-10-17",
"Statement": [
{
"Sid": "PublicReadForGetBucketObjects",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::<Bucket Name>/*"
}
]
}
{
"Version": "2008-10-17",
"Statement": [
{
"Sid": "PublicReadForGetBucketObjects",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::<Bucket Name>/*",
"Condition" : {
"IpAddress" : {
"aws:SourceIp": [
"<IP Address>/32",
"<IP Address Subnet>/24"
]
}
}
}
]
}