I’m using AWS-SDK in my SST stack, but it doesn’t ...
# seed
a
I’m using AWS-SDK in my SST stack, but it doesn’t work on SEED due it doesn’t have proper credentials. Apparently SDK is looking for
default
profile.
f
Hey @Adrián Mouly, can you send me a link to the build?
a
Going to send one now.
Is there a way to get the aws credentials from SEED env vars?
f
yeah
AWS_ACCESS_KEY_ID
and
AWS_SECRET_ACCESS_KEY
should be set.
I haven’t had a chance to look at the build you sent over yet. But I will take a look at it for sure in a bit.
Btw, are you thinking to try to create the
.aws/credentials
file in the build?
a
Yeah that could be an option too.
Not sure how aws-sdk works.
It reads that file always?
Or there is a way to set parameters from JS?
I don’t know which should be the correct way to do it.
f
You can also try checking if AWS_PROFILE is set. If it’s set, you can try removing it and see. I need to double check, but I remember AWS_PROFILE shouldn’t be set. If set, AWS SDK would look for the profile.
a
Maybe I can do..
Copy code
AWS.config.credentials = { accessKeyId: '', secretAccessKey: ' '};
f
Yeah try that!
a
So SEED has key/secret defined as env-vars?
Like you said above?
f
Yup
a
Nice, going to try.
I think the vars are not defined in my stack.
Maybe I have to define it manually…
Ok I’ve added the creds manually to my seed-env-vars… and still can’t get the parameter.
The keys are there, but still getting 400 from SDK.
Locally works fine.