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).
- 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.
- Teacherseat Github
- Create
bin/frontend/sync
. - Install
gem install aws_s3_website_sync
. - Install
gem install dotenv
.
CFN Frontend
- Upload the contents to S3 bucket named
cruddur.net
.
- Stablized the app to make sure backend and frontent images are current.
- Run:
bin\backend\build
- builds the imagebin\backend\push
- pushes the image to ECRbin\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"
ANDgp 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"
ANDgp 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.
- Corrected several misconfigured options in
template.yaml
andnested\codebuild.yaml
.
- A series of changes to refactor the code base and resolve defects new and old.
- Made substantial changes to implement a decorator. Primarily
backend-flask/lib/cognito_jwt_token.py
andbackend-flask/app.py
.
- Made substantial changes to
backend-flask\app.py
.
- Created
routes
directory.
- 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
andActivity.css
to display message when there is no content to display instead of a blank screen.
- Made substantial changes to
backend-flask\app.py
.
- 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.
- 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.
- The completed application can be found at http://www.cruddur.net