-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
Describe the bug
The Application construct for AppConfig provides a getLambdaLayerVersionArn 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.
arn:aws:lambda:us-west-2:359756378197:layer:AWS-AppConfig-Extension-Arm64:164Current Behavior
Application.getLambdaLayerVersionArn currently gives ARNs from the extension version 2.0.358 from December 2023, e.g.
arn:aws:lambda:us-west-2:359756378197:layer:AWS-AppConfig-Extension-Arm64:63Reproduction Steps
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.
I also see there's a separate mapping APPCONFIG_LAMBDA_LAYER_ARNS in region-info/build-tools/fact-table.ts with even older versions from 2.0.181?
Additional Information/Context
Version notes: Understanding available versions of the AWS AppConfig Agent Lambda extension
Specifically trying to use newer version for multi-variant feature flags.
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 so we don't have to do LayerVersion.fromLayerVersionArn, but that's a separate ask.