Amazon Web Services

I am still trying to decide on my target audience. .. please forgive me if I talk about the most obvious concepts in my blog posts. This week I was working with AWS, for those of you who are not familiar with AWS here is the definition from Wikipedia.

"Amazon Web Services is a subsidiary of Amazon providing on-demand cloud computing platforms and APIs to individuals, companies, and governments, on a metered pay-as-you-go basis."

This was not my first time using AWS. I actually have 3 EC2's running at all times. Although it wasn't my first experience using AWS you have to understand that EC2's are just a subset of what AWS provides. This week I was challenged to upload user profiles into a Simple Storage Service, aka S3. Writing this in NodeJS / Express.js was an interesting challenge. 

The first obstacle I encountered was sending the file to the backend server. This task came with many challenges, such as, handling the file uploading and saving in a local variable. Some youtube videos told me to handle the file uploading as an event and pick out the file itself and store the object as a variable. Once I had the file object, I created a FormData object and appended the file Object. This allows me to send the FormData object to AWS for storing.

Another issue was the storing of data on my bucket. The current project I am working on needs a profile picture upload and an image gallery. I am not sure if they would like these images to be an album... however, saving these images in a well organized manner became the problem. I will not lie.... since this is an unpaid internship I was temped to just upload all images into one massive bucket and let the next round of developers figure it out. Since it was Christmas, I embarked on a journey to find the most efficient solution. I found a solution in passing a path as a parameter will allow me to sort the images into sub- folders. This also allows me to group these images in an efficient manner.

Currently I am procrastinating on reading the dotenv environment documentation. I am wondering how it works when you have two dotenv files in your repository... Can I specify with dotenv I would like to fetch my variables from? Can I just reach into all dotenv files using require('dotenv') package? Hope everyone is having a great holiday. Stay safe and happy hacking.


References:

https://en.wikipedia.org/wiki/Amazon_Web_Services

Comments

Popular posts from this blog

The Progress

Lab 2

A Programmers Nightmare