is it wrong/dangerous to include aws-exports.js file in source control?

Viewed 760

amplify auto-ignores aws-exports.js in .gitignore possibly simply because it may change frequently and is fully generated - however maybe there are also security concerns?

For this project my github project is private so that is not a concern, but I am wondering for future projects that could be public.

The reason I ask is because if I want to run my app setup/build/test through github workflows then I need this file for the build to complete properly on github machines?

Also I appear to need it for my amplify CI hosting to work on amplify console (I have connected my amplify console build->deploy to my github master branch and it all works perfectly but only when aws-exports.js is in source control).

Here is my amplify.yml, I am using reason-react with nextjs, and my amplify console is telling me I have connected to the correct backend:

version: 1
frontend:
  phases:
    preBuild:
      commands:
        - yarn install
    build:
      commands:
        - yarn run build
  artifacts:
    baseDirectory: out
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*
0 Answers
Related