Skip to content

AWS diagnostics and triage guide

Charlie McVicker edited this page Aug 3, 2023 · 6 revisions

How do you find production or development resources and logs? Look no further!

Development vs. production environments

The steps for introspecting resources are the same in both dev and prod. When you sign into AWS you will be asked to pick a role (either development or production). You will only see resources in AWS for the environment that matches the role you picked.

How do I connect to the PostgreSQL database?

  1. Sign into AWS and select the appropriate user role for the environment you want to inspect
  2. Find our bastion EC2 server
  • Go to AWS EC2 -> Instances -> filter by tag nu:application=dailp-app -> Click instance ID
  1. Connect using the "Session Manager" to get a shell in the browser
  • Connect -> Session Manager -> Connect
  1. Check if psql exists with which psql
  2. (optional) Install psql to the Bastion server if needed
sudo amazon-linux-extras install postgresql14
  1. Connect to the database. Password should be retrieved from Naomi or another developer
psql -h dailp-database-primary.crrytz26uak5.us-east-1.rds.amazonaws.com -p 5432 -U dailp -W

How do I see DEV/PROD logs for our GraphQL Lambda function?

If you go to the "Monitor" tab and select "Logs" and then select a time range, you can see logging info.
- Naomi

How do I see DEV/PROD logs for the frontend hosting?

Our website is hosted using AWS Amplify. The site is "pre-rendered" at build time and then statically hosted. All routes for the site need to use the prerender Vite function to specify which routes exist. Currently, prerendering is used only to document which routes exist, not to fully populate the page (because our content is dynamic). You can see logs for the deployment and prerendering process by going to the Amplify console and inspecting our dailp-app project.