raptor

command module
v0.0.0-...-c4e97f3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2018 License: MIT Imports: 2 Imported by: 0

README

Raptor

This is an example of AWS GoLang Lambda function that receives an AWS S3 Event and integrates with AWS XRAY.

For a full explanation you can visit my blog post: http://www.hashjoin.com/t/aws-golang-lambda-s3-xray-terraform.html

The Lambda function and it's IAM Policies and Permissions are fully provisioned by Terraform module (see deploy/terraform/modules/lambda/ dir). And terraform init and apply phases are in turn managed by the Makefile:

$ make
build/linux                    Build a linux binary ready to be zip'ed for AWS Lambda Deployment
build/release                  Zip linux binary as AWS Deployment archive
clean                          Remove all build artifacts
clean/linux                    Remove linux build artifacts
deploy/production              Deploy zip'ed archive to AWS production account
deploy/testing                 Deploy zip'ed archive to AWS testing account
help                           Display this help message
test/integration               Integration Testing

Prerequisites

Setup production and testing profiles in ~/.aws/credentials. For example:

$ cat ~/.aws/credentials
[testing]
aws_access_key_id=********************
aws_secret_access_key=****************************************

[production]
aws_access_key_id=********************
aws_secret_access_key=****************************************

To-Do

  1. Setup DLQ Resource. AWS Lambda will automatically retry failed executions for asynchronous invocations. But to really make it bulletproof, you can forward payloads that were not processed to a dead-letter queue (DLQ), such as an SQS queue or an SNS topic.
  2. Setup CloudWatch Alarm to monitor execution errors.
  3. Incorporate all of the above in the Terraform module.
  4. Move Terraform state file to S3.

PRs are welcome.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL