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

Question: how can I load a custom awsconfiguration when initializing Amplify? #3820

Closed
vitor-neurodelabs opened this issue Aug 17, 2024 · 2 comments
Labels
build Issues related to build and CI/CD core Amplify Core components question General question

Comments

@vitor-neurodelabs
Copy link

I have two custom configs form amplify in my bundle: amplifyconfiguration.production.json and amplifyconfiguration.staging.json and they are paired with awsconfiguration.production.json and awsconfiguration.staging.json. I searched the repo trying to understand where awsconfiguration.json gets loaded but not sure where I can find it how its used.

I wanted on the call to Amplify.configure maybe to be able to pick the correct file?

@github-actions github-actions bot added pending-triage Issue is pending triage pending-maintainer-response Issue is pending response from an Amplify team member labels Aug 17, 2024
@lawmicha
Copy link
Member

lawmicha commented Aug 19, 2024

Hi @vitor-neurodelabs, awsconfiguration.json is not used by Amplify, you can leave them or remove them. They are used with the AWS iOS SDK, and a legacy artifact. Calling Amplify.configure() will read amplifyconfiguration.json from the main bundle. If you have production and staging, you may want to read the files into memory and directly call Amplify.configure(config) objects. Let us know if you have more questions

@lawmicha lawmicha added the question General question label Aug 19, 2024
@github-actions github-actions bot removed the pending-maintainer-response Issue is pending response from an Amplify team member label Aug 19, 2024
@lawmicha lawmicha added pending-community-response Issue is pending response from the issue requestor build Issues related to build and CI/CD core Amplify Core components and removed pending-triage Issue is pending triage labels Aug 19, 2024
@harsh62 harsh62 closed this as completed Aug 21, 2024
@github-actions github-actions bot removed the pending-community-response Issue is pending response from the issue requestor label Aug 21, 2024
Copy link
Contributor

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.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues related to build and CI/CD core Amplify Core components question General question
Projects
None yet
Development

No branches or pull requests

3 participants