I have a requirement to provide a URL which will either invoke a Lambda function or could be proxied off to EC2, but the URL cannot contain a trailing slash or any path. For example; https://1234.customers.mysite.com. I can't use https://1234.customers.mysite.com/foo or even https://1234.customers.mysite.com/.
I need to be able to POST to this URL.
In testing via PostMan;
- If I invoke https://1234.customers.mysite.com/foo or ./bar I get a 200 return code.
- If I invoke https://1234.customers.mysite.com/ I get a 403 return code, "message": "Missing Authentication Token"
- If I invoke https://1234.customers.mysite.com I get the same 403 return code and message.
I don't need to get test #2 working, but I just wanted to show that I get the same error as #3. I'm suspecting that if I can get #2 or #3 to work then they'll both work, but that my requirement is really #3.
I have one resource defined for / as a proxy resource with a path of {proxy+}
I have no auth defined.
I have no UsagePlan defined.
I have a custom domain set up and for it's API Mapping I list my deployed stage and left the path blank.
I cannot add a header to my POST.
Any help would be greatly appreciated.
Thanks,
DB
Miki, you're brilliant! Your suggestion worked like a charm. As you probably expected I had /{proxy+} for ANY method but an explicit POST for /. Thanks for taking the time and helping me. I truly appreciate it.