Skip to content

Basic implementation of an AWS SAM service in Go producing weather events

Notifications You must be signed in to change notification settings

sv3ndk/weather_api_demo_go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather API demo

Status

  • REST integration:

    • a REST API exposed via the API Gateway allows to query weather events.
    • a CLI client app queries this REST endpoint
    • API keys are configured to limit traffic (usage/quotas)
    • authentication is based on mutual TLS
  • websocket integration:

    • a websocket endpoint is exposed on the API Gateway
    • the on-connect lambda keeps track of the currently connected websocket clients
    • the ws-push lambda is notified when events are added to DynamoDB and forwards them to all currently connected websocket clients
    • a CLI websocket client streams weather events from the websocket endpoint and prints them
  • both the REST and websocket endpoints are exposed on a custom DNS domain

  • a data generator lambda, triggered every minute, adds random weather events to DynamoDB

TODO (maybe)

  • handle SIGINT correcty in ws socket client
  • add Webocket security: API key? Or first request a temp token through REST, then pass it in the connect ws phase
  • add OpenAPI spec to REST endpoint

References

Go AWS SDK

Go DynamoDB SDK

Security

About

Basic implementation of an AWS SAM service in Go producing weather events

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published