lambda: two lambda.Code.fromDockerBuild() in same stack resolve to same hash artifact #30528
Labels
@aws-cdk/aws-lambda
Related to AWS Lambda
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
Describe the bug
my stack has two different lambda.Code.fromDockerBuild():
... and ...
Expected Behavior
The Dockerfile for each function should independently get built and the artifact deployed
Current Behavior
The artifact for the first function gets built and then gets deployed twice, for both functions.
i.e. incorrect artifact is deployed for the second function
While inspecting the
cdk.out
folder it's easy to see that only one artifact is builtReproduction Steps
cdk deploy
Possible Solution
Not a fix, but as a workaround perhaps you could allow
assetHash
to be overriddenAdditional Information/Context
both lambdas are in the same stack. the
imagePath
in the example is different in each file due to troubleshooting steps already taken. Making it a different value did not change the hashCDK CLI Version
2.134.0
Framework Version
No response
Node.js Version
18.19.1
OS
Windows 10
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: