Setting up S3 locally
S3 is a highly available object storage service provided by AWS. As with most AWS services, it provides a REST API to interact with as well as an SDK.
In order to simulate S3 locally, we shall use S3mock
(https://github.com/adobe/S3Mock), a highly rated project on GitHub.
A Docker image is available for it, which also provides the configuration option to create a bucket from the start.
We shall add it to our Compose file and attach it to the internal network:
services: ... s3: image: adobe/s3mock ports: - 9090:9090 networks: - aws-internal environment: - initialBuckets=subscription-bucket
We will add a code snippet for it; thus, the following package needs to be included (the following commands need to be executed from the s3-snippet
directory...