We will try registration and login from web application to test API Gateway, Lambda function and User pool working.
Open API Gateway console
Select Stage on the left menu
Open config.js file in source code folder of application - FCJ-Serverless-Workshop
Run the below commands:
yarn build
aws s3 cp build s3://fcj-book-store --recursive
Open Amazon S3 console. Click fcj-book-store bucket
Click Properties tab. Scroll down to bottom, click to web endpoint
Click Register on right corner
Enter registration information: email, password and re-enter password
A prompt will appear displaying the Register fail
Register with the email you are using to get the account verification code
To resolve this error, open template.yaml file in source of fcj-book-store-sam-ws3.zip file
AllowMethods: "'GET,POST,OPTIONS,DELETE'"
AllowHeaders: "'content-type'"
AllowOrigin: "'*'"
sam build
sam deploy --guided
Go back to the registration screen and click Register button
Back to the Amazon Cognito console
Open the email you just registered for an account, get the confirmation code sent from no-reply@verificationemail.com
Enter the confirmation code in the verification screen
Back to the Amazon Cognito console
Enter account information: email, password to login
After successful login, the features: Create new book, Management, Order appear allowing users to use