https://github.com/mrtcode/github-lambda-redis
https://github.com/mrtcode/github-lambda-redis
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mrtcode/github-lambda-redis
- Owner: mrtcode
- License: other
- Created: 2017-07-03T19:37:17.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-04T06:32:59.000Z (almost 9 years ago)
- Last Synced: 2025-01-23T23:32:13.783Z (over 1 year ago)
- Language: JavaScript
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# github-lambda-redis
Follow [instructions](https://aws.amazon.com/blogs/compute/dynamic-github-actions-with-aws-lambda/)
to configure GitHub, an SNS topic, and a Lambda function.
Additional configuration for the Lambda function:
* Set runtime to Node.js 6 or higher.
* Set timeout to 1 second.
* Configure VPC (it will be needed to access Redis behind ElastiCache).
Use the following IAM role:
```
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": "arn:aws:logs:*:*:*"
},
{
"Effect": "Allow",
"Action": [
"ec2:CreateNetworkInterface",
"ec2:DescribeNetworkInterfaces",
"ec2:DeleteNetworkInterface"
],
"Resource": "*"
}
]
}
```
Install Node.js modules:
```
npm install
```
Set Redis host in `config.js`.
Build and upload the Lambda function:
```
./update.sh
```