S3 Bucket Creation Restrict to Specific Name Pattern

0 votes

Is there a way to specify a bucket creation policy so that the a user with the assigned role can only create buckets with a specified name pattern such as company-dbbackup-* and no other name patterns?

For example, the user would be allowed to create bucket with names company-dbbackup-March2017 and company-dbbackup-fullarchive but not test-bucketname-invalid.

What I have right now:

{
    "Sid": "Stmt1493212897117",
    "Action": [
        "s3:CreateBucket",
        "s3:ListAllMyBuckets"
    ],
    "Effect": "Allow",
    "Resource": "arn:aws:s3:::*"
}

But this allows me to create buckets with any name.

Feb 10, 2022 in AWS by Rahul
• 2,080 points
378 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In AWS

+1 vote
2 answers

Want my AWS s3 Bucket to read Name from CloudWatch Event

CloudTrail events for S3 bucket level operations ...READ MORE

answered May 28, 2018 in AWS by Cloud gunner
• 4,670 points
2,017 views
0 votes
2 answers

How to rename a S3 bucket name?

Hi, You can rename your S3 bucket name. ...READ MORE

answered Oct 5, 2020 in AWS by akhtar
• 38,260 points
40,644 views
0 votes
0 answers

I want to get file name from key in S3 bucket wanted to read single file from list of file present in bucket

1 <class 'boto.s3.key.Key'> <Key: numbers-email, staging/Procured_Numbers_Status/procured_numbers_status_2019-05-15:06:09:04.csv> I ...READ MORE

May 15, 2019 in AWS by anonymous
6,902 views
+1 vote
3 answers

How to get ARN for s3 Bucket using aws cli .

An ARN is a non-opaque, constructible identifier, ...READ MORE

answered Aug 16, 2018 in AWS by Priyaj
• 58,100 points
5,559 views
0 votes
1 answer

How to copy .csv file from Amazon S3 bucket?

Boto3 is the library to use for ...READ MORE

answered Jul 6, 2018 in AWS by Priyaj
• 58,100 points
2,056 views
0 votes
1 answer
0 votes
1 answer

How to Restrict AWS Resource Access to a Specific IAM Role

You can use iam get-role to find the Role-Id and add ...READ MORE

answered Aug 13, 2018 in AWS by Archana
• 4,170 points
1,130 views
0 votes
2 answers

How to access files in S3 bucket from R?

You can take a look at the ...READ MORE

answered Aug 10, 2018 in AWS by Deepthi
• 300 points
6,574 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP