AWS_Lambda_in_Action
AWS_Lambda_in_Action copied to clipboard
ch7 - Simple Website - bug fixes
This is for the book.
You need to mention that in the API gateway, not only do you need to change the 'Integration Response' 200 body to 'text/html' , but you also need to change the 'Method Response' 200 body to 'text/html' , otherwise, it will render as JSON in your browser.
Also, your ejs code does not handle the extra /page/ URL path, so when you go to your <aws.com>/
I fixed this by deleting the /page/{page}/get resource and recreated it as /{page} . This will allow for the proper redirects to the sub URLs in the website. One more minor lesson learned: <aws.com>/
Just an FYI for anyone else running into an issue. Thanks for the book!