You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/utilities/data_classes.md
+4-51
Original file line number
Diff line number
Diff line change
@@ -1124,69 +1124,22 @@ This example is based on the AWS Blog post [Introducing Amazon S3 Object Lambda
1124
1124
1125
1125
### VPC Lattice
1126
1126
1127
-
The VPC Lattice service supports Lambda invocation for requests over both HTTP and HTTPS. The service sends an event in JSON format, and adds the `X-Forwarded-For` header to every request. The service also adds the X-Forwarded-Proto header to requests over HTTPS.
1127
+
You can register your Lambda functions as targets within an Amazon VPC Lattice service network. By doing this, your Lambda function becomes a service within the network, and clients that have access to the VPC Lattice service network can call your service.
1128
1128
1129
-
The service Base64 encodes the body and sets isBase64Encoded to true, if the content-encoding header is present, and the content type is not one of the following:
1130
-
1131
-
*`text/*`
1132
-
*`application/json`
1133
-
*`application/xml`
1134
-
*`application/javascript`
1135
-
1136
-
If the content-encoding header is not present, Base64 encoding depends on the content type. For the content types, `text/*`, `application/json`, `application/xml`, and `application/javascript`, the service sends the body as is and sets `is_base64_encoded` to `false`.
1129
+
[Click here](https://docs.aws.amazon.com/lambda/latest/dg/services-vpc-lattice.html){target="_blank"} for more information about using AWS Lambda with Amazon VPC Lattice.
1137
1130
1138
1131
=== "app.py"
1139
1132
1140
1133
```python
1141
-
from aws_lambda_powertools.utilities.data_classes import event_source, VPCLatticeEvent
The response from your Lambda function must include the Base64 encoding status, status code, and headers. You can omit the body.
1185
-
1186
-
To include a binary content in the body of the response, you must Base64 encode the content and set `isBase64Encoded` to `True`. The service decodes the content to retrieve the binary content and sends it to the client in the body of the HTTP response.
1187
-
1188
-
The VPC Lattice service does not honor hop-by-hop headers, such as `Connection` or `Transfer-Encoding`. You can omit the `Content-Length` header because the service computes it before sending responses to clients.
0 commit comments