cloud:aws:apigateway
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| cloud:aws:apigateway [2021/04/29 15:29] – skipidar | cloud:aws:apigateway [2023/11/01 07:13] (current) – ↷ Page moved from business_process_management:camunda:cloud:aws:apigateway to cloud:aws:apigateway skipidar | ||
|---|---|---|---|
| Line 22: | Line 22: | ||
| ===== Lambda behind the API gateway ===== | ===== Lambda behind the API gateway ===== | ||
| + | |||
| + | https:// | ||
| + | |||
| + | |||
| + | ==== Fallpit: Invoke Lambda POST ==== | ||
| + | |||
| + | The API must invoke the backend Lambda function using the **HTTP method POST**. | ||
| + | https:// | ||
| + | |||
| + | Otherwise you will get | ||
| + | * a 500 error on the Gateway | ||
| + | * a 403 error on the Lambda, behind the Gateway https:// | ||
| ==== Debugging ==== | ==== Debugging ==== | ||
| Line 35: | Line 47: | ||
| https:// | https:// | ||
| + | |||
| + | Example: https:// | ||
| === Java signature === | === Java signature === | ||
| Line 140: | Line 154: | ||
| - | === Return | + | === Return |
| Lambdas needs to return JSON, to be capable to be used from the gateway. | Lambdas needs to return JSON, to be capable to be used from the gateway. | ||
| + | https:// | ||
| <sxh java> | <sxh java> | ||
| Line 161: | Line 176: | ||
| writer.close(); | writer.close(); | ||
| </ | </ | ||
| + | |||
| + | |||
| + | ==== Use Lambda Proxy integration ==== | ||
| + | |||
| + | When a client submits an API request, API Gateway passes to the integrated Lambda function the raw request as-is: | ||
| + | |||
| + | |||
| + | That means, that the option `Use Lambda Proxy integration` | ||
| + | * **deactivates** the **" | ||
| + | * https:// | ||
| + | |||
| + | |||
| + | {{https:// | ||
| + | |||
| + | |||
| + | This is the most powerful integration: | ||
| + | - **\{{proxy}}** sends all resources - to the Lambda | ||
| + | - **ANY** - accepts all methods | ||
| + | |||
| + | https:// | ||
| + | |||
| + | {{https:// | ||
| + | |||
| + | * <color # | ||
| + | * <color # | ||
| + | |||
| + | After that the lambda reacts on | ||
| + | < | ||
| + | curl -X POST https:// | ||
| + | curl -X GET https:// | ||
| + | </ | ||
| + | |||
| + | ==== Mapping Templates ==== | ||
| + | |||
| + | Can be used to add custom headers | ||
| + | from the API gateway | ||
| + | to the Lambda | ||
| + | |||
| + | |||
| + | https:// | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== Token Exchange ===== | ||
| + | The token exchange is possible with 2 pieces: | ||
| + | |||
| + | * obtain a new token at the lambda authorizer | ||
| + | * set the header via VLT as in | ||
| + | |||
| + | https:// | ||
| + | |||
| + | |||
| + | |||
| + | ===== A Detailed Overview of AWS API Gateway ===== | ||
| + | An overview of the API gateway functions. | ||
| + | https:// | ||
| + | |||
| + | {{https:// | ||
| + | |||
| + | {{https:// | ||
| + | |||
| + | |||
cloud/aws/apigateway.1619710142.txt.gz · Last modified: by skipidar
