question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make creation of buckets optional

See original GitHub issue

It 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:open
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
JoshuaWalshcommented, Apr 28, 2020

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

1reaction
JoshuaWalshcommented, Apr 28, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found