aws-amplify / amplify-cli

The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development.
Apache License 2.0
2.81k stars 821 forks source link

Shared environment variables for Lambda functions #8360

Open aprilmintacpineda opened 2 years ago

aprilmintacpineda commented 2 years ago

Is this related to a new or existing Amplify category?

function

Is this related to another service?

Lambda function

Describe the feature you'd like to request

Cloudformation has https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-specification-template-anatomy-globals.html where you can define environment variables for ALL your functions rather than having to attach them to the individual functions one-by-one

Describe the solution you'd like

We should be able to configure a globals as well.

Describe alternatives you've considered

None.

Additional context

No response

Is this something that you'd be interested in working on?

maziarzamani commented 2 years ago

I created the ticket #9456, and recently ran into this problem as I have numerous lambda functions utilizing the same parmaters. Its super redundant when these keys need to be updated when they cannot be shared globally.