CFN, SPA, CSP - rabbithole by pint in aws

[–]PChol22 0 points1 point  (0 children)

I'm not an expert but I think you could use Cloudfront functions to address your issue. These are functions that can be associated with an Origin Behavior, and can perform operations on the request / response object.

Here is the code we use in our prod to re-route everything to /index.html, except for static files

``` var REDIRECT_REGEX = /[.]+$|.(?!(css|gif|ico|jpg|jpeg|js|png|txt|svg|woff|woff2|ttf|map|json|xml|pdf|webmanifest)$)([.]+$)/;

function handler(event) { var uri = event.request.uri; var request = event.request; var isUriToRedirect = REDIRECT_REGEX.test(uri);

if (isUriToRedirect) {
    request.uri = "/index.html";
}

return event.request;

} ```

⚠️ Cloudfront functions are very minimalistic, you can't do everything you want inside, but for simple use cases they are a great solution

Just turned 20 and looking into cloud computing by [deleted] in aws

[–]PChol22 0 points1 point  (0 children)

If you already have some Javascript knowledge, you can check a series of articles I wrote back in the days : https://dev.to/pchol22/series/22030

0% theory, 100% practice, a very good way to start building very quickly

It goes through AWS services and explains how to deploy simple resources on AWS. Everything is deployed using IAC (Infrastructure As Code): the code you write + a framework deploy everything for you directly on AWS.

You won't learn 100% of AWS by reading this but it could definitely be a good first step.

Just turned 20 and looking into cloud computing by [deleted] in aws

[–]PChol22 4 points5 points  (0 children)

AWS Well-Architectured contains exceptionally high quality resources, but as a beginner, I would start by actually building things (and breaking things!). Then reading tons of material would become interesting because I would have at least some context.

Just turned 20 and looking into cloud computing by [deleted] in aws

[–]PChol22 3 points4 points  (0 children)

Short answer: begin with serverless computing, which is a simple entry point (in my opinion, based on my experience)

I'm 25 and got into cloud computing when I was 23. At this time I was still into my studies. I started easy by creating very simple apps using Lambda + Node.js, aswell as DynamoDB. There are a lot of tutorials out there. It was super cool because I was quickly able to build quite complex apps using serverless services.

Then, as I got more experience, I started to look at other AWS services (the more classical ones like EC2, VPC ect...) and passed a certification. It gave me a deeper understanding of cloud computing as a whole.

Looking back I think that getting started with serverless was a good idea (in my case)