(appconfig): Lambda extension layer versions are outdated
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the bug
The `Application` construct for AppConfig provides a [`getLambdaLayerVersionArn`](https://github.com/aws/aws-cdk/blame/dad112e27b0326746c84cab574ee1b2109d5afdd/packages/aws-cdk-lib/aws-appconfig/lib/application.ts#L397) method to use the AWS AppConfig Agent Lambda Extension with a Lambda function, but the layer versions are not up to date.
### Regression Issue
- [ ] Select this option if this issue appears to be a regression.
### Last Known Working CDK Library Version
_No response_
### Expected Behavior
I expect to be able to use `Application.getLambdaLayerVersionArn` to get the latest version of the extension, currently listed as version 2.0.2037 from May 2025, e.g.
```txt
arn:aws:lambda:us-west-2:359756378197:layer:AWS-AppConfig-Extension-Arm64:164
```
### Current Behavior
`Application.getLambdaLayerVersionArn` currently gives ARNs from the extension version 2.0.358 from December 2023, e.g.
```txt
arn:aws:lambda:us-west-2:359756378197:layer:AWS-AppConfig-Extension-Arm64:63
```
### Reproduction Steps
```ts
import { App, Stack, StackProps, Token } from "aws-cdk-lib";
import { Application, Platform } from "aws-cdk-lib/aws-appconfig";
class MyStack extends Stack {
constructor(scope: Construct, id: string, props?: StackProps) {
super(scope, id, props);
const region = Stack.of(this).region;
if (Token.isUnresolved(region)) {
throw new Error("Region of stack must be specified");
}
const appconfigLayerArn = Application.getLambdaLayerVersionArn(
Stack.of(this).region,
Platform.ARM_64
);
console.log(appconfigLayerArn);
}
}
const app = new App();
new MyStack(app, "MyStack", { env: { region: "us-west-2" } });
```
### Possible Solution
Could be addressed by updating the values in [`lambdaLayerVersions`](https://github.com/aws/aws-cdk/blame/dad112e27b0326746c84cab574ee1b2109d5afdd/packages/aws-cdk-lib/aws-appconfig/lib/application.ts#L466).
I also see there's a separate mapping [`APPCONFIG_LAMBDA_LAYER_ARNS` in `region-info/build-tools/fact-table.ts`](https://github.com/aws/aws-cdk/blob/dad112e27b0326746c84cab574ee1b2109d5afdd/packages/aws-cdk-lib/region-info/build-tools/fact-tables.ts#L240) with even older versions from 2.0.181?
### Additional Information/Context
Version notes: [Understanding available versions of the AWS AppConfig Agent Lambda extension](https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-integration-lambda-extensions-versions.html)
Specifically trying to use newer version for [multi-variant feature flags](https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-multi-variant-feature-flags.html).
### AWS CDK Library version (aws-cdk-lib)
2.221.1
### AWS CDK CLI version
N/A
### Node.js Version
N/A
### OS
N/A
### Language
TypeScript
### Language Version
_No response_
### Other information
Would also appreciate if the construct could return something like an [`ILayerVersion`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.ILayerVersion.html) so we don't have to do `LayerVersion.fromLayerVersionArn`, but that's a separate ask.
Contributor guide
Research direction
Read `packages/aws-cdk-lib/aws-appconfig/lib/application.ts`, especially `lambdaLayerVersions`, and compare its values with the current AWS AppConfig Agent Lambda Extension version cited in the issue. Check the `APPCONFIG_LAMBDA_LAYER_ARNS` mapping in `packages/aws-cdk-lib/region-info/build-tools/fact-tables.ts` as well; done means both mappings provide current layer ARNs for the supported regions and platforms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100