Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

403 - The request could not be satisfied #15

Open
ablankenship10 opened this issue Oct 3, 2018 · 3 comments
Open

403 - The request could not be satisfied #15

ablankenship10 opened this issue Oct 3, 2018 · 3 comments

Comments

@ablankenship10
Copy link

After setting up my working API with this plugin, and pointing my domain in Route 53 to the distribution I can only get "403 The request could not be satisfied" errors. This is my config:

custom:
  apiCloudFront:
    certificate: arn:aws:acm:us-east-1:XXXXXXXXXXX:certificate/XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX
    domain: api.domain.com
    compress: true
    headers: all
    querystring: all

I tried using the url both as api.domain.com/stage/endpoint and api.domain.com/endpoint to no avail. (I want the former version so I can have both of my stages on the same api.domain.com address.)

What am I missing?

@rquast
Copy link

rquast commented Oct 8, 2018

Get the same message. I think it might be something to do with headers. Works only when I have headers: - x-api-key and doesn't work with "all"

@El-Fitz
Copy link

El-Fitz commented Oct 29, 2018

@ablankenship10 Do you use IAM authorization for your Lambda ? Or send an "Authorization" header in your request ?

@Necromos
Copy link
Contributor

Hey there!
You are correct, it is confirmed to be not working with all when you put CF in front of Api Gateway.
For more resources please take a look at:

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/forward-custom-headers.html Custom Headers that CloudFront Can't Forward to Your Origin section
and
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html

Also, if you want to use CF in front of AGW and pass Authorization header then one of the options is to set it like this: https://d.pr/i/XqsQui

Hope that it helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants