AWS powertools documentation change
Summary
Updated dependency versions from 2.5.0 to 2.7.0, added documentation about AspectJ configuration requirements, clarified annotation vs provider class usage patterns, and reorganized provider class examples.
Security assessment
The changes primarily focus on version updates and usage pattern clarifications. While the note about AspectJ configuration might help prevent misconfigurations, there's no explicit mention of security vulnerabilities being addressed. The version bump could include security improvements, but the diff doesn't provide concrete evidence of security-related fixes.
Diff
diff --git a/powertools/java/latest/utilities/parameters.md b/powertools/java/latest/utilities/parameters.md index b02d108b5..87bd97b9b 100644 --- a//powertools/java/latest/utilities/parameters.md +++ b//powertools/java/latest/utilities/parameters.md @@ -22,0 +23 @@ Initializing search + * [ Usage patterns ](../../usage-patterns/) @@ -167,0 +169 @@ MavenGradle + 56 @@ -183 +185 @@ MavenGradle - <version>2.5.0</version> + <version>2.7.0</version> @@ -188,0 +191 @@ MavenGradle + <!-- Note: This AspectJ configuration is not needed when using the provider classes directly (without annotations) --> @@ -247,0 +251 @@ MavenGradle + 17 @@ -254 +258 @@ MavenGradle - id 'io.freefair.aspectj.post-compile-weaving' version '8.1.0' + id 'io.freefair.aspectj.post-compile-weaving' version '8.1.0' // Not needed when using provider classes directly (without annotations) @@ -263 +267,2 @@ MavenGradle - aspect 'software.amazon.lambda:powertools-parameters-secrets:2.5.0' + aspect 'software.amazon.lambda:powertools-parameters-secrets:2.7.0' // Not needed when using provider classes directly (without annotations) + implementation 'software.amazon.lambda:powertools-parameters-secrets:2.7.0' // Use this instead of 'aspect' when using provider classes directly @@ -287 +292,6 @@ AppConfig | `AppConfigProvider.get(String)` `AppConfigProvider.getMultiple(strin -You can retrieve parameters either using annotations or by using the `xParamProvider` class for each parameter provider directly. The latter is useful if you need to configure the underlying SDK client, for example to use a different region or credentials, the former is simpler to use. +You can retrieve parameters using either annotations or provider classes directly: + + * **Annotations** (e.g., `@SecretsParam`, `@SSMParam`) - Simpler syntax with field injection, but requires AspectJ configuration + * **Provider classes** (e.g., `SecretsProvider`, `SSMProvider`) - No AspectJ required, useful when you need to configure the underlying SDK client (e.g., different region or credentials), or prefer avoiding AspectJ setup + + @@ -291 +301 @@ You can retrieve parameters either using annotations or by using the `xParamProv -This section describes the built-in provider classes for each parameter store, providing examples showing how to inject parameters using annotations, and how to use the provider interface. In cases where a provider supports extra features, these will also be described. +This section describes the built-in provider classes for each parameter store. For each provider, examples are shown for both the annotation-based approach and the provider class approach. In cases where a provider supports extra features, these will also be described. @@ -295 +305 @@ This section describes the built-in provider classes for each parameter store, p -Secrets Manager: @SecretsParamSecrets Manager: SecretsProvider +@SecretsParam annotationSecretsProvider class @@ -402 +412 @@ Option | Default | Description -SSM Parameter Store: @SSMParamSSM Parameter Store: SSMProviderSSM Parameter Store: Additional Options +@SSMParam annotationSSMProvider classAdditional Options @@ -518 +527,0 @@ SSM Parameter Store: @SSMParamSSM Parameter Store: SSMProviderSSM Parameter Stor - 14 @@ -523,2 +532 @@ SSM Parameter Store: @SSMParamSSM Parameter Store: SSMProviderSSM Parameter Stor - import software.amazon.lambda.powertools.parameters.SSMProvider; - import software.amazon.lambda.powertools.parameters.ParamManager; + import software.amazon.lambda.powertools.parameters.ssm.SSMProvider; @@ -528 +536 @@ SSM Parameter Store: @SSMParamSSM Parameter Store: SSMProviderSSM Parameter Stor - SSMProvider ssmProvider = ParamManager.getSsmProvider(); + SSMProvider ssmProvider = SSMProvider.builder().build(); @@ -543 +551 @@ SSM Parameter Store: @SSMParamSSM Parameter Store: SSMProviderSSM Parameter Stor -DynamoDB: @DyanmoDbParamDynamoDB: DynamoDbProvider +@DynamoDbParam annotationDynamoDbProvider class @@ -647 +655 @@ DynamoDB: @DyanmoDbParamDynamoDB: DynamoDbProvider -AppConfig: @AppConfigParamAppConfig: AppConfigProvider +@AppConfigParam annotationAppConfigProvider class @@ -1201 +1209 @@ CustomProvider.javaCustomProviderBuilder.javaCustomProviderParam.javaCustomProvi -2025-06-06 +2025-11-13