Docker image containing AWS CLI, AWS shell, NodeJS, Serverless Framework, and some scripts to ease AWS deployments.
If you want to build and use your own local image
# build image locally
$ make dockerBuild
# go inside the container
$ make dockerShell
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=
AWS_ACCOUNT_ID=
# Cloudformation stack name to be created/updated/deleted
STACK_NAME=
# the cloudformation file path
CFN_FILE=
# the cloudformation params file
CFN_PARAMS_FILE=
Those environment variables must all be set
- using a file and passing it to
docker run --env-file path/to/file
(see example) - passing them to
docker run -e NAME1=value1 -e NAME2=value2
- a mix of both
- Change
SERVERLESS
ofDockerfile
- Change
SERVERLESS_VERSION
ofMakefile
- Build and test locally
- Commit and push the changes
- Tag the commit with the command
make gitTag
- Go to hub.docker.com
- In
Build Details
tab, you should now see the new tag kicking off
- Do the fixes you want to do
- Build and test locally
- Commit and push the changes
- Run
make gitTag
- Go to hub.docker.com
- In
Build Details
tab, you should now see build the tag kicking off
Here are some ways of using the image
- running one container per command (see example)
- running a container and stay inside it to execute the commands
The Docker image has the following:
- Node 6.10 (Alpine)
- aws-cli
- aws-shell
- Serverless Framework v1.4
- yarn
- zip: handy to zip your own serverless artefact
- envsubst: quite useful to create file based on a template using env vars
Some scripts has been written to help deploying to AWS (see example)
Name | Description |
---|---|
cfn-create-or-update.sh | Create or update a cloudformation |
cfn-delete.sh | Delete a cloudformation |
cfn-validate-template.sh | Validate a cloudformation template |