This is a living document (i.e. incomplete) that describes how to deploy the AWS Secrets plugin as a Lambda function. I will refine this document over time, but to start, here is a script that can be used to build the plugin, create the lambda function, and update the lambda function:
#!/bin/sh
export GOOS=linux
export GOARCH=amd64
export CGO_ENABLED=0
set -x
set -e
go build -o release/linux/amd64/drone-aws-secrets-manager \
github.com/drone/drone-amazon-secrets/cmd/drone-amazon-secrets-lambda
cd release/linux/amd64/
zip drone-aws-secrets-manager.zip ./drone-aws-secrets-manager
aws lambda create-function \
--region us-east-1 \
--function-name drone-aws-secrets-manager \
--memory 128 \
--role arn:aws:iam::xxxxxxxx:role/secrets-manager \
--runtime go1.x \
--zip-file fileb://drone-aws-secrets-manager.zip \
--environment Variables={DRONE_SECRET=xxxxxxxxxxxx} \
--handler drone-aws-secrets-manager
aws lambda update-function-code \
--region us-east-1 \
--function-name drone-aws-secrets-manager \
--zip-file fileb://drone-aws-secrets-manager.zip