Skip to content

ega4432/go-lambda-twitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-lambda-twitter

ci cd

This is a repository for go-lambda-twitter - Twitter client built by API Gateway + Lambda in AWS.

.
├── Makefile                    <-- Make to automate build
├── README.md                   <-- This instructions file
├── lambda                      <-- Source code for a lambda function
│   ├── main.go                 <-- Lambda function code
│   └── main_test.go            <-- Unit tests
└── template.yaml

Requirements

Setup process

Installing dependencies & building the target

make

Local development

Invoking function locally through local API Gateway

cp env.example.json env.json

make api

Calling health check endpoint with cURL

# GET
curl --request GET \
    --url http://127.0.0.1:3000/health | jq .
{
  "message": "OK"
}

# POST
curl --request POST \
  --url http://127.0.0.1:3000/tweet \
  -d '{ "text": "test" }' | jq .
{
  "message": "Tweeted successfully",
  "tweet_text": "test",
  "tweet_url":"https://twitter.com/ega4432/status/1555603271665913856"
}

Packaging and deployment

From local

cp .env.example .env

make deploy

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published