GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - robertd/alpine-aws-cdk: Minimal AWSCLI & AWS-CDK & NodeJS/NPM built on top of Alpine Linux Docker Image

BranchesTags
Open more actions menu

Latest commit

 

History

382 Commits
382 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
.dockerignore
.dockerignore
 
 
Dockerfile.v2
Dockerfile.v2
 
 
README.md
README.md
 
 

Repository files navigation

Minimal AWS-CLI & AWS-CDK & NodeJS/NPM/Yarn built on top of Alpine Linux Docker Image

This is a great base image for running aws-cdk in CI/CD environments.

Supported Docker versions

This image is officially supported on Docker version 18.09.2+.

Support for older versions is provided on a best-effort basis.

Contributing

You are invited to contribute new features, fixes, or updates, large or small.

I am always thrilled to receive pull requests, and do my best to process them as fast as I can.

Usage

Synthesize a CDK stack

If the current directory contains a CDK App:

docker run --rm -v $(pwd):/app -w /app robertd/alpine-aws-cdk /bin/sh -c 'cdk synth'

If you want to synthesize all stacks in a TypeScript based CDK multi stack application:

docker run --rm -it -v $(pwd):/app -w /app \
  -e AWS_DEFAULT_REGION=<your_aws_region> \
  -e AWS_ACCESS_KEY_ID=<your_access_key_id> \
  -e AWS_SECRET_ACCESS_KEY=<your_secret_access_key> \
  robertd/alpine-aws-cdk /bin/sh -c "cdk --app 'npx ts-node bin/cdk-app-multi-stack.ts' synth '*'"

Deploy a CDK stack with local AWS configuration

Deploy the stack using the local default AWS environment:

docker run --rm -v $(pwd):/app -v ~/.aws/:/root/.aws -w /app robertd/alpine-aws-cdk /bin/sh -c 'cdk deploy'

If you set the --require-approval option to never in the cdk.jsonfile and CDK detects security-sensitive elements in the stack you will get the following warning and need to use the -it docker option for an interactive session:

"--require-approval" is enabled and stack includes security-sensitive updates, but terminal (TTY) is not attached so we are unable to get a confirmation from the user

This also exposes all credentials stored in your AWS configuration. To avoid this inject an AWS environment explicitely by exporting an access key id, the corresponding secret and a region:

docker run --rm -it -v $(pwd):/app -w /app \
  -e AWS_DEFAULT_REGION=<your_aws_region> \
  -e AWS_ACCESS_KEY_ID=<your_access_key_id> \
  -e AWS_SECRET_ACCESS_KEY=<your_secret_access_key> \
  robertd/alpine-aws-cdk /bin/sh -c 'cdk deploy'

Destroy a CDK stack

To destroy a CDK stack you need an interactive process using the -it option:

docker run --rm -it -v $(pwd):/app -v ~/.aws/:/root/.aws -w /app robertd/alpine-aws-cdk /bin/sh -c 'cdk destroy'

Create a new CDK stack

To initialize a new CDK stack with Typescript flavor:

run --rm -it -v $(pwd):/app -v ~/.aws/:/root/.aws -w /app robertd/alpine-aws-cdk /bin/sh -c 'cdk init --language typescript sample-app'

About

Minimal AWSCLI & AWS-CDK & NodeJS/NPM built on top of Alpine Linux Docker Image

hub.docker.com/r/robertd/alpine-aws-cdk

Topics

aws-cdkdocker

Resources

Readme
Activity

Stars

12 stars

Watchers

2 watching

Forks

14 forks
Report repository

Releases

Packages

Used by

Contributors

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.