question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Security related to committing aws-exports.js

See original GitHub issue

** Which Category is your question related to? ** Auth and Amplify Console Deploy

** What AWS Services are you utilizing? ** AWS Amplify Console Deploy and AWS Cognito

** Provide additional details e.g. code snippets ** Hi folks,

I recently generated a new Amplify project using the latest beta version (0.2.1-multienv.35) of Amplify CLI to try out Amplify Console Deploy. After setting up Cognito Auth using the Amplify CLI and connecting my GitHub repo to Amplify Console and pushing to GitHub, Amplify Console Deploy started a build. The build failed with an error because it couldn’t find ./src/aws-exports.js. I noticed amplify init adds aws-exports.js to my project’s .gitignore file. How sensitive is this file? If it is sensitive, what’s the best way to use AWS Amplify Console Deploy without committing it? Is that possible?

Thanks!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:17 (6 by maintainers)

github_iconTop GitHub Comments

7reactions
undefobjcommented, Jan 23, 2019

@cmoel in answer to your question around sensitivity this is fine for an SPA as the items are used for constructing HTTP requests to the appropriate endpoints in your account. See https://github.com/aws-amplify/amplify-js/issues/2495#issuecomment-453282477 for a similar question in the past.

3reactions
cmoelcommented, Jan 25, 2019

The backend and frontend deploy are working successfully now. Thank you all so much for your patience and clear explanations! Also, thank you for seeing this through to the end when my concerns shifted from “is it safe to commit this file to git?” to “how do I deploy both a backend and a frontend using the Amplify Console?”

There are still some issues I need to iron out around using the correct Cognito Auth User Pool and Identity Pool (since the backend deployment deleted both of them) but that seems well outside the scope of this issue. I’ll open another issue if I can’t figure it out.

Thanks again!

Read more comments on GitHub >

github_iconTop Results From Across the Web

is it wrong/dangerous to include aws-exports.js file in source ...
For this project my github project is private so that is not a concern, but I am wondering for future projects that could...
Read more >
Quickstart
Resources in your AWS account that the Amplify CLI category commands create can be easily consumed by the corresponding Amplify library modules or...
Read more >
AWS Amplify, Secured DevOps - Part 1, Why It Matters
These posts center around the aws-exports.js that the CLI will generate when initializing or pulling from the Admin/Studio UI.
Read more >
Complete guide to full-stack CI/CD workflows with AWS Amplify
Today AWS Amplify launched new enhancements to it's CI/CD workflow for full-stack deployments that include conditional backend deployments, ...
Read more >
Continuous integration and delivery (CI/CD) using CDK ...
This is the AWS CDK v2 Developer Guide. The older CDK v1 entered maintenance on June 1, 2022 and will now receive only...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found