AWS powertools documentation change
Summary
Added Lambda SnapStart priming documentation, updated version from 2.9.0 to 2.10.0, and added Lambda Metadata link
Security assessment
The change adds documentation for Lambda SnapStart priming feature which improves cold start performance, but does not address any security vulnerability or add security-specific documentation. Version update is routine maintenance.
Diff
diff --git a/powertools/java/latest/core/tracing.md b/powertools/java/latest/core/tracing.md index 171ca38d5..cba58d028 100644 --- a//powertools/java/latest/core/tracing.md +++ b//powertools/java/latest/core/tracing.md @@ -42,0 +43,2 @@ Initializing search + * Advanced + * Lambda SnapStart priming @@ -52,0 +55 @@ Initializing search + * [ Lambda Metadata ](../../utilities/lambda_metadata/) @@ -75,0 +79,2 @@ Table of contents + * Advanced + * Lambda SnapStart priming @@ -158 +163 @@ MavenGradle - <version>2.9.0</version> + <version>2.10.0</version> @@ -237,2 +242,2 @@ MavenGradle - aspect 'software.amazon.lambda:powertools-tracing:2.9.0' // Not needed when using the functional approach - implementation 'software.amazon.lambda:powertools-tracing:2.9.0' // Use this instead of 'aspect' when using the functional approach + aspect 'software.amazon.lambda:powertools-tracing:2.10.0' // Not needed when using the functional approach + implementation 'software.amazon.lambda:powertools-tracing:2.10.0' // Use this instead of 'aspect' when using the functional approach @@ -868 +873,93 @@ AppTest.java -2025-11-13 +## Advanced¶ + +### Lambda SnapStart priming¶ + +The Tracing utility integrates with AWS Lambda SnapStart to improve restore durations. To make sure the SnapStart priming logic of this utility runs correctly, you need an explicit reference to `TracingUtils` in your code to allow the library to register before SnapStart takes a memory snapshot. Learn more about what priming is in this [blog post](https://aws.amazon.com/blogs/compute/optimizing-cold-start-performance-of-aws-lambda-using-advanced-priming-strategies-with-snapstart/). + +If you don't set a custom `TracingUtils` in your code yet, make sure to reference `TracingUtils` in your Lambda handler initialization code. This can be done by adding one of the following lines to your handler class: + +ConstructorStatic Initializer + + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + +| + + + import software.amazon.lambda.powertools.validation.Validation; + import software.amazon.lambda.powertools.validation.ValidationConfig; + + public class MyFunctionHandler implements RequestHandler<APIGatewayProxyRequestEvent, APIGatewayProxyResponseEvent> { + + public MyFunctionHandler() { + TracingUtils.init(); // Ensure TracingUtils is loaded for SnapStart + } + + @Override + @Validation(inboundSchema = "classpath:/schema_in.json", outboundSchema = "classpath:/schema_out.json") + public APIGatewayProxyResponseEvent handleRequest(APIGatewayProxyRequestEvent input, Context context) { + // ... + return something; + } + } + + +---|--- + + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + +| + + + import software.amazon.lambda.powertools.validation.Validation; + import software.amazon.lambda.powertools.validation.ValidationConfig; + + public class MyFunctionHandler implements RequestHandler<APIGatewayProxyRequestEvent, APIGatewayProxyResponseEvent> { + + static { + TracingUtils.init(); // Ensure TracingUtils is loaded for SnapStart + } + + @Override + @Validation(inboundSchema = "classpath:/schema_in.json", outboundSchema = "classpath:/schema_out.json") + public APIGatewayProxyResponseEvent handleRequest(APIGatewayProxyRequestEvent input, Context context) { + // ... + return something; + } + } + + +---|--- + +2026-01-05