-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDK for JS v3 asks for AWS_* env variables but amplify does not accept "AWS" word #3629
Comments
Nevermind... found a solution, using "AMAZON_" instead of "AWS_" as I did with v2. Just setup credentials parameter, this way:
Really don't know why Amplify has "AWS*" as reserved prefix, since there are just a few default variables using that. 🤷♂️ |
Hi @andre-mr 👋 , thanks for raising this with us! You've correctly mentioned that Amplify Hosting does not allow the use of environment variables with a prefix of
We will update our documentation to accurately reflect the same. |
@andre-mr 👋 , our documentation has been updated to reflect this information: https://docs.aws.amazon.com/amplify/latest/userguide/environment-variables.html. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
This issue has been automatically locked. |
Before opening, please confirm:
App Id
d3vc3r2jaskk9c
AWS Region
sa-east-1
Amplify Hosting feature
Backend builds, Environment variables, Frontend builds, SSR
Question
Hi.
I migrated a project to AWS-SDK For Javascript v3, and now I have some issues with credentials.
This doc says credentials from environment variables (method i was using in v2) are auto detected but with specific name convention: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_SESSION_TOKEN:
https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/loading-node-credentials-environment.html
Not using token part for now.
With version 2, I had to rename my variables starting with "AWS_", replacing with "AMAZON_" because amplify doesn't accept variables starting with "AWS" word.
Now I honestly don't know how this is intended for v3. SDK expecting "AWS_ACCESS_KEY_ID" but amplify doesn't accept this naming convention.
I tried to deploy to Vercel, wich doesn't have "AWS" prefix restriction, and it worked as a charm.
This is the file where I setup DocumentClient, where I defined credentials with v2 and now it doesn't need for Vercel (as v3 docs stated by the way):
Any ideas to deal with that, other than downgrading to v2?
The text was updated successfully, but these errors were encountered: