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.
This commit is contained in:
parent
5ed163ce3f
commit
1d5206f53e
1 changed files with 7 additions and 1 deletions
|
@ -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…
Reference in a new issue