So far, we have been focusing on ensuring data gets from the buoy sensors to the Dashboard through the cloud. But we also need to account for being able to communicate from the Client dashboard to specific buoys or even to individual sensors. This fine grain through the dashboard will be essential for changing sensor configurations such as setting measurement time intervals or even disabling a device entirely.
There are two main ways to establish communication between AWS services and dashboard.
- Integrate AWS SDK with dashboard API
- Create unique API for Cloud services
The first option to integrate the AWS SDK with the dashboard team’s API should be considered for future teams, as it helps consolidate all services into a single API service. However, since we were dealing with time constraints, we ended up resorting to the second option to help decouple dependencies between teams.
We used the following cloud architecture schema to create a simple API using AWS API gateway and AWS Lambda.
AWS API Gateway is a fully managed service that makes it easy for us to create, publish, maintain, monitor, and secure APIs at any scale. Using API gateway allows us to create RESTful APIs or even WebSocket APIs that enable two-way communication between AWS services and other applications specifically with the Dashboard.
AWS Lambda is a compute service that lets us run code without provisioning or managing servers. It allows us to run isolated code on high-availability compute infrastructure and performs administration of the compute resources.