DEV Community

Cory M
Cory M

Posted on

Cloud Resume Challenge - Part 2

I solved the issue with the visitor counter not updating, it was an error with the CORS configuration. I had initially believed that my configuration of website calling to the CloudFront distribution would pass the correct headers; however I discovered that the API Gateway was not configured to correctly pass the header mappings through the Integration Response. Once that was corrected, the data was passed from the DynamoDB table without issue. Unfortunately, while I was receiving the data correctly, my JavaScript function would not result in any response other than null. After pouring through documentation and searching Stack Overflow without a solution that I could get working, I decided to abandon the use of fetch/response and instead implement XMLHttpRequest. I will need to learn more about JavaScript before I reiterate the function in the future.

I implemented the frontend code into GitHub, and began learning how to configure Actions to automate the CI/CD of any future changes. This led to learning how to set up secrets, and automate CloudFront invalidations through the GitHub Actions YAML configuration.

More work continues to write the scope of backend infrastructure into Terraform code.

Top comments (0)