Skip to content

Commit

Permalink
Set AWS env vars to the process environment
Browse files Browse the repository at this point in the history
  • Loading branch information
levinmr committed Feb 28, 2024
1 parent d2cf50c commit b66985c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/config.js.cloudgov
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
const knexfile = require('../knexfile');
const VCAP_SERVICES_JSON = JSON.parse(process.env.VCAP_SERVICES);

// Set AWS env vars based on VCAP service values.
process.env['AWS_ACCESS_KEY_ID'] = VCAP_SERVICES_JSON["s3"][0]["credentials"]["access_key_id"];
process.env['AWS_SECRET_ACCESS_KEY'] = VCAP_SERVICES_JSON["s3"][0]["credentials"]["secret_access_key"];
process.env['AWS_REGION'] = VCAP_SERVICES_JSON["s3"][0]["credentials"]["region"];

// Set environment variables to configure the application.
module.exports = {
Expand Down

0 comments on commit b66985c

Please sign in to comment.