Returning my focus to the hands-on! Day 3

 

So I mentioned that the new few labs were going to be topology bits. One lab environment didn't go smoothly (regular occurrence even during the instructor led days), so I went onto the next lab. After doing some Terraform, using the console is just a horribly slow, boring and ineffective way of getting infrastructure up in AWS. Nevertheless, I just did it as I want to exhaust everything in this AWS re/Start graduate environment and just move on.  


Here I am pinging my bastion host, yawn, now hopefully onto something more interesting! Lambda!


So the purpose of this lab is simply to add the Lambda functions, S3 bucket and set-up the SNS topic in short. I like these as for me, it's further exposure to the concept of serverless infrastructure, but it also provides some greater scope in understanding how I can leverage these tools for application purposes. 

In this example the application backend is already in place within the lab. But we can see the application backend relies on a DynamoDB table. In reality, especially with something like inventory you'd stick to a relational DB to ensure greater data integrity, but I digress.


The architecture above outlines what we see in the displayed above. The inventory file (a simple .csv) is uploaded and the document is parsed by the Lambda function, in this case some Python, which verifies the data before inputting it into the DynamoDB. On the left you see the Shanghai inventory file uploaded and on the right you see the consequent output into the dash. Great! Especially having done the MySQL course made the Python code seem rather straightforward, beyond all the little bits I didn't quite understand - of course! 


This next screenshot simply just shows that now a 2nd lambda function has been added into the architecture of our app. This one doesn't actually engage with the first one however, just like outlined above. Code wise, again Python, loops through the database looking for any inventory that has hit zero and as I have set-up the SNS message to the e-mail protocol, I get an alert upon uploading one for Pusan!


One thing to note is if multiple files are uploaded at once to the S3 bucket, these functions do not trigger! Of course this is something that could likely be resolved through the initial lambda function somewhere I imagine. Next time a little more Lambda!

Popular posts from this blog

Network Fundamentals for the Cloud

Familiarizing with the Command Line Interface

Security Fundamentals for the Cloud

CLI Fundamentals for the Cloud

DataDog, a Cloud Analytics & Monitoring application

A brief introduction to Databases and MySQL

AWS CodeCommit + Creating a CI/CD pipeline

Future Orientation: Tips from a AWS re/Start Graduate

A brief introduction to AWS Cloud Adoption Framework (CAF) and Well-Architected Framework (WAF)

Building a VPC in AWS