localstack-demo
localstack-demo copied to clipboard
Demo for setting up Localstack S3 in Node
A basic demo setting up Localstack's S3.
Read the tutorial here.
Or, spin things up here:
- Install Docker if you haven't already.
- Install the AWS CLI. Even though we aren't going to be working with "real" AWS, we'll use this to talk to our local docker containers.
- Run
aws configureto set up some credentials. You can enter dummy credentials here if you'd like.
- Copy the contents of
.env.exampleinto a new.envfile. - Initialize Localstack:
npm run localstack:init.
- This will create a new container, then stream the logs as it is setting up. It will start with
Waiting for all LocalStack services to be ready. After a few moments, you'll see a finalReady. When you do, press Ctrl+C to exit the logs.
- Configure the bucket: run
npm run localstack:config
- Note: If you used a different BUCKET_NAME in your
.envfile, make sure to change the instances ofdemo_bucketin thelocalstack:configscript in package.json to match..
Upload the test file:
npm run test-upload