consumerfinance.gov icon indicating copy to clipboard operation
consumerfinance.gov copied to clipboard

Build credit card agreements index page from S3

Open wpears opened this issue 2 years ago • 0 comments

Under the current regime, when updating credit card agreements, a developer must add a new link to a static template as a PR... even though this template could just be built from the presence of data in S3 with a specific prefix.

This PR builds the page from that prefix & updates the frontend to be a bit nicer as well. Internal documentation of the CCA update process will be updated separately once this is merged.

This also gets rid of the duplicative AWS_S3_URL envvar, replacing its use with an extension of AWS_STORAGE_BUCKET_NAME

Testing

  • in .env, set the following environment variables:
S3_ENABLED: "True"
AWS_S3_STORAGE_BUCKET_NAME: files.consumerfinance.gov
AWS_ACCESS_KEY_ID: <key id>
AWS_SECRET_ACCESS_KEY: <access key>
  • /credit-cards/agreements/ should load without issue

wpears avatar Aug 17 '22 11:08 wpears