Closed ian-pascoe closed 1 month ago
More research is showing that the AWS session being expired would cause it. Does sst dev
handle refreshing the AWS session token for the local dev linking?
To color this just a little bit more: I have my AWS access keys in .env. Not sure if this would mess with the session token implementation and if I should only be using aws configure
for local dev
are you explicitly loading .env
into your lambda environment? we automatically forward credentials from the real lambda to your local env - if you log process.env
that should help you see
I am not, it is just at the top level of my monorepo. Being automatically loaded by sst dev
@thdxr - I deleted the AWS credentials from the .env file and I am still running into the issue
For a basic repro:
Edited above comment it seems like it's happening when the dev process is left running for long periods of time
gotcha - this is fixed in the latest sst we restart next dev every 45min when the credentials expire
unfortunately no other way to inject new values
During local dev I am experiencing "Expired Token" when generating a presigned url for a linked S3 bucket.
When trying to execute the POST request to the generated presigned url In reading here it looks like it is an issue with the token in the live dev? https://stackoverflow.com/questions/42951040/s3-expiredtoken-error-for-s3-pre-signed-url-within-expiry-period.
I have a NextJS trpc endpoint that I am creating a presigned url and when I call the PUT to that URL it gives me the expired token error Essentially I have
I've also noticed that it doesn't happen the first couple minutes after a fresh deploy. It's if I let the
sst dev
sit for a little while then try to do the procedure