Reputation: 181
I am trying to call a python lambda function from within another lambda function using:
client = boto3.client('lambda')
response =
client.invoke(FunctionName=arn,InvocationType='RequestResponse',
Payload=json.dumps(data))
But I run into the following AccessDenied error: "errorMessage": "An error occurred (AccessDeniedException) when calling the Invoke operation: User: arn:aws:sts::nnnn:assumed-role/lambda-s3-full-access/cache-simdata-srv is not authorized to perform: lambda:InvokeFunction on resource: arn:aws:lambda:us- west-1:nnnn:function:cache-s-s
I had a similar problem before but was never able to figure out what polices to add to the lambda execution role. Currently both lambdas has the following execution role:
AmazonDynamoDBFullAccess
AmazonS3FullAccess
AWSLambdaBasicExecutionRole
I am grateful for any advice.
Upvotes: 1
Views: 159