Open zeenau opened 11 months ago
Credentials are passed into the container if available. So, that message is legitimate. Is the concern that the messaging is not clear?
@sriram-mv no, the concern is that I'm blocked from running the function locally without logging into aws first. Not sure how much value there is in passing aws credentials to local instance, can it actually validate those credentials or it just checks expiry?What options do I have when offline (don't have access to login to aws) is there an option to opt out from passing expired session to local instance?
Description:
running
sam local start-api
fails with error wihtout sso token (not logged into aws)Lambda functions containers initialization failed because of Error when retrieving token from sso: Token has expired and refresh failed Error: Lambda functions containers initialization failed
Steps to reproduce:
Observed result:
Lambda functions containers initialization failed because of Error when retrieving token from sso: Token has expired and refresh failed Error: Lambda functions containers initialization failed
Expected result:
Running lambda locally shouldn't require (or fail) without an active/valid sso session with aws.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
: SAM CLI, version 1.97.0Loading AWS credentials from session with profile 'None' 2023-09-29 11:17:38,182 | Exception raised during the execution 2023-09-29 11:17:38,183 | Lambda functions containers initialization failed because of Error loading SSO Token: Token for AWS-DEV does not exist