Pass a JSON file to the Lambda's payload (#63261)

* Add an example of passing a JSON file to the Lambda's payload
Events passed to Lambda are commonly in JSON format, the change provides an example of using JSON file as an alternative to the inline YAML payload in the other examples.
pull/63261/merge
Saleh Batati 5 years ago committed by Alicia Cozine
parent 5ed163ce3f
commit 1d5206f53e

@ -106,7 +106,13 @@ EXAMPLES = '''
wait: true wait: true
tail_log: true tail_log: true
register: response register: response
# the response will have a `logs` key that will contain a log (up to 4KB) of the function execution in Lambda. # the response will have a `logs` key that will contain a log (up to 4KB) of the function execution in Lambda
# Pass the Lambda event payload as a json file.
- execute_lambda:
name: test-function
payload: "{{ lookup('file','lambda_event.json') }}"
register: response
- execute_lambda: - execute_lambda:
name: test-function name: test-function

Loading…
Cancel
Save