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

Next Django Version Will Have Better TestCases Isolation


Aenderungen vorbehalten

Github glossary of terms

octocat in front of a computer

Tutorial: How To Deploy Prometheus and Node Exporter as Containers on a Remote server (with $5)

Front-End vs Back-End for Non-Developers

Understanding S.O.L.I.D Principles

Introducing Deimos: Using Kafka as the Data Backbone for your Architecture

Composite Data Types in Golang

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

Creating an ECS Scheduled Task Using AWS CDK

Setting up Serverless Framework with AWS

Monitoring Lambdas using AWS Powertools

Build a Serverless web application on AWS using Lambda and API Gateway