POC ClojureScript AWS Lambda Function
Usage
Create a Lambda function in your AWS account:
$ zip -r lambda.zip index.js node_modules out
$ lein npm install
$ aws lambda upload-function \
--region us-west-2 \
--function-name dns-resolver \
--function-zip ./lambda.zip \
--timeout 10 \
--runtime nodejs \
--handler handler \
--mode event \
--role arn:aws:iam::<your AWS account ID>:role/lambda_exec_role
Test the Lambda in the AWS console, with the following input:
{
"domain": "example.com",
"type": "A"
}
DIY
lein new mies-node my-lambda
cd my-lambda && lein npm install
- Create an
index.js
to export your function zip -r lambda.zip index.js node_modules out