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: examples/powertools-examples-serialization/README.md
+18-12Lines changed: 18 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -2,20 +2,26 @@
2
2
3
3
This project contains an example of Lambda function using the serialization utilities module of Powertools for AWS Lambda (Java). For more information on this module, please refer to the [documentation](https://docs.powertools.aws.dev/lambda-java/utilities/serialization/).
4
4
5
-
## Deploy the sample application
5
+
The project contains two `RequestHandler`s -
6
+
7
+
*[APIGatewayRequestDeserializationFunction](src/main/java/org/demo/serialization/APIGatewayRequestDeserializationFunction.java) - Uses the serialization library to deserialize an API Gateway request body
8
+
*[SQSEventDeserializationFunction](src/main/java/org/demo/serialization/SQSEventDeserializationFunction.java) - Uses the serialization library to deserialize an SQS message body
9
+
10
+
In both cases, the output of the serialized message will be printed to the function logs. The message format
11
+
in JSON looks like this:
6
12
7
-
This sample is based on Serverless Application Model (SAM) and you can use the SAM Command Line Interface (SAM CLI) to build it and deploy it to AWS.
13
+
```json
14
+
{
15
+
"id":1234,
16
+
"name":"product",
17
+
"price":42
18
+
}
19
+
```
8
20
9
-
To use the SAM CLI, you need the following tools.
21
+
## Deploy the sample application
10
22
11
-
* SAM CLI - [Install the SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html)
12
-
* Java11 - [Install the Java 11](https://docs.aws.amazon.com/corretto/latest/corretto-11-ug/downloads-list.html)
0 commit comments