Skip to content

Instantly share code, notes, and snippets.

@FloStar3000
Created November 23, 2020 11:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FloStar3000/3b8400133b4f115eb6baf413253cdd13 to your computer and use it in GitHub Desktop.
Save FloStar3000/3b8400133b4f115eb6baf413253cdd13 to your computer and use it in GitHub Desktop.
InvalidSignatureException : AWS Amplify API Requests fail
When calling a manually calling an API Gateway Endpoint, you get a 403 Response with Response Header x-amzm-error-type:InvalidSignatureException
When configuring your endpoint with Amplify.configure({...}) (see https://docs.amplify.aws/lib/restapi/getting-started/q/platform/js#configure-your-application)
add a region:
{
...
API: {
endpoints: [
{
name: "MyAPIGatewayAPI",
endpoint: "https://1234567890-abcdefgh.amazonaws.com",
region: "eu-central-1" // <- add this
},
...
]
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment