What role and policies does your deployed Lambda function have? If it doesn't have permission to assume the role, then I think you will get the error you described.
Usually your development user/role will have more permissions than a deployed Lambda function, but it depends on the deployed function role.
Can i use Id token, access token, refresh token in User pool to identity pool?asked 5 months ago
How do I share Amazon S3 files with users who don't have AWS Management Console access?Accepted Answerasked 3 years ago
Unable to access identity in identity browserasked 5 months ago
using lambda as the identity broker to access AWS Consoleasked 6 months ago
publish to 3rd party MQTT broker in aws python Lambda functionasked 4 years ago
AWS SSO + Azure AD, no way to access AWS Console?Accepted Answerasked 8 months ago
Accidentally add in restricted IAM policy, block all access to AWS consoleasked 2 years ago
Can you limit access to the AWS Console by Region using DNS and a local firewall?Accepted Answerasked 5 years ago
Creating a Rabbit Broker via CLI (alternatives to web console?)Accepted Answerasked a year ago
Kafka Monitoring Dashboard question - CPU Usage by Brokerasked 3 years ago