unable to access access aws resources within docker container lambda using role based access control.

0

I have one lambda function from there I'm invoking s3 and textract but I'm getting access denied how I can access these services without providing access keys?

2 Answers
0

Hi,

the right way is to use only the Lambda execution role after granting it the right credentials for the services that you need.

See https://docs.aws.amazon.com/lambda/latest/dg/lambda-intro-execution-role.html

You provide an execution role when you create a function. When you invoke your function, 
Lambda automatically provides your function with temporary credentials by assuming this role. 
You don't have to call sts:AssumeRole in your function code.

Best,

Didier

profile pictureAWS
EXPERT
answered 19 days ago
  • An error occurred (AccessDenied) when calling the GetSessionToken operation: Cannot call GetSessionToken with session credentials

    I getting this when trying to call sts_client.get_session_token()

0

This Knowledge Center article seems to be what you are looking for.

profile pictureAWS
answered 19 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions