The Cloud Resume Challenge!?
So, I guess this requires some explaination. I want to learn as much Cloud infrastructure within my means. There's far more to it since on the AWS side I'm starting to believe that it's also crucial that you know how to work in Linux, and to code. However for me, since I have an active AWS account (This website is proof) I'm following the steps and blogging my journey as a means of documentation in case I forget some steps.
You can go to their website here: The Cloud Resume Challenge for AWS.
The first few steps are straightforward -- Set up AWS account, HTML, CSS
In my honest opinon, you don't need to do the CCP cert (or any cert first). Reality is, that a cert gets you past HR screening. It's not a golden ticket to a job unless you are fortuanately lucky or knew someone that can give you an 'in' with their company.
Yes, you will be required to use your card info since AWS will bill you for services used, though depending on WHICH services it's literally cents.
HTML and CSS? I already have years of experience using these but because of my location, it amounted to nothing since before COVID remote jobs were non-existant and Front-End entry level work required years of experience and possibly a leet-code challenge pre interview (which is overboard, but it is what it is.)
Since I've been more IT than programmer these past four years, my CSS skills faltered so I had to retrain myself but eventually I did catch on. I'm also using a free program called "ATOM" to create my main page, css, and .js sheets. It's a nice way to get back in shape after being away from coding for so long
I'd also advise creating a billing threshold alert incase you use a service that bills you more than what you expected
Getting the website up in AWS
My favorite part, the "static website" step, I would say steps 4-6 is easier done differently. Let me explain.
So for starters, I needed to create an S3 bucket in AWS. It's very important to name it the same as your domain. Learned that the hard way the first time. The nice fella from Youtube Be A Better Dev pointed this out in his tutorial.
Next, I needed to create/register a domain using Route 53 (It's DNS). Purchases vary, but this cost is yearly. Also had to create two additional alias names for redirection.
My website still had a "Not Secure" warning by the URL, this is because I had to purchase certificates using AWS's Certificate Manager. I ended up getting two, one for each DNS alias. From there I needed to apply these to a CloudFront distribution to get my bucket to be HTTPS.
*Also a heads up, many webhosts allow you to update your files in realtime. AWS, for whatever reason does not -- at least not 'directly' from what I can tell but I'd like to be corrected on this. I had some spelling errors on my index.html page and I didn't see any editor. And after setting my S3 bucket to the domain, deleting and reuploading index.html did NOT update. So what gives?
I learned, that you need to add the '/*' invalidation rule to your Cloudfront distrubution, since by default Cloudfront cache updates every 24 hours. This might be to prevent downtime when taking out a webpage but seems like an oversight.
Javacript, API, Lambda Fuctions, and Database?
Sorry I have a habit of doing these in chunks. Java was easy once I found a code for a site counter as well as a copyright updater for the bottom of the page, though now it's asking me to put it on a database using API.
At this point, I'm figuring out the cloud resume challenge website steps should not be followed in order... as you can see, there's a lot of setup involved for the next steps after Javascript. Heck, even a later step tells us that we should have done all this through the AWS SAM CLI which I haven't been doing... so I'm going to die on this hill admitting that I just used the AWS interface.
I'd like to believe there is no WRONG way to do this challenge, but I'm sure they'll be "well you should have done it this way" and I'm just going to shrug. That being said, a huge thank you to Shishirkh Khandelwal, as his tutorial (I had to omit due to respect for the challenge) got me through this part.
His section he explains how to set up Dynamo DB, two unique Lambda functions to get and update my JS visitor count, and creating then testing your API! It's not entirely handholding, but I was able to figure out a few things on my own. A very helpful teaching session that took me all day to find.
While his blog got me to set it up, I'm still struggling with getting the Javascript counter to communicate with the AWS functions. I'll update when I find a solution, wish me luck!
Update: Counter added!
This was not as bad, but I had some issues with the JSON script. Took a bit of tinkering on my part
Had to create a fetch command, not a function as I thought to grab the link AWS generates for me. Even now I'll have to look up HOW I did this since my initial edits are lost to the internet ether.
After that was generating the response script going, to take the count and have AWS store said data in the JSON script.
As far as CI/CD, I need to look at something since I thought I used the invalidation command to ensure updates happen on the spot in S3, but it's still doing the default 24 hour wait.
Another update!
CI/CD pipeline fixed. AWS has a codepipeline feature that you can link your github to your S3 bucket, well, a second S3 bucket for the "artifacts" to load in, then you select your first bucket your website is using. This update will be my second test to make sure this still works.
This challenge was something, I helped me get further deep with AWS, something I hope helps with my career in the long run.
Perhaps, I should take the Solutions Architect Associates exam soon?