Enable Cors Origin For amplify App

0

I am invoking Lambda function from amplify app. I wanted to set CORS for my API. Its different from the amplify URL. I have tried to enable Cors in API Gateway level. But It always default to all(*). How to set origin from code or amplify cli?

1 Answer
0

I have a similar setup and one thing that worked well for me was using Powertools in lambda which makes handling CORS much easier.

You might still need to update settings on in api gateway, but that will depend on how you have configured api gateway. See here: https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-cors-console.html

answered 6 months 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