Drone plugin to trigger lambda function
286
A Drone plugin to invoke lambda function. This plugin invokes lambda functions using cross account IAM roles.
pipeline:
notify:
image: kayako/drone-lambda
account: 1234567890
function: NotifyBuild
payload:
message: "something happened"
reason: "Somebody pushed a commit to repository"
The configuration above will
arn:aws:iam::1234567890:role/ci in AWS account 1234567890NotifyBuild in account 1234567890 with payload {"message": "something happened", "reason": "Somebody pushed a commit to repository"}Create an IAM role in target AWS account and allow the CI account to assume the role. Make sure that the IAM role has adequate permissions to invoke the lambda function.
account: The AWS account ID of the target environment.use_ci_role: IAM role name to use. Defaults to ci.region: AWS region where the Lambda function will be invoked.function: Name of the lambda function to invoke.payload: Key value pairs that will be encoded as JSON and passed to lambda function as payload.fail_on_error: Set to false to continue the build even if there is an error with lambda invocation.To rewriting pipeline steps for separate AWS accounts you can specify the account numbers as build
secret and omit account parameter.
Following is the order of lookup for account number:
account parameteraccount_number_${DRONE_DEPLOY_TO} environment variableaccount_number_${DRONE_BRANCH} environment variableaccount_number environment variableContent type
Image
Digest
Size
34.8 MB
Last updated
almost 9 years ago
docker pull kayako/drone-lambda