Whenever I begin to use the AWS_IAM authorizer on my function, my api GET request - which is being made from a web client - receives a No 'Access-Control-Allow-Origin' header is present on the requested resource.
and I’m getting a 403 status code. When I remove the aws_iam authorizer, the api request - made via the same web client - succeeds. So I’m pretty sure it’s not actually a cors error since I’ve double checked that my api has cors enabled. I’m not sure if I’m using the AWS Javascript SDK wrong or if I’m not generating proper roles for AWS_IAM in my serverless.yml config.
When I run the request from postman with my personal access keys from AWS, the request succeeds. When I console.log the keys from the AWS.config.credentials and use those in postman, the request receives an invalid token error message. Maybe I haven’t generated the proper role for my federated identity pool?
I’m using aws4 on the front-end to sign the request, and I use axios to make the request.
Any ideas?