diff --git a/docs/gateways/aws-sqs.md b/docs/gateways/aws-sqs.md index 19bf12b845..7aa254d35a 100644 --- a/docs/gateways/aws-sqs.md +++ b/docs/gateways/aws-sqs.md @@ -8,8 +8,18 @@ The gateway consumes messages from AWS SQS queue. 2. Create the [event Source](https://github.com/argoproj/argo-events/tree/master/examples/event-sources/aws-sqs.yaml). Because SQS works on polling, you need to provide a `waitTimeSeconds`. - 3. Deploy the [sensor](https://github.com/argoproj/argo-events/tree/master/examples/sensors/aws-sqs.yaml). ## Trigger Workflow As soon as there a message is consumed from SQS queue, a workflow will be triggered. + +## How to parse JSON payload +As you know, the SQS message may be plan text or JSON. In case that you will send a JSON structure, you can define the `path` field. +For example, the SQS message is `{"foo":"bar"}` and on the resourceParameters section will be defined like this: +```yaml +resourceParameters: + - src: + event: "aws-sqs-gateway:notification-1" + path: "foo" + dest: spec.arguments.parameters.0.value +```