Heading image


  1. Basic familiarity with AWS CDK for TypeScript.
  2. Read AWS CDK With TypeScript Foundations
  3. LocalStack installed
  4. Docker installed and an understanding of docker compose.

Getting started

Clone the working repo from the previous blog post and add some files for our LocalStack config.

Starting up LocalStack

Add the following to your docker-compose.yml file:

Updating our infrastructure to use AWS CDK Local

Once Docker is up and running, we need to amend our project code to allow for us to use aws-cdk-local.

Deploying our stack to LocalStack

Everything from our previous post has the code ready to deployed, so we can work through our lifecycle of synth and deploy but with the caveat that we use the local script:

Seeing our new bucket locally

We can now check our bucket was deployed successfully through the AWS CLI. You have two choices:

  1. Use the --endpoint argument with the AWS CLI to point to localhost:4566.
  2. Use the awslocal package which will automatically point to localhost:4566.

Tearing down our local stack

As per usual, we can go through the process of tearing down the local stack (or simply stopping the Docker containers).


Today’s post demonstrated how to use LocalStack to work on a local AWS environment.

Resources and further reading

  1. AWS CDK for TypeScript
  2. LocalStack
  3. awslocal package
  4. AWS CDK With TypeScript Foundations
  5. LocalStack installed
  6. Docker installed
  7. Working with the TypeScript AWS CDK blog series




Senior Engineer @ UsabilityHub. Formerly Culture Amp.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

My Top Big Data Python Libraries

Writing QGIS plugin using Python 3, a beginner’s guide

Golang arm64 docker image with CircleCI arm machine

Spring internal micro-service driven communication

Inspecting Animations With Chrome DevTools

image of abstract art with many layers

Now Offering Security Spot Checks

6/18/2021 Study Notes — Java Inheritance

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Dennis O'Keeffe

Dennis O'Keeffe

Senior Engineer @ UsabilityHub. Formerly Culture Amp.

More from Medium

AWS Managed Streaming for Apache Kafka : Streaming messages from producer to consumer using Amazon…

AWS — Explore About ELB (Elastic Load Balancers)

AWS Amplify Pitfalls and Solutions

Running Shell script on ec2 using API Gateway AWS | Developer Notes