Skip to content

mehmetmgrsl/aws-simple-webapp

Repository files navigation

Simple Web App

A simple web application that takes the base and exponent numbers and finds the result using the following AWS services.

architecture.png

  • AWS Amplify: Build full-stack web and mobile apps

  • Amazon API Gateway: It is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs.

  • AWS Lambda: It is a cloud service that lets you run code without provisioning or managing servers (serverless).

  • Amazon DynamoDB: Serverless, NoSQL database.

  • AWS IAM: Manage identities and access to AWS services and resources

How to

  1. Create a web page (check the index.html)

  2. Create a zip file of the index.html

  3. Deploy the zip file (index.zip) using AWS amplify

deploy_app.png

  1. Create a Lambda function called powerOfNumbers

    • paste the python code (powerOfNumbers.py) to the code part like below

      • powerOfNumbers.png
    • Press the "Deploy" to deploy the code.S

  2. Create a Rest API using Amazon API Gateway

  1. Save the result into the DynamoDB
  • Create a Table

    • createTable.png

    • Give permission to Lambda function to be able to write/delete/read/update data to DynamoDB:

      • permissionToWriteDynamoDB.png
    • Update the python code in the Lambda (using powerOfNumbersWithSaveItDB.py) like below:

      • powerOfNumbersWithSaveItDB.png
  1. Update index.html to reach the API Gateway
  • Replace "YOUR API GATEWAY ENDPOINT" value in the index.html with your API Gateway's endpoint.

    • api-gw-endpoint.png

    • Create a zip file of the index.html again.

    • Deploy the zip file (index.zip) using AWS amplify again.

    • Test it again

      • test.png
  1. After completing your work/test, delete all the AWS resources that you have created:
  • Delete the app from AWS Amplify

  • Delete the table from DynamoDB

  • Delete the function from Lambda

  • Delete the API from API Gateway

  • Delete the roles from IAM

Resources

  1. AWS Project - Architect and Build an End-to-End AWS Web Application from Scratch, Step by Step - Tiny Technical Tutorials

  2. https://aws.amazon.com/pm/lambda/

  3. https://aws.amazon.com/amplify/

  4. https://aws.amazon.com/api-gateway/

  5. https://aws.amazon.com/dynamodb/

  6. https://aws.amazon.com/iam/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published