Make creation of buckets optional
See original GitHub issueIt appears if the bucket does not exist, this plugin creates it in us-east-1
. Is there a command option instead to fail if the bucket does not exist? We manage bucket creation in Terraform, and don’t want this plugin creating random buckets in our AWS account.
options: {
bucketName: "will-create-if-it-doesnt-exist" // bad!
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
Creating a bucket - Amazon Simple Storage Service
When you create a bucket, you must choose a bucket name and Region. You can optionally choose other storage management options for the...
Read more >Creating Bucket Groups (Optional) - ServiceNow Developers
To create a bucket group, open Performance Analytics > Breakdowns > Bucket Groups. Click the New button. Configure the bucket group.
Read more >Create buckets | Cloud Storage
Set the following optional flags to have greater control over the creation of your bucket: --project : Specify the project ID or project...
Read more >Managing Buckets - Oracle Help Center
You cannot nest buckets—a bucket cannot contain other buckets. Required IAM Policy. To use Oracle Cloud Infrastructure, you must be granted ...
Read more >Create Bucket on S3 - general-immersionday
You must create a Bucket before storing data on Amazon S3. ... There may be additional restrictions depending on the region in which...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Documentation is definitely somewhere that we have room for improvement. At the moment you can find all of the config options (and descriptions of what they do) in src/constants.ts:
https://github.com/jariz/gatsby-plugin-s3/blob/a0532ed68ead8496004cfcba16456d709ee801ad/src/constants.ts#L26-L89
Good suggestion! Currently this isn’t something we have an option for, I can see why it would be useful. In my opinion, creating a bucket if it doesn’t already exist violates Principle of Least Astonishment. I’m hoping we can remove it as the default behaviour, but that will need to wait for the 1.0 release.
In the meantime I’d suggest not granting the plugin the IAM s3:CreateBucket permission. We haven’t yet published documentation for which permissions the plugin requires, but you can find a list in #39.