2020-10-28 18:12:01 +00:00
|
|
|
# aws lambda
|
|
|
|
|
2024-03-04 09:32:50 +00:00
|
|
|
> Use AWS Lambda, a compute service for running code without provisioning or managing servers.
|
2021-04-10 16:14:55 +01:00
|
|
|
> More information: <https://docs.aws.amazon.com/cli/latest/reference/lambda/>.
|
2020-10-28 18:12:01 +00:00
|
|
|
|
|
|
|
- Run a function:
|
|
|
|
|
2024-01-31 03:55:19 +00:00
|
|
|
`aws lambda invoke --function-name {{name}} {{path/to/response.json}}`
|
2020-10-28 18:12:01 +00:00
|
|
|
|
|
|
|
- Run a function with an input payload in JSON format:
|
|
|
|
|
2024-01-31 03:55:19 +00:00
|
|
|
`aws lambda invoke --function-name {{name}} --payload {{json}} {{path/to/response.json}}`
|
2020-10-28 18:12:01 +00:00
|
|
|
|
|
|
|
- List functions:
|
|
|
|
|
|
|
|
`aws lambda list-functions`
|
|
|
|
|
|
|
|
- Display the configuration of a function:
|
|
|
|
|
|
|
|
`aws lambda get-function-configuration --function-name {{name}}`
|
|
|
|
|
|
|
|
- List function aliases:
|
|
|
|
|
|
|
|
`aws lambda list-aliases --function-name {{name}}`
|
|
|
|
|
|
|
|
- Display the reserved concurrency configuration for a function:
|
|
|
|
|
|
|
|
`aws lambda get-function-concurrency --function-name {{name}}`
|
|
|
|
|
|
|
|
- List which AWS services can invoke the function:
|
|
|
|
|
|
|
|
`aws lambda get-policy --function-name {{name}}`
|