- Newest
- Most votes
- Most comments
For AWS Amplify Gen 2 mobile apps, the amplify_outputs.json file contains configuration information that your app needs at runtime to connect to AWS services.
Regarding your questions:
-
Safety of exposing values in amplify_outputs.json: The information in this file (User Pool ID, User Pool Client ID, Identity Pool ID, AppSync GraphQL API URL) is generally not considered sensitive. These are public identifiers that clients need to connect to your AWS resources. However, they should be protected by proper authentication and authorization controls on the AWS services themselves.
-
Handling amplify_outputs.json with Git and CI/CD: The recommended practice is to add
amplify_outputs.jsonto your.gitignorefile. This file is git-ignored by default in Amplify projects. For your specific situation where the frontend is built by another company:
- You can generate the outputs file during your backend deployment using
npx ampx pipeline-deployornpx ampx generate outputs - Then securely share this generated file with your frontend partner through a secure channel (not in Git)
- They can include this file during their build process
- Sensitive information: The
amplify_outputs.jsonfile typically doesn't contain highly sensitive information like access keys or secrets. AWS Amplify is designed to work with public identifiers that require proper authentication to access resources. However, you should review the file contents to ensure no API keys or other secrets were added during customization.
AWS Amplify supports various development workflows, including scenarios where frontend and backend teams work in separate repositories, so your setup with an external frontend team is a supported use case. The key is to establish a secure process for sharing the generated outputs file with your frontend partner as part of your deployment pipeline.
Sources
Is amplify_outputs.json safe in client code + should we gitignore it | AWS re:Post
AWS Frontend web and mobile category icon Frontend web and mobile services - Overview of Amazon Web Services
AWS Amplify | Extensible Web & Mobile Apps | Amazon Web Services
answered 9 months ago
Relevant content
asked 2 years ago
asked 2 years ago
- AWS OFFICIALUpdated 5 years ago
- AWS OFFICIALUpdated 2 months ago
