Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

amplify/cli AWS-EXPORTS.JS in GEN1 and GEN2 apps #13974

Closed
PixelJunkie33 opened this issue Oct 11, 2024 · 6 comments
Closed

amplify/cli AWS-EXPORTS.JS in GEN1 and GEN2 apps #13974

PixelJunkie33 opened this issue Oct 11, 2024 · 6 comments
Labels
pending-triage Issue is pending triage platform Issues tied to the general CLI platform question General question

Comments

@PixelJunkie33
Copy link

What is the best way to handle aws-exports.js file that is auto generated with the backend? Does this file contain sensitive data, should it remain in the public directory view or in a secret file for example :


 **You simply store aws-exports.js contents in an environment variable called "secretfile", and then use it inside amplify.yml like this

version: 1
frontend:
  phases:
    preBuild:
      commands:
        - npm ci
    build:
      commands:
        - echo $secretfile > ./src/aws-exports.js
        - npm run build
  artifacts:
    baseDirectory: build
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/***
@PixelJunkie33 PixelJunkie33 changed the title Clarity to settle the amplify/cli AWS-EXPORTS.JS for good. in GEN1 and GEN2 apps amplify/cli AWS-EXPORTS.JS in GEN1 and GEN2 apps Oct 11, 2024
@esauerbo
Copy link

@PixelJunkie33 the aws-exports file does contain sensitive information and should not be committed to a public repository. Transferring this to the Amplify CLI team for further assistance.

@esauerbo esauerbo transferred this issue from aws-amplify/docs Oct 14, 2024
@esauerbo esauerbo added the question General question label Oct 14, 2024
@PixelJunkie33
Copy link
Author

Is the example I shared for configuring amplify.yml in the AWS browser console aligned with AWS guidance and best practices for handling aws-exports.js during deployment?

@ykethan
Copy link
Member

ykethan commented Oct 15, 2024

Hey @PixelJunkie33, thank you for reaching out. Refer to the files and folders documentation providing information on this file. The file should get auto-generated when running amplify pull or push.
Could you provide us some information on your use case? for example, are you trying to utilize an existing backend environment in a different/new application?

@ykethan ykethan added platform Issues tied to the general CLI platform pending-response Issue is pending response from the issue author labels Oct 15, 2024
@PixelJunkie33
Copy link
Author

Hey @ykethan thank you!! My application is the run of the mill JS full stack- amplify deployment app. This particular project collects a lot of sensitive data. So ensuring i's are doted and t's are crossed is key.

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label Oct 20, 2024
@ykethan ykethan added the pending-triage Issue is pending triage label Oct 22, 2024
@ykethan
Copy link
Member

ykethan commented Oct 22, 2024

@PixelJunkie33 the document linked files and folders should provide information on the files that need to be excluded or can be included.
Additionally, if this is a new application i would suggest using Amplify Gen 2.

Closing the issue for now, but do reach out on a new issue if you require any assistance.

@ykethan ykethan closed this as not planned Won't fix, can't repro, duplicate, stale Oct 22, 2024
Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-triage Issue is pending triage platform Issues tied to the general CLI platform question General question
Projects
None yet
Development

No branches or pull requests

3 participants