Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Using Rust SDK - CodeUri in SAM Template creates wrong S3 zip archive for upload #7713

Open
deanchalk opened this issue Nov 20, 2024 · 0 comments
Labels
stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at.

Comments

@deanchalk
Copy link

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

@deanchalk deanchalk added the stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. label Nov 20, 2024
@deanchalk deanchalk changed the title Bug: Using Rist SDK - CodeUri in SAM Template creates wrong S3 zip archive for upload Bug: Using Rust SDK - CodeUri in SAM Template creates wrong S3 zip archive for upload Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at.
Projects
None yet
Development

No branches or pull requests

1 participant