-
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
Missing access key in Next.js 13 route handlers #3732
Comments
Hi @agazibaric 👋 , thanks for raising this! Have you made the Your build specification file
|
Hi @Jay2113 , thank you for the answer! I've tried adding those variables to the build step as you described, but unfortunately, they don't seem to be present there. I've cat the .env.production file and the secrets are missing. As a potential workaround I could generate access keys and add them to the AWS Amplify Environment as
However, my goal is to find a solution that doesn't require manual setup of these secrets. |
@agazibaric 👋 , currently we do not support the functionality of executing server side requests to other AWS services using IAM permissions. We are tracking this as a feature request here #3205. I'll recommend subscribing to it to track updates. Thanks! |
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
d1e9ukt9805kdz
AWS Region
us-west-1
Amplify Hosting feature
Environment variables, Service role
Question
I am facing an issue when attempting to access
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
within a Next.js 13.4.12 with App Router. I'm trying to perform a server-side call to AWS SES inside of Route Handlers. Here's the sample code:Both
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
are undefined. I have attached the right SES permissions to the service role of the aws amplify app.I expect that the Route Handlers assume the role of the service which will provide those credentials inside of env.
How can I obtain those credentials without setting them manually in the build step?
The text was updated successfully, but these errors were encountered: