Merged
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use cargo lambda new generated project structure with generic_handler module, system info response (runtime, architecture) consistent with Go/Java/Python examples, and build.rs for rustc version embedding. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
f3d9cbf to
b4c03b7
Compare
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
|
||
| package: build ## Package the Lambda function as a zip | ||
| mkdir -p build | ||
| cp target/lambda/lambda-rust-example/bootstrap.zip build/lambda.zip |
There was a problem hiding this comment.
The package target hardcodes the crate directory name (target/lambda/lambda-rust-example/...). This makes the example brittle when users copy it and rename the crate in Cargo.toml (the copy step will fail). Consider deriving the crate name (e.g., via cargo metadata) or copying from target/lambda/*/bootstrap.zip to keep the Makefile working after renames.
Suggested change
| cp target/lambda/lambda-rust-example/bootstrap.zip build/lambda.zip | |
| cp target/lambda/*/bootstrap.zip build/lambda.zip |
|
|
||
| /// This is the main body for the function. | ||
| /// Write your code inside it. | ||
| /// There are some code example in the following URLs: |
There was a problem hiding this comment.
Typo in comment: use plural “examples” here.
Suggested change
| /// There are some code example in the following URLs: | |
| /// There are some code examples in the following URLs: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
provided.al2023custom runtime withcargo-lambdafor cross-compilation to ARM64cargo lambda newproject structure withgeneric_handlermodule, consistent with official toolingbuild.rsto embed rustc version at compile timetarget/to root.gitignorefor Rust build artifactsTest plan
cargo testpassesmake packagebuilds successfullyterraform validatepassesmake tf MODE=applydeploys and invokes successfullypre-commit run -apasses🤖 Generated with Claude Code