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: Workflow RustCargoLambdaBuilder does not support value "False" for building in source. Using default value "True". #7636

Closed
paulsmithkc opened this issue Nov 1, 2024 · 3 comments
Labels
area/build sam build command area/rust Related to Support of Rust/Cargo/Cargo Lambda in SAM CLI type/question

Comments

@paulsmithkc
Copy link

Description:

Tried testing out the Rust Hello World example but am running into some errors with sam build

$ sam build --beta-features
                                                                                                                              
Experimental features are enabled for this session.                                                                           
Visit the docs page to learn more about the AWS Beta terms https://aws.amazon.com/service-terms/.                             
                                                                                                                              
Starting Build use cache                                                                                                      
Cache is invalid, running build and copying resources for following functions (HelloWorldFunction)                            
Building codeuri: <...>/rust_app runtime: provided.al2023          
architecture: x86_64 functions: HelloWorldFunction                                                                            
Workflow RustCargoLambdaBuilder does not support value "False" for building in source. Using default value "True".            
 Running RustCargoLambdaBuilder:CargoLambdaBuild                                                                              

Build Failed
Error: RustCargoLambdaBuilder:CargoLambdaBuild - Cargo Lambda failed: Cannot find Cargo Lambda. Cargo Lambda must be installed on the host machine to use this feature. Follow the gettings started guide to learn how to install it: https://www.cargo-lambda.info/guide/getting-started.html

Steps to reproduce:

  1. Use sam init to create a Hello World example project using runtime provided.al2023
  2. Run sam build

Observed result:

Project fails to build

Expected result:

Project builds successfully

Additional environment details

sam --version

SAM CLI, version 1.127.0

sam --info

{
  "version": "1.127.0",
  "system": {
    "python": "3.8.20",
    "os": "macOS-15.0-x86_64-i386-64bit"
  },
  "additional_dependencies": {
    "docker_engine": "27.2.0",
    "aws_cdk": "Not available",
    "terraform": "1.9.7"
  },
  "available_beta_feature_env_vars": [
    "SAM_CLI_BETA_FEATURES",
    "SAM_CLI_BETA_BUILD_PERFORMANCE",
    "SAM_CLI_BETA_TERRAFORM_SUPPORT",
    "SAM_CLI_BETA_RUST_CARGO_LAMBDA"
  ]
@paulsmithkc paulsmithkc added the stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. label Nov 1, 2024
@hnnasit
Copy link
Contributor

hnnasit commented Nov 1, 2024

Hello @paulsmithkc, as mentioned in the error message and the docs, Cargo Lambda needs to be installed to use sam build for rust projects. Let us know if you are still running into issues or have questions.

@hnnasit hnnasit added type/question area/build sam build command area/rust Related to Support of Rust/Cargo/Cargo Lambda in SAM CLI and removed stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels Nov 1, 2024
@mndeveci
Copy link
Contributor

Resolving due to inactivity.

Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build sam build command area/rust Related to Support of Rust/Cargo/Cargo Lambda in SAM CLI type/question
Projects
None yet
Development

No branches or pull requests

3 participants