contactform-lambda

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

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

Go to latest
Published: Sep 9, 2018 License: MIT Imports: 8 Imported by: 0

README

contactform-lambda - A serverless app to serve the contactform

A serverless tool designed to serve a contactform.

Layout

.                    
├── test            
│   └── event.json      <-- Sample event to test using SAM local
├── util                
│   ├── http.go         <-- Utils to interact with HTTP requests
│   ├── os.go           <-- Utils to interact with the Operating System
│   ├── s3.go           <-- Utils to interact with Amazon S3
│   └── ssm.go          <-- Utils to interact with Amazon SSM
├── .gitignore          <-- Ignoring the things you do not want in git
├── LICENSE             <-- The license file
├── main.go             <-- The Lambda code
├── Makefile            <-- Makefile to build and deploy
├── README.md           <-- This file
└── template.yaml       <-- SAM Template

Installing

There are a few ways to install this project

Get the sources

You can get the sources for this project by simply running

$ go get -u github.com/retgits/contactform-lambda/...
Deploy

Deploy the Lambda app by running

$ make deploy

Parameters

AWS Systems Manager parameters

The code will automatically retrieve the below list of parameters from the AWS Systems Manager Parameter store:

  • /google/recaptcha/secret: Your reCAPTCHA Secret Token (check the Google reCAPTCHA documentation on how to get this parameter)
  • /google/recaptcha/email: A validated email address in SES (check the Google reCAPTCHA documentation on how to get this parameter)
Deployment parameters

In the template.yaml there are certain deployment parameters:

  • region: The AWS region in which the code is deployed

Make targets

contactform-lambda has a Makefile that can be used for most of the operations

usage: make [target]
  • deps: Gets all dependencies for this app
  • clean : Removes the dist directory
  • build: Builds an executable to be deployed to AWS Lambda
  • test-lambda: Clean, builds and tests the code by using the AWS SAM CLI
  • deploy: Cleans, builds and deploys the code to AWS Lambda

Documentation

Overview

Package main is the main implementation of the contactform serverless app.

Directories

Path Synopsis
Package util implements utility methods
Package util implements utility methods

Jump to

Keyboard shortcuts

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