You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm deploying a couple of lambdas to localstack using nodejs aws cdk. When only a single lambda is deployed, everything works fine. However when I deploy a second one, the first lambda becomes unusable because it fails to start with an error like this
An error occurred (ServiceException) when calling the Invoke operation (reached max retries: 2): [ab187a47-fc9c-48af-801b-51cf9716e147] Internal error while executing lambda localstack-schema-export-test-rest-api:None. Caused by AssignmentException: Could not start new environment: ContainerException:
While the second lambda works fine. Even if I then redeploy using cdk without the second lambda, the first lambda stays unusable until I clear the localstack docker container.
Example cdk:
const app = new App();
class TestStack extends Stack {
constructor(scope: App) {
super(scope);
new nodejs.NodejsFunction(this, 'handler', {
functionName: `first-lambda`,
timeout: Duration.seconds(30),
runtime: lambda.Runtime.NODEJS_22_X,
});
new nodejs.NodejsFunction(this, 'handler', {
functionName: `second-lambda`,
timeout: Duration.seconds(30),
runtime: lambda.Runtime.NODEJS_22_X,
});
}
}
new TestStack(app, 'TestStack');
Expected Behavior
All deployed lambdas are able to be invoked
How are you starting LocalStack?
With the localstack script
Steps To Reproduce
How are you starting localstack (e.g., bin/localstack command, arguments, or docker-compose.yml)
Welcome to LocalStack! Thanks for reporting your first issue and our team will be working towards fixing the issue for you or reach out for more background information. We recommend joining our Slack Community for real-time help and drop a message to LocalStack Support if you are a licensed user! If you are willing to contribute towards fixing this issue, please have a look at our contributing guidelines.
I am unable to reproduce the issue, and we expect multiple Lambda functions to work properly. The following screenshot demonstrates two Lambda functions being invoked simultaneously:
What extra details does debug logging provide using DEBUG=1 localstack start?
Sidenote: Services are loaded lazily, and the SERVICES variable is not required unless you want to configure eager service loading.
I found the issue - one of the lambdas had architecture set to ARM_64, while the other didn't. If I don't set it, or set it to the same architecture for both it works.
Is there an existing issue for this?
Current Behavior
I'm deploying a couple of lambdas to localstack using nodejs aws cdk. When only a single lambda is deployed, everything works fine. However when I deploy a second one, the first lambda becomes unusable because it fails to start with an error like this
While the second lambda works fine. Even if I then redeploy using cdk without the second lambda, the first lambda stays unusable until I clear the localstack docker container.
Example cdk:
Expected Behavior
All deployed lambdas are able to be invoked
How are you starting LocalStack?
With the
localstack
scriptSteps To Reproduce
How are you starting localstack (e.g.,
bin/localstack
command, arguments, ordocker-compose.yml
)Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: