Skip to content

Moesif/moesif-aws-lambda-go-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Moesif AWS Lambda Example for Go

Moesif is an API analytics platform. moesif-aws-lambda-go is a middleware that logs API calls to Moesif for AWS Lambda.

This example is a Go application with Moesif's API analytics and monitoring integrated.

How to run this example.

Make sure moesif-aws-lambda-go is installed. If not, you could install with go get github.com/moesif/moesif-aws-lambda-go

Create a new AWS Lambda function that is trigged by AWS API Gateway

Create a zip using following steps:

  1. GOOS=linux go build main.go
  2. zip function.zip main

Upload this zip, when prompted for handler, enter main

You will also want to add an environment vairable MOESIF_APPLICATION_ID with the value being your application id from your Moesif account.

Your Moesif Application Id can be found in the Moesif Portal. After signing up for a Moesif account, your Moesif Application Id will be displayed during the onboarding steps.

You can always find your Moesif Application Id at any time by logging into the Moesif Portal, click on the top right menu, and then clicking Installation.

Go to the URL for the API gateway such as https://XXXXXX.execute-api.us-west-2.amazonaws.com/default/my-test-function

The API Calls should show up in Moesif.

About

Example using Moesif API Analytics with AWS Lambda

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages