5

When I try to deploy my application on AWS, I get the following error :

An error occurred while provisioning your stack: HelloLambdaFunction - Lambda was unable to configure your environment variables because the environment variables you have provided contains reserved keys that are currently not supported for modification. Reserved keys used in this request: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY.

My AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY are stored in env.yml and I access them using process.env.AWS_ACCESS_KEY_ID

How can I fix this error ?

1 Answer 1

5

I would try removing those keys from the config and see what happens.

Sign up to request clarification or add additional context in comments.

2 Comments

the error is telling you specifically that you CAN'T set those where you've set them.
Correct ! Before doing serverless deploy, I was setting up my env variables using export AWS_ACCESS_KEY_ID=XXXX and export AWS_SECRET_ACCESS_KEY=XXXX so I guess putting them into the env.yml would be to setting them twice. The error message therefore makes sens. Thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.