Having a strange issue where i have the AWS_PROFIL...
# help
d
Having a strange issue where i have the AWS_PROFILE env variable set I can log it from within the stack however it this this error when it tries to deploy the nextjs site?
Copy code
Need to perform AWS calls for account my-account, but no credentials have been configured
Found errors
f
Hey @Dan Beaven, a couple of questions to clarify: 1. Are you using the
NextjsSite
construct or are you deploying to Vercel? 2. Are you getting this error in ur terminal when u run
sst deploy
or when u make AWS calls from your
pages/api
? 3. Where r u setting the
AWS_PROFILE
?
d
Hi thanks for getting back in the end i fixed it by adding CDK_DEFAULT_ACCOUNT variable. But in answer to your questions i am using NextJS construct. I get the error in the terminal after the site has finished building. I am setting the variable like so
env AWS_PROFILE=... sst deploy --stage ...
.
f
Thanks for the details. Btw does it work without the
env
keyword
Copy code
AWS_PROFILE=... sst deploy --stage ...