Skip to content
This repository has been archived by the owner on Apr 10, 2019. It is now read-only.
/ GolangLambda Public archive

Example of how to use a Golang binary within a AWS Lambda function.

License

Notifications You must be signed in to change notification settings

DavyJ0nes/GolangLambda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Report Card

Golang Lambda

Description

This repo illustrates how to use a Golang binary within a AWS Lambda function.

The flow of the program is simply that a NodeJS lambda function forks its process to run the Golang program as a child, while feeding in the functions event as a json object.

In this example the event is an SNS Message but this can be extended to accept any event type.

Usage:

#---------- TESTING ----------#
## Generate test event for use with SAM Local CLI
make generate-event

## Test the function using SAM Local CLI
make test

#---------- DEPLOYING ----------#
# Package the function for deployment with Cloudformation
make package s3_bucket=NAME_OF_S3_BUCKET s3_dir=NAME_OF_BUCKET_DIRECTORY

# Deploy the function using Cloudformation
make deploy s3_bucket=NAME_OF_S3_BUCKET s3_dir=NAME_OF_BUCKET_DIRECTORY stack_name=NAME_TO_USE_FOR_CLOUDFORMATION_STACK

Requirements

License

MIT

About

Example of how to use a Golang binary within a AWS Lambda function.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published