# Stop hardcoding AWS Lambda layer ARNs, and use AWS Systems Manager Parameter Store public parameters instead
To add the AWS AppConfig Agent Lambda extension to an AWS Lambda function, you can open the documentation, scroll through a table of ARNs, find the one that matches your AWS Region and architecture, copy it, and paste it into your template. However, a few months later, AWS publishes a new version and now your deployment is silently using an older one. There’s a better approach that uses public…
Hardcoding AWS Lambda layer ARNs can lead to issues if AWS releases a new version, as your deployment will be using an older one. A better approach is to use public parameters in AWS Systems Manager Parameter Store (Parameter Store) which contain up-to-date metadata about AWS services. Public parameters are read-only and can be queried at deploy time to get the current value.
To add the AWS AppConfig Agent Lambda extension to an AWS Lambda function, you can use the AWS Systems Manager Parameter Store public parameters instead of hardcoding the ARN. These parameters are available in every commercial AWS Region and include paths for x86_64 and ARM64 architectures. Retrieving the ARN from the AWS CLI is as simple as running a command that returns the full layer ARN for your current AWS Region.
This approach removes the need for coordination between teams and eliminates the hassle of maintaining ARNs.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.