1 回答
- 最新
- 投票最多
- 评论最多
0
The ARN for a Lambda layers is constructed as follows. Using this information you can construct the right ARN to put into things like CloudFormation and CDK.
arn:PARTITION:REGION:ACCOUNT:layer:LAMBDA-LAYER-NAME:VERSION
- If you're operating in the AWS commercial regions (which is everything except our China regions and GovCloud) then
REGION
will be "aws". REGION
is the region name that the Lambda Layer is deployed in.ACCOUNT
is the account number that you're operating in.LAMBDA_LAYER_NAME
is the name of the layer.VERSION
is the version that you want to reference.
You can find more information about how ARNs are constructed here: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html
You can also call the Lambda service using the ListLayers
API to look for the current version of the Lambda Layer.
相关内容
- AWS 官方已更新 3 年前
- AWS 官方已更新 1 年前
- AWS 官方已更新 3 年前
unfortunately, that did not work.
aws provided lambda layers is different in different region and it's different from logged-in account.
if we want to create a lambda and add a layer using terraform or cloudformation without knowing the layer ARN beforehand, how to do that?
I can pass the lambda layer name and version. also below commands is giving an empty list
Output
At this time, there isn't an API to get a list of AWS-curated Lambda Layers.