BasePathMapping

0

Hi all,
I'm struggling to get domain mapping working properly.

I'm trying to create:
https://api.dev.mycompany.com/estimates/
https://api.dev.mycompany.com/quotes/
So, two (and more in future) APIs mapped to my domain

I have domain api.dev.mycompany.com created on the APIGW. If I create a base path mapping with empty path and destination pointing to Estimate:Stage then the request to My API works fine (quotes is not configured at this stage).

If I set the path to 'estimates' (or anything else it seems) and destination again pointing to myapi:Stage then the request results in 430 Missing Authentication Token.

This is very frustrating as there is nothing printed in the APIGW CW log so I'm struggling to find the root of the problem

Aby ideas?

gefragt vor 5 Jahren174 Aufrufe
4 Antworten
0
Akzeptierte Antwort

So what changes do I need make so that I can set the base path to /estimates so as to distinguish from other apis AND have the base path to the Lambda also as /estimates rather than /estimates/estimates?

You'll need to move your API definition up one level. So "/estimates" becomes "/" In your API definition "/estimates/foo" becomes "/foo", and so on.

Regards,
Bob

EXPERTE
beantwortet vor 5 Jahren
0

I have domain api.dev.mycompany.com created on the APIGW. If I create a base path mapping with empty path and destination pointing to Estimate:Stage then the request to My API works fine (quotes is not configured at this stage).

When you say 'working fine' do you mean the path https://api.dev.mycompany.com/estimates/ works as expected?

If I set the path to 'estimates' (or anything else it seems) and destination again pointing to myapi:Stage then the request results in 430 Missing Authentication Token.

Is myapi:Stage the same as the previous Estimate:Stage?

If the answer to this and the previous question is 'yes', then the path you would need to hit would be:

https://api.dev.mycompany.com/estimates/estimates/

Regards,
Bob

EXPERTE
beantwortet vor 5 Jahren
0

Hi Bob,
Thanks for the info.
Yes, myapi:Stage is the same as the previous Estimate:Stage?

I've tried https://api.dev.mycompany.com/estimates/estimates/ and that gets through to my Lambda (progress). But since the resource path on the lambda is /estimates, the request fails with 404 because the path passed in was /estimates/estimates/.
So what changes do I need make so that I can set the base path to /estimates so as to distinguish from other apis AND have the base path to the Lambda also as /estimates rather than /estimates/estimates?

Thanks again Bob

beantwortet vor 5 Jahren
0

Great, thanks Bob - all working now

beantwortet vor 5 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen