Skip to content

Update documentation #10710

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

Closed
wants to merge 17 commits into from
Closed

Update documentation #10710

wants to merge 17 commits into from

Conversation

ashishb-solo
Copy link

@ashishb-solo ashishb-solo commented Mar 17, 2025

Description

Update AWS Lambda documentation to explain how Gloo behaves when Lambda functions are rate-limited.

API changes

Code changes

CI changes

Docs changes

Context

Interesting decisions

Testing steps

Notes for reviewers

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

@ashishb-solo ashishb-solo requested a review from a team as a code owner March 17, 2025 17:42
@solo-changelog-bot
Copy link

Copy link

github-actions bot commented Mar 17, 2025

Visit the preview URL for this PR (updated for commit 5f55d1f):

https://gloo-edge--pr10710-aws-lambda-429-docum-xchf8jru.web.app

(expires Tue, 10 Jun 2025 18:33:51 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 77c2b86e287749579b7ff9cadb81e099042ef677

@@ -324,3 +324,6 @@ Wrap the request to the function in the same way as an AWS API Gateway.
{"body": "gloo edge is inserting this body", "headers": {":authority": "localhost:8080", ":method": "POST", ":path": "/", ":scheme": "http", "accept": "*/*", "content-length": "32", "content-type": "application/x-www-form-urlencoded", "test-header-key": "test-header-value", "user-agent": "curl/7.85.0", "x-forwarded-proto": "http", "x-request-id": "347975da-fa61-4d8a-9285-ee0826202819"}, "httpMethod": "POST", "isBase64Encoded": false, "multiValueHeaders": null, "multiValueQueryStringParameters": null, "path": "/", "pathParameters": null, "queryStringParameters": null, "requestContext": {"httpMethod": "POST", "path": "/", "protocol": "HTTP/1.1", "resourcePath": "/"}, "resource": "/", "routeKey": "POST /", "stageVariables": null, "version": "1.0"}%
```

##### Rate-limited Lambda Function

If the upstream Lambda destination is rate-limited, AWS will send a 429 response to Gloo. In this case, Gloo Gateway will change the status code to `500`. Additionally, it will set the `X-Envoygloo-Lambda-Statuscode` header to `429`, and the `X-Envoygloo-Lambda-Statusreason` header will be set with the reason the Lambda function was throttled. For more information, see the [AWS Lambda Documentation](https://docs.aws.amazon.com/lambda/latest/api/API_Invoke.html).
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this take affect by default? or is this only with a certain setting like a unwrap function?

Copy link

@nfuden nfuden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont think this is correct

@@ -324,3 +324,6 @@ Wrap the request to the function in the same way as an AWS API Gateway.
{"body": "gloo edge is inserting this body", "headers": {":authority": "localhost:8080", ":method": "POST", ":path": "/", ":scheme": "http", "accept": "*/*", "content-length": "32", "content-type": "application/x-www-form-urlencoded", "test-header-key": "test-header-value", "user-agent": "curl/7.85.0", "x-forwarded-proto": "http", "x-request-id": "347975da-fa61-4d8a-9285-ee0826202819"}, "httpMethod": "POST", "isBase64Encoded": false, "multiValueHeaders": null, "multiValueQueryStringParameters": null, "path": "/", "pathParameters": null, "queryStringParameters": null, "requestContext": {"httpMethod": "POST", "path": "/", "protocol": "HTTP/1.1", "resourcePath": "/"}, "resource": "/", "routeKey": "POST /", "stageVariables": null, "version": "1.0"}%
```

##### Rate-limited Lambda Function

If the upstream Lambda destination is rate-limited, AWS will send a 429 response to Gloo. In this case, Gloo Gateway will change the status code to `500`. Additionally, it will set the `X-Envoygloo-Lambda-Statuscode` header to `429`, and the `X-Envoygloo-Lambda-Statusreason` header will be set with the reason the Lambda function was throttled. For more information, see the [AWS Lambda Documentation](https://docs.aws.amazon.com/lambda/latest/api/API_Invoke.html).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the target Lambda function is rate-limited, AWS sends back a 429 HTTP response code to Gloo Gateway. Gloo Gateway changes the 429 HTTP response code to 500. In addition, Gloo Gateway sets the X-Envoygloo-Lambda-Statuscode header to 429 and the X-Envoygloo-Lambda-Statusreason header to the reason the Lambda function was throttled. For more information, see the AWS Lambda Documentation.

@sam-heilbron
Copy link

@ashishb-solo I see that this is still listed as 'keep pr updated', but there hasn't been much forward progress in a bit. What's the plan for this PR and what can I do to help on it?

@ashishb-solo
Copy link
Author

closed for now: https://solo-io-corp.slack.com/archives/C08PZTU9WQ7/p1750185475776409

will come back to it later if we do some more aws work in the future.

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

Successfully merging this pull request may close these issues.

4 participants