Install AWS Amplify CLI
$ npm install -g @aws-amplify/cli
Login to AWS
$ amplify configure
Initialize a new AWS Amplify Project
$ amplify init
Import existing Amazon Cognito resource (created by CloudFormation) into the Amplify project.
$ amplify import auth
Choose the one that created previously by CloudFormation.
Amplify API category provides a solution for making HTTP requests to REST and GraphQL endpoints.
Integrate with existing GraphQL API endpoint (created by CloudFormation) into the Amplify project.
- Go to AWS AppSync console.
- Select the instance created previously by CloudFormation.
- Under
Integrate with your app
section, copy and run thecodegen
command.
amplify add codegen --apiId bo7ggkp7fvf67cu4bl6bl3etti
Push local changes to the cloud.
$ amplify push
- Go to AWS Ampliy console
- Select this project
- Follow the instructions to complete the setup to connect to the source code Gitlab repository.
- Add environment variables to the build settings.
Configure build settings
-> Advanced settings
-> Environment variables
- AMPLIFY_IDENTITYPOOL_ID
- AMPLIFY_NATIVECLIENT_ID
- AMPLIFY_USERPOOL_ID
- AMPLIFY_WEBCLIENT_ID
The corresponding values can be found in amplify
-> team-provider-info.json
- Save and deploy