Experiment with Lightsail instances that install Docker.
NOTE: This is for educational purposes primarily. If you'd like to adapt it for production use, you're more than welcome.
- Docker
- GnuMake
AWS (at time of writing) does not supply a pre-built policy for Lightsail so you can use the very simple policy included.
- Create the Lightsail IAM policy (
lightsail-iam.json
). - Create an IAM user that has CLI access, attaching the Lightsail IAM policy you created.
NOTE: For production usage, you would want to refine the allowable actions.
THis creates an ephermeral container so will call aws-configure for you. You may want to create your own docker run
command if that doesn't suit.
make aws-cli-run
Now that you're inside the AWS CLI container and have entered your access details, you're ready to create lightstail instances.
make create-instance INSTANCE_NAME=lightsail-docker-awesomeness
## Some time passes..
## Get a list of instances created
make get-instances
# Or the list with just the names only (handy for when you want to delete)
make get-active-names
# Clean-up
make delete-instance INSTANCE_NAME=lightsail-docker-awesomeness
This part is up to you. Below are some useful resources to continue learning about Lightsail.