Skip to content

Latest commit

 

History

History
115 lines (95 loc) · 7.14 KB

File metadata and controls

115 lines (95 loc) · 7.14 KB

Week X - Clean Up and validate functionality

The following information outlines tasks that I've completed for Week X of the bootcamp.

The objective is to clean up the application and validate functionality as any new course topics have officially ended (5/13/23).

Created Frontend Files

  • Deployed the following code:
REACT_APP_BACKEND_URL="https://api.cruddur.net" \
REACT_APP_AWS_PROJECT_REGION="$AWS_DEFAULT_REGION" \
REACT_APP_AWS_COGNITO_REGION="$AWS_DEFAULT_REGION" \
REACT_APP_AWS_USER_POOLS_ID="us-east-1_Pzbe5SksT" \
REACT_APP_CLIENT_ID="3fh1vt9f05kih07blqk4if3oqb" \
npm run build
  • Corrected multiple warnings found as a result. Ref
  • Created bin/frontend/static-build.
  • Compressed frontend-react-js/build into zip.
  • Download the zip and extract the contents.

Enter Sync Tool

CFN Frontend

CFN Frontend

  • Upload the contents to S3 bucket named cruddur.net.

Frontend S3 Bucket

Reconnect Database and Post Confirmation Lambda to Application

Prep

  • Stablized the app to make sure backend and frontent images are current.
  • Run:
  • bin\backend\build - builds the image
  • bin\backend\push - pushes the image to ECR
  • bin\backend\register- registers a new task definition
  • In the CF Fargate Service - Update the backend container with latest task definiton created in the previous step.
  • Update env varibles for with export DB_SG_RULE_ID="NEW CFN Security Group Rule ID" AND gp env DB_SG_RULE_ID="NEW CFN Security Group Rule ID"
  • Update env varibles for with export DB_SG_ID="NEW CFN Security Group ID" AND gp env DB_SG_ID="NEW CFN Security Group ID"
  • Connect to production (AWS RDS) Postgres db.
    NOTE: Be sure that the enviroment variables are pointing to the production database.
    NOTE: The site frontend failed to show and actitvies results so we pivoted to setting up a new conginto user by signing up again (and deleting the existing account).
    • We then pivoted to creating an error message to show instead of a blank page.
    • Updated bin\cfn\frontend\template.yaml to include custom error page code.
      NOTE: Be sure that Lambda for post comfirmation has the correct env varibles set in the configuration section.
      NOTE: There may be a timeout error displayed after new signup on cruddur and following the confirmation verification.
  • In the AWS Console - Updated Lambda for post confirmation to reflect the correct Cruddur (CFN) VPC and not the default VPC.
  • In the AWS Console - Create a new security group CognitoLambdaSG for Lambda
  • In the AWS Console - Updated the Lambda for post confirmation to reflect the correct Cruddur (CFN) public subnets.
  • In the AWS Console - Updated Lambda for post confirmation aws/lambdas/cruddur-post-confirrmation.py

Conclusion Successfully reconnected the AWS RDS postgres db to the application and configured the confirmation lambda into the production enviroment.

Frontend S3 Bucket

CI/CD Pipeline and Post Create Activity

Refactor

  • A series of changes to refactor the code base and resolve defects new and old.

Refactor JWT to use a decorator

Refactor backend-flask/app.py

  • Made substantial changes to backend-flask\app.py.

Refactor Flask Routes

Refactor Error Handling and Fetch Requests

  • Most features (Profile, messages) work accept the replies and activities display on the home page screen shows blank.
  • The logs for the backend shows error “LINE 27: replies.reply_to_activity_uuid = activities.uuid” and the dev console shows a 500 error.
  • Updated ActivityFeed.js and Activity.css to display message when there is no content to display instead of a blank screen.

Refactor Activity Show Page

  • Made substantial changes to backend-flask\app.py.

Clean Up Part 1

  • The purpose of this effort was to reach a state where the application was stable although not all functionality was addressed.
  • Made substantial changes to multiples files.

Clean Up Part 2

  • Continued to reach a state where the application was stable although not all functionality was addressed.
  • Made substantial changes to multiples files.
  • Moved files from the development enviroment into the AWS production environment using Cloudformation for the backend and the sync tool for the frontend.

BootCamp Complete