This examples demos LocalStack EC2 and SSM functionalities when using the Docker backend.
- LocalStack
- Docker
make
jq
Note: This demo involves the download of the Ubuntu Docker image weighing about 100MB
To install the dependencies:
make install
Run LocalStack with following enviroment flags:
LOCALSTACK_API_KEY=... EC2_VM_MANAGER=docker DEBUG=1 localstack start
Run the demo:
make run
You will see various operations being performed in the logs, starting with
- the creation of a Docker-backed EC2 instance
- command being sent to this instance through SSM
- retrieval standard output of this command
- snapshoting the running instance into a new AMI
- termination of the instance
This code is available under the Apache 2.0 license.