-
Notifications
You must be signed in to change notification settings - Fork 56
Description
First of all, thank you @Envek and others for both the great writeup at https://evilmartians.com/chronicles/serverless-typescript-a-complete-setup-for-aws-sam-lambda and for this template repo.
This is my first time using AWS SAM in general, and it's been tricky with Typescript.
Problem
When running sam local start-api
, every request I make to http://127.0.0.1:3000/ triggers a rebuild of the dependency layer.
Steps to reproduce
- Clone fresh copy of repo and walk through the setup
sam local start-api
- Visit http://127.0.0.1:3000/
The first visit will build the image as expected.
When refreshing the browse, based on this comment, I would expect the image not to rebuild since no source code would have changed.
However, on each request, the image appears to be rebuilt with the following log line:
RuntimeDependenciesLayer is a local Layer in the template
The time it takes to rebuild this image makes it difficult to develop my frontend.
The workaround I have right now is to just point my frontend at my dev
environment in AWS, but I'd prefer to be able to run both front & backend locally.