Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace eawsy/aws-lambda-go and add SSM Parameter Store support #59

Closed
wants to merge 4 commits into from

Conversation

paulolai
Copy link
Contributor

@paulolai paulolai commented Oct 18, 2018

Replace eawsy/aws-lambda-go with AWS's aws-lambda-go
Cleanup and update documentation
Fix AWS vendor files
Add support for reading the Buildkite agent token from SSM

@lox I've cleaned up the commits so that each some make sense on their own. I've removed the Makefile, have switched back to handler.handle (note that you will still need to change the lambda runtime from python2.7 to go1.x ), updated the build scripts and bumped up the version number.

I've removed build_lambda.sh as I removed eawsy/aws-lambda-go, instead I modified build_binaries.sh to manually create the package (renaming then zipping it).

build_binaries.sh now no longer takes arguments, instead it always builds the darwin and linux arm64 binaries and creates the lambda package. It only requires BUILDKITE_BUILD_NUMBER to have been set. You will need to change your tooling to account for that.

You normally use cloudformation, I don't know enough about that so I've included the TF file I've written for my own use as a reference, you should update your cloudformation file (update the runtime to go1.x from python2.7).

I don't have buildkite-agent on my system to upload the artifacts, you'll need to test that part of the scripts yourself.

Replaces github.com/eawsy/aws-lambda-go/service/lambda/runtime with github.com/aws/aws-lambda-go/lambda
This uses the runningInLambda() function from https://github.com/bcongdon/corral/blob/2c8445a2388a9f33e44cd1bf16d252c4a13589a3/lambda.go#L27
* Replace all references from buildkite-metrics to buildkite-agent-metrics
* Update README, added a reference to the build scripts which already exist
* Add an example tf file.
* Finish off updating package name and removal of eawsy/aws-lambda-go
* Bump up version number to 3.2.0 due to library changes
@paulolai
Copy link
Contributor Author

@lox Please take a look, this replaces my other two pending PRs

@paulolai paulolai changed the title Replace eawsy/aws-lambda-go and add SSM support for token Replace eawsy/aws-lambda-go and add SSM parameter store support Oct 23, 2018
@paulolai paulolai changed the title Replace eawsy/aws-lambda-go and add SSM parameter store support Replace eawsy/aws-lambda-go and add SSM Parameter Store support Oct 23, 2018
@paulolai
Copy link
Contributor Author

@lox please take a look. btw, a clean checkout of buildkite-agent-metrics does NOT currently build successfully, e.g. running go get github.com/buildkite/buildkite-agent-metrics fails with an error (I tested it by by changing my GOPATH to get a clean run).

It doesn't not appear to be related to my two other PRs you merged in earlier.

@lox lox mentioned this pull request Nov 1, 2018
@lox
Copy link
Contributor

lox commented Nov 1, 2018

Thanks for this @paulolai, there was a lot going on in this PR still. I tackled updating to aws-lambda-go in #60 and I've also updated to golang 1.11 in #61.

I've also updated vendors to the latest in #62.

Are you able to put in a PR just for the "Add support for reading the Buildkite agent token from SSM" piece of this PR? We can deal with the terraform stuff separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants