Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: SSM parameters to look up layer ARNs #3439

Open
2 tasks done
sthulb opened this issue Dec 20, 2024 · 0 comments
Open
2 tasks done

Feature request: SSM parameters to look up layer ARNs #3439

sthulb opened this issue Dec 20, 2024 · 0 comments
Assignees
Labels
confirmed The scope is clear, ready for implementation feature-request This item refers to a feature request for an existing or new utility layers Items related to the Lambda Layers pipeline

Comments

@sthulb
Copy link
Contributor

sthulb commented Dec 20, 2024

Use case

I would like to be able to dynamically lookup the latest available AWS Lambda layer ARN.

Solution/User Experience

AWS has already been maintaining a list of public SSM parameters, please consider enlisting powertools-lambda-python too. Similar to ref. https://aws-sdk-pandas.readthedocs.io/en/latest/install.html#aws-lambda-layer

$ aws ssm get-parameters-by-path --path /aws/service/list
$ aws ssm describe-parameters --parameter-filters 'Key=Name, Option=BeginsWith, Values=/aws/service/aws-sdk-pandas/' --query 'sort_by(Parameters, &LastModifiedDate)'

Sample code

powertools_layer_arn = ssm.StringParameter.from_string_parameter_attributes(self, "MyValue",
  parameter_name="/aws/service/powertools-lambda-python/x.y.z/py3.xx/x86_64/layer-arn"
).string_value

Alternative solutions

Hardcoded Lambda layer ARN

Acknowledgment

@sthulb sthulb added feature-request This item refers to a feature request for an existing or new utility triage This item has not been triaged by a maintainer, please wait labels Dec 20, 2024
@sthulb sthulb changed the title Feature request: TITLE Feature request: SSM parameters to look up layer ARNs Dec 20, 2024
@dreamorosi dreamorosi moved this from Triage to Working on it in Powertools for AWS Lambda (TypeScript) Dec 20, 2024
@dreamorosi dreamorosi added confirmed The scope is clear, ready for implementation layers Items related to the Lambda Layers pipeline and removed triage This item has not been triaged by a maintainer, please wait labels Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed The scope is clear, ready for implementation feature-request This item refers to a feature request for an existing or new utility layers Items related to the Lambda Layers pipeline
Projects
Status: Working on it
Development

No branches or pull requests

2 participants