Skip to content

Instantly share code, notes, and snippets.

@dabit3
Created October 29, 2020 17:33
Show Gist options
  • Save dabit3/be277c190a36c8fb0a48efb2893c4585 to your computer and use it in GitHub Desktop.
Save dabit3/be277c190a36c8fb0a48efb2893c4585 to your computer and use it in GitHub Desktop.
Combining CDK outputs with Amplify configuration
import Amplify from 'aws-amplify';
const { AppsyncCdkAppStack } = require('./outputs.json');
import config from './aws-exports';
Amplify.configure({
...config,
aws_appsync_graphqlEndpoint: AppsyncCdkAppStack.GraphQLAPIURL,
aws_appsync_apiKey: AppsyncCdkAppStack.GraphQLAPIKey
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment