-
Notifications
You must be signed in to change notification settings - Fork 4
Proxying API Gateway Lambdas
manage-frontend
has a standardised mechanism for proxying API Gateway frontend Lambdas from guardian/support-service-lambdas, notably...
In summary, it uses CloudFormation
and APIGateway
clients of the aws-sdk
to 'discover' the API gateway hostnames and API keys by name, rather than having to maintain that config in S3 or ParameterStore (see https://github.com/guardian/manage-frontend/pull/351).
As with all AJAX calls made by the client, we proxy services (see wiki/Server-side-Proxying for general rationale), and in this case...
-
using the retrieved hostname and API keys (see above)
-
adds the
x-identity-id
header using the value which came from IDAPI (see wiki/IDAPI-Integration) -
selects the right STAGE instance of the API Gateway Lambda, based on whether the user is a
test-user
Stage of manage-frontend
normal mode test user mode DEV (local machine) DEV Lambda*
(DEV SF/Zuora)CODE Lambda
(UAT SF/Zuora)CODE DEV Lambda*
(DEV SF/Zuora)CODE Lambda
(UAT SF/Zuora)PROD PROD Lambda
(DEV SF/Zuora)CODE Lambda
(UAT SF/Zuora)* Yes indeed there is a DEV Stack for the lambda, which is available in riff-raff as of guardian/prism/pull/75
Not what you're looking for? Be sure to use the navigation sidebar on the right. ➡️