Skip to content

user-amanshah/webApp

Repository files navigation

AWS (CSYE 6225)


Summary

This is a web application Bill Management system built with spring boot and deployed on AWS

  • EC2 instances are built on a custom AMI using packer
  • Setting up the network and creation of resources is automated with Cloud formation, aws cli and shell scripts
  • Instances are autoscaled with ELB to handle the web traffic
  • Created a serverless application to facilitate "pending bills email" using SES and SNS
  • The application is deployed with Circle CI and AWS Code Deploy

Architecture Diagram

aws_full

Tools and Technologies

Infrastructure VPC, ELB, EC2, Route53, Cloud formation, Shell, Packer
Webapp Python, FLASK, POSTGRES, Boto3
CI/CD Circle CI, AWS Code Deploy
Alerting and logging statsd, CloudWatch, SNS, SES, Lambda
Security WAF

Infrastructure-setup

  • Create the networking setup using cloud formation and aws cli
  • Create the required IAM policies and users
  • Setup Load Balancers, Route53, DynamoDB, SNS, SES, RDS, WAF

Webapp

  • The Bill Management System Web application is developed using Python Flask framework that uses the REST architecture
  • Secured the application with Basic Authentication Security to retrieve user information
  • Created pip3 dependencies to run the app locally and when deployed on AWS
  • Storing the images of Bill and invoices in S3
  • Generating Pre-signed URL using BOTO3 to with expiration of 60 minutes

Build Instructions

Pre-Requisites: Need to have postman installed

  • Clone this repository into the local system
  • Go to the folder /webapp
  • Download all pip dependencies by running "pip3 install -r requirements.txt"
  • Run WebappApplication by typing python3 views.py or user forever manager to run it in backgroung

Running Tests

  • Used python unittest and junit for load testing test case.
  • Run WebappApplication test cases: python3 -m unittest test_app.py

CI/CD

  • Created a webhook from github to CircleCI
  • Bootstrapped the docker container in CircleCI to run the unit tests, integration tests and generate the artifact
  • The artifact generated is stored S3 bucket and deployed to an autoscaling group. ci-cd

Auto scaling groups

  • Created auto scaling groups to scale to the application to handle the webtraffic and keep the costs low when traffic is low
  • Created cloud watch alarms to scale up and scale down the EC2 instances

Serverless computing

  • Created a pub/sub system with SNS and lambda function
  • When the user request for a list of url to view pending bills within span of "c" days, send message is published to the SNS topic.
  • The lambda function checks for the entry of the emails in DynamoDB if it has no entry then it inserts a record with a TTL of 15 minutes and sends the notification to the user with SES ![alt text]lambda
  • Implemented CI to build out an AMI and share it between organization on AWS
  • Created provisioners and bootstrapped the EC2 instance with required tools like FLASK, cloudformation, Python

Team Information

Name NEU ID Email Address
AMAN SHAH 001059664 shah.ama@northeastern.edu

About

web application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published