[Cloud] - Basic Power Calculator on AWS
Basic Power Calculator on AWS
Overview: The Basic Power Calculator app was deployed using AWS Amplify, providing a seamless integration for front-end hosting and backend service management.
Experiment referenced from this <tutorial>
Code in the Project can be found here
Architecture:

- AWS Amplify: Utilized for deploying and hosting the frontend of the application. Amplify simplifies the process of connecting the app to the backend services.
- API Gateway: Serves as the endpoint to trigger AWS Lambda functions. API Gateway handles the HTTP requests from the frontend and forwards them to the appropriate Lambda function for processing.
- AWS Lambda: Used for the core computation of the power calculator. This serverless compute service allows the calculator to execute the required computations in response to the API Gateway’s requests.
- DynamoDB: Integrated as the database to store unique results. Whenever a calculation is performed, the result is checked against DynamoDB to see if it already exists; if not, it is stored for future reference.
- IAM (Identity and Access Management): Ensures secure access and permissions management. IAM roles and policies are configured to allow the necessary permissions for the Lambda function to read/write from DynamoDB and for API Gateway to invoke the Lambda function.
Workflow:
- The user interacts with the Power Calculator app hosted on AWS Amplify.
- The app sends a request to the API Gateway.
- API Gateway forwards the request to the AWS Lambda function.
- The Lambda function performs the power calculation.
- The result is then stored in DynamoDB if it’s unique.
- The computed result is returned to the user through the API Gateway.
Benefits:
- Scalability: Leveraging AWS Lambda and DynamoDB ensures that the application can scale automatically with demand.
- Cost-efficiency: Using serverless architecture (Lambda and DynamoDB) reduces costs as you only pay for what you use.
- Flexibility: AWS Amplify makes it easy to manage both the frontend and backend, facilitating rapid development and deployment.