I have domain and many subdomains... and many more subdomains will be created. I want to allow all the sub domains to use the actual domain bucket policy (S3).
For example: example.com
is my main domain and I want abc.example.com
, abcd.example.com
and abcde.example.com
to use the S3 bucket. Please note subdomains will be many and cannot type all names... my question is can we use wildcards like .example.com/
?
Below is my S3 bucket policy file:
Please note example.com
is use only for describing the issue.
{
"Version": "2012-10-17",
"Id": "Policy1444053343008",
"Statement": [
{
"Sid": "Stmt1444053339232",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::example.com/*"
}
]
}