Skip to content

Instantly share code, notes, and snippets.

@gpDA
Created September 10, 2019 16:31
Show Gist options
  • Save gpDA/51b3018316873264fb5f10c0804927f2 to your computer and use it in GitHub Desktop.
Save gpDA/51b3018316873264fb5f10c0804927f2 to your computer and use it in GitHub Desktop.
import Amplify, { API } from 'aws-amplify';
Amplify.configure({
Auth: {
// REQUIRED - Amazon Cognito Identity Pool ID
identityPoolId: 'XXXXX',
// REQUIRED - Amazon Cognito Region
region: 'us-east-1',
// OPTIONAL - Amazon Cognito User Pool ID
userPoolId: 'XXXXX',
// OPTIONAL - Amazon Cognito Web Client ID
userPoolWebClientId: 'XXXX',
mandatorySignIn: true,
},
API: {
endpoints: [
{
name: "XXXX",
endpoint: `https://XXXX.us-east-1.amazonaws.com/${version_input}`,
custom_header: async () => {
return {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
}
},
{
name: "XXXX",
endpoint: `https://XXXX.us-east-1.amazonaws.com/${version_input}`,
},
]
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment