aws-amplify / aws-amplify/amplify-cli

How to Dynamically Provide Region to Layers

Open
#12,805 3 comments 0 reactions 0 assignees View on GitHub
feature-request functions p4
Dominant language
TypeScript
Stars
2.9k
Forks
825
Avg merge
11d 23h
Merged PRs (30d)
2

Description

### Amplify CLI Version

12.1.0

### Question

I have a function added through `amplify add function` in which I specify the AWS Lambda Powertools layer (Python). When providing the lambda layer ARN I have to hardcode the layer region as part of the layer ARN. Is there a way that we can use template variables in the layer ARN i.e. AWS::Region?

For reference, the layer ARN in question is `arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:34`

Contributor guide

Open the contributing guide

Research direction

Start with the `amplify add function` flow and the configuration that accepts the AWS Lambda Powertools Python layer ARN. Check whether template variables such as `AWS::Region` are supported there; done means the layer ARN can use the deployed region without hardcoding it, with the behavior verified in the relevant CLI tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
cli, cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.