Skip to content

RuntimeDependenciesLayer rebuilding on every API request #11

@Patrick-Erichsen

Description

@Patrick-Erichsen

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

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions