Course Outro: Taking AWS Further

Lukas Ruebbelke
InstructorLukas Ruebbelke

Share this video with your friends

Send Tweet
Published 7 months ago
Updated 6 months ago

You already know enough. You just need a deeper understanding of what you already know You've had a mental model of a function ever since you understood cause and effect. Input and output.

And now that you've formed the connections between local functions and Lambda functions, a new world of endless possibilities has been unlocked.

With Serverless + AWS, what would once take weeks, now takes hours.

Worse than tightly coupled code is when you are coupled to beliefs that limit what you see as possible for you to accomplish. Decouple your expectations from that perception and realize that you are free to build apps faster, cheaper, easier, and better than before.

You can go further.

Instructor: [0:01] As we conclude our journey from function to endpoint, we stand at the crossroads between endpoint and infinity. From this new vantage point, we can see that there are near-infinite and novel applications for a skill set that you already possess.

[0:17] As cool and entertaining as I hope these examples have been, the real value, I hope, has been imparted in the expansion of how you see the world. By this, I mean the realization that you already know enough. You just need to have a deeper understanding of the things you know.

[0:35] The idea of a basic function has been reduced to pure muscle memory. We provide an input, and we receive an output. This is something you've understood from the very first time you put a quarter into one of those sketchy vending machines in the lobby of some department store as a small child. You put in a quarter, and in return, you got a worthless trinket, valued at perhaps a few cents, but output nonetheless.

[1:10] We can reframe this concept to describe asynchronous processing events, like an NgRx effect. We receive input in the form of a trigger event, and we produce output wrapped in a completion event. Asynchronous processing event, this sounds a lot like a serverless function. We receive a request, zero to n things happen, and then we reply with a response.

[1:40] In code, this looks like a super basic function. Local functions are so basic. I hate to break it to you, remote endpoint function, you're not that extra yourself. In fact, all we have to do is wrap you in a request-response method.

[1:58] When it comes to deploying the function, the serverless framework is like economy extra. We can deploy this function as an endpoint in approximately 13 lines of code. If we really want to get deluxe, then, with another 12ish lines of code, we can integrate with an S3 bucket using a custom variable in a predefined IAM role permission set.

[2:25] Just like a series of functions that are chained together by passing the output of one input into another, we can implement an asynchronous middleware, like NGINX or Saga, that chains together functions via an event-based system. In fact, this is exactly what is happening with step functions inside of AWS. This is where things start to get interesting, in my opinion.

[2:54] As we saw the evolution of imperative logic move from the DOM -- thanks, jQuery -- to a component, then to a service into an architecture layer and ultimately distributed, we can see a similar evolution of a function moving from a local invocation into a framework, then to a server and ultimately into a managed endpoint. How far can we take this?

[3:23] Anything that can be reached via a webhook or endpoint is fair game. I recommend checking out Zapier or IFTTT. It's worth mentioning that most smart-hardware vendors, like Philips Hue, have developer APIs that you can integrate with. A few more practical examples that I pulled directly from the AWS site are as follows.

[3:49] We can build a web application using AWS Lambda and the API Gateway. We can build out the business logic to allow users to create, read, update and delete items that get persisted inside of a DynamoDB database, with the static content hosted via the AWS Amplify Console. Not long ago, this would have taken weeks and not hours to accomplish.

[4:16] We can also do sophisticated data processing. Imagine we have notes from an interview and Markdown that we're storing in an S3 bucket. We can use S3 events to trigger multiple processing flows, one to convert the Markdown to HTML and another to perform sentiment analysis.

[4:37] We can also do some interesting things with batch processing, like scheduling workflows on a recurring basis, using an Amazon EventBridge rule. In this example, we are pulling in a number of files at a predetermined time, and using step functions to process the files, we can then aggregate the results and ultimately communicate them using AWS SNS.

[5:08] For something super fancy, we can pull from a document pool that contains a variety of different document types. Depending on the document type, we can use Amazon machine learning services, like Amazon Comprehend or Amazon Rekognition, to look for patterns and insights within these documents.

[5:32] This has incredible implications when it comes to e-commerce applications, social networks and analyzing consumer, I mean user, behavior. Between these four examples alone, there is enough for an enterprising individual to make a fortune implementing variations of these ideas.

[5:53] On top of that, there's not a lot that is happening here that falls outside the boundaries of what a competent developer has already done a million times. As much as I hate coupling in code, I think it's even worse when we're coupled to beliefs that limit what we see as being possible for us to accomplish.

[6:16] The moment we decouple our expectations from that perception, we reach the incredibly exciting realization that we are free to build applications faster, easier, cheaper and better than ever before. I say this to you with absolute conviction and total desire for your success. You can go further.