https://github.com/achannarasappa/aws-scheduled-lambda-example
Minimal example of a Lambda function triggered on an interval
https://github.com/achannarasappa/aws-scheduled-lambda-example
Last synced: 7 months ago
JSON representation
Minimal example of a Lambda function triggered on an interval
- Host: GitHub
- URL: https://github.com/achannarasappa/aws-scheduled-lambda-example
- Owner: achannarasappa
- Created: 2020-01-05T02:18:02.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-05T02:18:19.000Z (almost 6 years ago)
- Last Synced: 2025-01-19T12:50:23.200Z (9 months ago)
- Language: HCL
- Size: 1000 Bytes
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Scheduled AWS Lambda function with Terraform
Minimal example of a Lambda function triggered on an interval.
### Setup
1. Install [terraform](https://www.terraform.io/downloads.html)
1. [Configure aws-cli](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html)
1. Initialize terraform `terraform init`### Usage
1. Build `rm -rf src.zip && zip -r ./src.zip ./src`
1. Push to AWS `terraform apply`
1. Invoke function `aws lambda invoke --invocation-type RequestResponse --function-name scheduled_lambda --region us-east-1 --profile default out.txt`
1. View log output on [CloudWatch](https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#logStream:group=/aws/lambda/scheduled_lambda;streamFilter=typeLogStreamPrefix)