feat(rust): add second example using non-op internal extension, expand README #19
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.
Issue #, if available:
Closes: #1
Description of changes:
The current Rust example uses an external extension, CloudWatch Lambda Insights. It works fine, but it adds overhead if you don't need the extension since it requires a standalone process running. It also adds billing costs / cold start / etc.
Adding an additional example that uses an internal extension instead. I updated the README to discuss the difference between both.
Related PR on the
aws-lambda-rust-runtime
side:Testing
Each example has its own SAM template. I tested each end to end including deploy, sending traffic, validating the graceful shutdown in logs, etc. The two examples can co-exist in the same account without issue.
Note that graceful shutdown is not currently testable locally via
cargo lambda watch
, ref:cargo-lambda/cargo-lambda#850
Internal extension logs:
External extension logs:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.