I’m having trouble getting started with an S3 bucket using Docker (tag s3-latest
). I am definitely struggling with the lack of documentation. So far I can manually create a bucket, IAM user, and access token.
Is there a more convenient way to create a bucket with fixed credentials to connect to?
- can you create a bucket / credentials on startup via environment variables without creating them manually?
- are there any default access credentials I can attach to the bucket?
- can I create fixed access credentials or must they be generated?
- is there a good way to pass the access credentials to my service programmatically (using Docker Compose)?
- are buckets private or public by default?
To avoid asking an XY question, I am trying to spin up an S3 bucket for local development so as to not require a real bucket for that. I am running my stack using Docker Compose. S3 credentials are passed to the app via environment variable, so in order for this to work with localstack I need to either
- make the bucket public (undesirable, not realistic)
- pass default access credentials
- create fixed access credentials and pass those
- create dynamic access credentials and hack them into the app’s environment variables somehow