Prevent Image Build/Rebuild for sam local start-api ? #6678
Labels
area/local/start-api
sam local start-api command
blocked/close-if-inactive
Blocked for >14 days with no response, will be closed if still inactive after 7 days
type/question
We love
sam local start-api
, it has allowed us to change some developer workflows that mean a lot for our DUX/quality of life.We are leveraging
sam local start-api
with a CDKv2 IaC setupWe've noticed over time when we send a succession of API calls to the SAM local URL/server, the Docker container is rebuilt each time. Is this necessary ? Is there any built in way/option to avoid this?
Scenario:
An api with 5 endpoints running locally via
sam local start-api
issue 1 API call to each of the 5 endpoints back to back
Current:
Container is created & exits 5 times
example:
Invoking src.handler.handler (python3.10)
PowertoolsLayer17979D4B is a local Layer in the template
cvmlinspectingservicecommonsA6DCC1FF is a local Layer in the template
Building image............................
Using local image: samcli/lambda-python:3.10-arm64-3de4efa8f0a02d608ba35a629.
Desired:
Container is created & exits 1 times
The text was updated successfully, but these errors were encountered: