Which Category is your question related to?
Function
Amplify CLI Version
4.43.0
Challenge
I want to use a publicly available layer, like a layer to instrument my code for extra visibility (eg Lumigo, Thundra).
These have a specific layer ARN, for example: arn:aws:lambda:eu-west-1:xxxxxxxx:layer:layer-name:224.
I want to use this layer in all my lambda functions.
How can I specify this layer once, and use it in all my lambda functions?
Current intermediate solutions:
Either use parameters.json to provide the layerArn to your function's CF template.
parameters.json:
This takes care of only having to specify the version of the layer once (in ssm).
Yet it makes you dependent on ssm parameters which you have to provision for every new environment you checkout.
Is there another way to provide this layerArn as a parameter to all stacks and not time and time again define it in every stack?
Hi @Nxtra, while we do have the option to add a layer via ARN to a function with amplify update function, there's no way to do this for multiple functions with a single CLI command. Marking this as an enhancement.
Which Category is your question related to? Function
Amplify CLI Version 4.43.0
Challenge I want to use a publicly available layer, like a layer to instrument my code for extra visibility (eg Lumigo, Thundra).
These have a specific layer ARN, for example:
arn:aws:lambda:eu-west-1:xxxxxxxx:layer:layer-name:224
.I want to use this layer in all my lambda functions. How can I specify this layer once, and use it in all my lambda functions?
Current intermediate solutions:
parameters.json
to provide the layerArn to your function's CF template.parameters.json
:You have to do this for every function.
lambda-CF.json
You have to do this for every function.
lambda-CF.json
:This takes care of only having to specify the version of the layer once (in ssm). Yet it makes you dependent on ssm parameters which you have to provision for every new environment you checkout.
Is there another way to provide this layerArn as a parameter to all stacks and not time and time again define it in every stack?