Skip to content

Conversation

@embarnard
Copy link
Contributor

@embarnard embarnard commented Jan 24, 2026

Link to pivotal/JIRA issue

Is PM acceptance required? (delete one)

  • Yes - don't merge until JIRA issue is accepted!

Reminder: merge main into this branch and get green tests before merging to main

What was done?

  • As a part of this work I added the IAM policy allowing our AWS user to use the Bedrock invoke model method, held off on adding to prod though until this goes through acceptance
  • AWS uses a default credential chain that checks for AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in the app's environment/config variables when creating a AWS::S3::Client automatically, before this change we had different approaches for different environments. We called the credentials from our creds file in demo/staging/prod but got them from our env variables in CircleCI. This change will unify our approach so that we just grab them from our env variables in all env except locally where we will have to sso into a profile
  • In staging, demo, Circle CI and prod environment, get AWS credentials from env variables
  • In heroku, put AWS creds in github secrets
  • locally, sso into gyr profile: aws sso login --profile gyr-non-prod

How to test?

  • check if services that use AWS creds still work in all environments [heroku, staging, demo, circle-ci]: DocScreener, schema file loader, download file from S3 for state-file-archived-client, grabbing screenshots of our flow for our flow explorer and downloading IRS e-file schemas from S3 in our setup task.

@github-actions
Copy link

Heroku app: https://gyr-review-app-6166-4ead306714ea.herokuapp.com/
View logs: heroku logs --app gyr-review-app-6166 (optionally add --tail)

@embarnard embarnard changed the title Add env variables to heroku yml Use default credential chain for AWS creds Jan 26, 2026
HEROKU_DNS_AWS_ACCESS_KEY_ID=${{ secrets.HEROKU_DNS_AWS_ACCESS_KEY_ID }} \
HEROKU_DNS_SECRET_ACCESS_KEY=${{ secrets.HEROKU_DNS_SECRET_ACCESS_KEY }} \
HEROKU_PLATFORM_KEY=${{ secrets.HEROKU_PLATFORM_KEY }}
HEROKU_PLATFORM_KEY=${{ secrets.HEROKU_PLATFORM_KEY }} \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setup our AWS creds in our heroku apps via github secrets


def download_schemas_from_s3(dest_dir)
s3_client = Aws::S3::Client.new(region: REGION, credentials: s3_credentials)
s3_client = Aws::S3::Client.new(region: REGION)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using default chain instead of digging up creds in some places and finding them in the env variables in others. now it will always be in the app's env variables except locally

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see differences via:
bin/gyr credentials_diff --base main --environment demo

let!(:first_breached_client) {
create :client, flagged_at: Time.now, vita_partner: vita_partner,
last_outgoing_communication_at: 7.business_days.ago,
create :client, flagged_at: time, vita_partner: vita_partner,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flakey test that was failing Friday after working hours

Copy link
Member

@mpidcock mpidcock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love to see this, looks great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants