Envek / Envek/aws-sam-typescript-layers-example
RuntimeDependenciesLayer rebuilding on every API request
- Dominant language
- TypeScript
- Stars
- 244
- Forks
- 56
- PR merge metrics
- No merged PRs in 30d
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](https://github.com/Envek/aws-sam-typescript-layers-example/blob/master/Makefile#L24), 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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.