All Projects → snsinfu → terraform-lambda-example

snsinfu / terraform-lambda-example

Licence: other
Hello World example of AWS Lambda

Programming Languages

HCL
1544 projects
go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to terraform-lambda-example

Aws Maintenance Lambda
A lambda function to send alerts (to Slack, HipChat) on AWS maintenance events.
Stars: ✭ 133 (+280%)
Mutual labels:  aws-lambda, terraform
Aws Csa Notes 2018
My AWS Certified Solutions Architect Associate Study Notes!
Stars: ✭ 167 (+377.14%)
Mutual labels:  aws-lambda, aws-apigateway
Serverless Sam
Serverless framework plugin to export AWS SAM templates for a service
Stars: ✭ 143 (+308.57%)
Mutual labels:  aws-lambda, aws-apigateway
Serverless static website with basic auth
Builds a serverless infrastructure in AWS for hosting a static website protected with Basic Authentication and published on a subdomain registered via Route 53
Stars: ✭ 112 (+220%)
Mutual labels:  aws-lambda, terraform
aws-sync-routes
Synchronizes the specified route from the main/default route table to all custom route tables in the VPC.
Stars: ✭ 16 (-54.29%)
Mutual labels:  aws-lambda, aws-apigateway
Hello Lambda
🔥 An example of a Python (AWS) Lambda exposed with API Gateway, configured with Terraform.
Stars: ✭ 114 (+225.71%)
Mutual labels:  aws-lambda, terraform
Archive aws Lambda Go Net
Network I/O interface for AWS Lambda Go runtime.
Stars: ✭ 151 (+331.43%)
Mutual labels:  aws-lambda, aws-apigateway
Chalice
Python Serverless Microframework for AWS
Stars: ✭ 8,513 (+24222.86%)
Mutual labels:  aws-lambda, aws-apigateway
Aws Lambda Typescript
This sample uses the Serverless Application Framework to implement an AWS Lambda function in TypeScript, deploy it via CloudFormation, publish it through API Gateway to a custom domain registered on Route53, and document it with Swagger.
Stars: ✭ 228 (+551.43%)
Mutual labels:  aws-lambda, aws-apigateway
Apilogs
Easy logging and debugging for Amazon API Gateway and AWS Lambda Serverless APIs
Stars: ✭ 216 (+517.14%)
Mutual labels:  aws-lambda, aws-apigateway
Aws Sam Golang Example
An example API and Worker written in Golang using the Amazon Serverless Application Model (AWS SAM)
Stars: ✭ 73 (+108.57%)
Mutual labels:  aws-lambda, aws-apigateway
lambda-facebook-oauth
An AWS Lambda function to facilitate Oauth2 social login with Facebook
Stars: ✭ 16 (-54.29%)
Mutual labels:  aws-lambda, aws-apigateway
Curso Aws Com Terraform
🎦 🇧🇷 Arquivos do curso "DevOps: AWS com Terraform Automatizando sua infraestrutura" publicado na Udemy. Você pode me ajudar comprando o curso utilizando o link abaixo.
Stars: ✭ 62 (+77.14%)
Mutual labels:  aws-lambda, terraform
Architect
The simplest, most powerful way to build serverless applications
Stars: ✭ 1,925 (+5400%)
Mutual labels:  aws-lambda, aws-apigateway
Alagarr
🦍 Alagarr is a request-response helper library that removes the boilerplate from your Node.js (AWS Lambda) serverless functions and helps make your code portable.
Stars: ✭ 58 (+65.71%)
Mutual labels:  aws-lambda, aws-apigateway
Awsmobile Cli
CLI experience for Frontend developers in the JavaScript ecosystem.
Stars: ✭ 147 (+320%)
Mutual labels:  aws-lambda, aws-apigateway
Aws Lambda Dotnet
Libraries, samples and tools to help .NET Core developers develop AWS Lambda functions.
Stars: ✭ 945 (+2600%)
Mutual labels:  aws-lambda, aws-apigateway
Terraform Sqs Lambda Trigger Example
Example on how to create a AWS Lambda triggered by SQS in Terraform
Stars: ✭ 31 (-11.43%)
Mutual labels:  aws-lambda, terraform
Go Lambda Ping
Deploy a Lambda to Ping a Site in 20 Seconds!
Stars: ✭ 195 (+457.14%)
Mutual labels:  aws-lambda, terraform
hyper-kube-config
H Y P E R K U B E - A Serverless API and kubectl plugin providing a storage and retrieval Kubernetes cluster credentials. Hyperkube leverages AWS Secrets Manager for storing credential information.
Stars: ✭ 27 (-22.86%)
Mutual labels:  aws-lambda, aws-apigateway

Terraform + Golang AWS Lambda + API Gateway

This is a minimal Hello World example of deploying an HTTP API backed by an AWS Lambda function. The function is written in Go and deployment is automated with Terraform.

Prerequisites

Terraform and Go

Install Terraform and Go. On macOS with Homebrew:

$ brew install go terraform

AWS credentials

Configure your AWS access key and secret key with the aws configure command, or just create a file ~/.aws/credentials containing the keys:

[default]
aws_access_key_id = KEY
aws_secret_access_key = KEY

The access key ID and the secret access key can be generated in the AWS management console.

AWS region

The environment variable AWS_DEFAULT_REGION should be set to your favorite region. us-east-1 would just work if you are not sure:

$ export AWS_DEFAULT_REGION=us-east-1

This environment variable is used by the Terraform AWS provider.

Usage

Run make to build and deploy an API:

$ make

In the process Terraform will ask you for a confirmation, so type yes. Everything should finish in less than a minute! After this you can play with the API:

$ curl -fsSL $(terraform output -raw url)?name=world
Hello, world!
$ curl -fsSL $(terraform output -raw url)?name=lambda
Hello, lambda!

Cleanup:

$ make clean

About the Makefile

The Makefile is for convenience and does nothing special. It just runs following commands for you:

$ terraform init
$ go get .
$ GOOS=linux GOARCH=amd64 go build -o hello
$ zip hello.zip hello
$ terraform apply
$ terraform destroy

References

Lambda

API Gateway

Terraform

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].