Skip to content

Commit

Permalink
Merge pull request #66 from buildkite/clarify-lambda-handler-in-readme
Browse files Browse the repository at this point in the history
Clarify lambda handler in README, add example
  • Loading branch information
lox authored Dec 11, 2018
2 parents 48ecc98 + 984aba1 commit 65fb162
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,23 @@ buildkite-agent-metrics -token abc123 -interval 30s -queue my-queue

An AWS Lambda bundle is created and published as part of the build process.

It's entrypoint is `handler.handle`, it requires a `python2.7` environment and respects the following env vars:
It's entrypoint is `handler`, it requires a `go1.x` environment and respects the following env vars:

- BUILDKITE_TOKEN
- BUILDKITE_BACKEND
- BUILDKITE_QUEUE
- BUILDKITE_QUIET
- BUILDKITE_CLOUDWATCH_DIMENSIONS

Take a look at https://github.com/buildkite/elastic-ci-stack-for-aws/blob/v3.3.0/templates/metrics.yml for examples of usage.
```bash
aws lambda create-function \
--function-name buildkite-agent-metrics \
--memory 128 \
--role arn:aws:iam::account-id:role/execution_role \
--runtime go1.x \
--zip-file fileb://handler.zip \
--handler handler
```

### Backends

Expand Down

0 comments on commit 65fb162

Please sign in to comment.