Bug: Using Rust SDK - CodeUri in SAM Template creates wrong S3 zip archive for upload #7713
Labels
stage/needs-triage
Automatically applied to new issues and PRs, indicating they haven't been looked at.
Description:
Im writing Lambdas in Rust and using SAM to build and deploy. I am expecting to use the same 'template.yaml' file for both.
However, when running 'sam build' the CodeUri settings needs to be to the folder where the Cargo.toml file is located.
However, when I run 'sam deploy' (with the same template file) it zips up EVERYTHING in that same directory which includes all debug/release output artifacts and any thing else in there. The resultant zip that goes up to S3 for deployment is often over 250mb so fails to deploy.
In reality, I only want to deploy the 'bootstrap' target file which is about 1.5mb and lives under ./src//target/lambda// directory.
The only work around is to change the CodeUri setting for each lambda to something different betweem 'sam build' and 'sam deploy'
This seems like a bug. Ive been through loads of docs but cant find anything related to this issue for Rust with SAM
The text was updated successfully, but these errors were encountered: