/aws-lambda-link-shorter

Link Shorter is a simple API to create short links using AWS Lambda and DynamoDB.

Primary LanguageGoMIT LicenseMIT

Link Shorter

AWS Lambda example using Go, DynamoDB and API Gateway

build codecov Go Report Card

Endpoints

Create short link

POST /shorten

Supported attributes:

Attribute Type Required
title string Yes
link string Yes

Example:

curl --request POST \
  --url {{baseURL}}/shorten \
  --header 'Content-Type: application/json' \
  --data '{
	"title": "My Link",
	"link": "http://www.example.com",
}'

Redirect to original link

GET /{{shortLink}}

Example:

curl --request GET \
  --url {{baseURL}}/{{shortLink}}