Home > OS >  Is there a way to predefine an arn for AWS lambdas?
Is there a way to predefine an arn for AWS lambdas?

Time:10-25

I am using cloud formation to deploy - delete - redeploy some lambdas. But I want to maintain an arn (a constant arn for each lambda) that I can use no matter if i delete and redeploy the lambda. Is that possible?

CodePudding user response:

As long as the name of your lambda stays the same, the ARN will be the same.

However, keep in mind that

the ARNs for some resources omit the Region, the account ID, or both the Region and the account ID

Here's a general format for ARNs:

arn:partition:service:region:account-id:resource-id
arn:partition:service:region:account-id:resource-type/resource-id
arn:partition:service:region:account-id:resource-type:resource-id

More on ARN here.

  • Related