Pulumi and LocalStack — beyond the basics

Introduction

The Application and its Infrastructure

The Sample

  • Modularized Pulumi
  • Running Pulumi locally with LocalStack
  • TDD infrastructure code and an AWS Lambda calling DynamoDB
Bitbucket logo

Acknowledgements

Modularized Pulumi

Outputs / Inputs

Resources

AWS tags

Pulumi + LocalStack

Stack templates

Dockerized Lambdas

TDD Infra + Lambda + DB

Unit tests…

Stack class

Result type

Table class

Lambda class

AbstractLambda class

Functional tests…

Contact resource

  • that Pulumi has hooked up the API Gateway and Lambda properly
  • that LocalStack is emulating the AWS services we need sufficiently well
  • and most importantly, that our Lambda actually does talk to DynamoDB correctly at runtime (as the unit tests have mocked this out)

--

--

CTO | Restaurateur | Invest/Advise/Ex: Mass Dynamics, Cookaborough, Secure Code Warrior, Canva, Atlassian, Hashrocket, ThoughtWorks, OzEmail | YOW! Conferences

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
Josh Graham

CTO | Restaurateur | Invest/Advise/Ex: Mass Dynamics, Cookaborough, Secure Code Warrior, Canva, Atlassian, Hashrocket, ThoughtWorks, OzEmail | YOW! Conferences