Skip to content

Using runtime-config.json with Amplify #80

Answered by cogwirrel
mmuller88 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey Martin!

Thanks for the feedback! 😁

I think the best example we have is part of the awsui-react-ts-website project here: https://github.com/aws/aws-prototyping-sdk/blob/mainline/packages/awsui-react-ts-website/samples/src/Auth.tsx#L76-L97

The runtime-config.json file is written to the root of the static website's s3 bucket at deployment time, so the website can pull it down with fetch('/runtime-config.json') and plug the values into Amplify :)

Hope that helps!

Cheers,
Jack

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@mmuller88
Comment options

Answer selected by mmuller88
Comment options

You must be logged in to vote
4 replies
@cogwirrel
Comment options

@agdimech
Comment options

@mmuller88
Comment options

@cogwirrel
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants