Skip to main content

Serverless Architecture with AWS Lambda, API Gateway, Cloudfront, S3 and DynamoDB

 

If 2015 saw the rise of Docker Containers & Micro-services then 2016 is undoubtedly going to be about Serverless architecture.

Late in 2015 AWS announced a preview of a service called AWS Lambda moving from a pure IaaS provider into the PaaS world with one feel swoop. Now AWS is releasing so many new services and features a week that you may have missed this, but in my opinion it is a game changer and I’m going to try to demonstrate why.

What on earth is Lambda?

“AWS Lambda is a compute service that runs your code in response to events and automatically manages the underlying compute resources for you.”

“When using AWS Lambda, you are responsible only for your code. AWS Lambda manages the compute fleet that offers a balance of memory, CPU, network, and other resources.”

Just think about those statements for a second, 

In developer terms a Lambda is simply a single function with an input and output, forget microservices this is a nanoservice. 

At the time of writing you can write your Lambdas in Node.js, Java or Python but I would expect support for other languages to be coming soon although I don’t have high hopes of .NET being supported anytime soon given the memory overhead.

AWS Lambda on it’s own is not very interesting but it’s the wealth of integrations with other AWS Services where the power comes. 

Supported services:

  • API Gateway
  • Dynamo DB Streams
  • S3
  • SNS
  • SES
  • Cognito
  • Cloud Trail
  • CloudFormation
  • CloudWatch 
  • Kinesis

More on Lambda Event Sources.

The pricing model is very interesting and is charged per 100 milliseconds and allocated memory.

Serverless

Enter a truly serverless architecture. To make this possible the key integration is with API Gateway which allows to execute Lambas in response to incoming HTTP requests, meaning you’re entire API backend can be developed this way (without a single EC2 Instance, or Docker container in sight).

Single Page Application Example

I’m going to demonstrate at a high level how you could implement a completely serverless single page application using just a few AWS services. 

Given your typical single page application you would need to use the following AWS services:

  • S3
    • Responsible for storing static web assets HTML, JavaScript, CSS & Images.
    • WebsiteHosting enabled
  • API Gateway
    • Used to define the HTTP Endpoints used by the Web Client
  • Cloudfront
    • CDN for serving web assets using S3 as the origin
    • CDN for the API Gateway optimize latency between the end user and the origin
  • AWS Lambda
    • Functions which are run when API Gateway endpoints are called.
  • DynamoDB
    • Used to store the data

From a high-level this is what the architecture looks like.

Serverless_Simple

 

Conclusions

I’ve attempted to demonstrate a very simple example about how you can make use of AWS Lambda today to implement a serverless architecture, however this only scratches the surface of what is possible and in my next post I will expand on this example and show how you can implement more complex serverless implementations.

It wasn’t all smooth sailing and they were a few things which I found annoying which I hope AWS will resolve in the future.

 

 

Comments

  1. Nice post, I bookmark your blog because I found very good information on your blog, Thanks for sharing more information. Regards aws jobs in hyderabad.

    ReplyDelete
  2. Nice Information regarding Serverless Architecture with AWS Lambda my sincere thanks for sharing this post Please continue to share this kind of post
    AWS Training in BTM Layout

    ReplyDelete
  3. nice blog has been shared by you. before i read this blog i didn't have any knowledge about this. but now i got some knowledge. so keep on sharing such kind of an interesting blogs.
    Selenium Training in Bangalore

    ReplyDelete
  4. Appreciating the persistence you put into your blog and detailed information you provide.

    It’s great to come across a blog every once in a while that isn’t the same out of date rehashed material. Fantastic read.

    AWS Training in Chennai

    ReplyDelete
  5. This is extremely great information for these blog!! And Very good work. It is very interesting to learn from to easy understood. Thank you for giving information. Please let us know and more information get post to link.

    Weblogic Application Server training

    ReplyDelete

  6. I Just Love to read Your Articles Because they are very easy to understand.Very Helpful Post And Explained Very Clearly About All the things.Very Helpful. Coming To Our Self We Provide Restaurant Equipment Parts Through Out US At Very Affordable Prices And Also We Offer Same Day Shipping In US.We Offer Only Genuine Products.Thanks For Posting.Have a Nice Day!

    ReplyDelete
  7. I have read your blog and i got a very useful and knowledgeable information from your blog.its really a very nice article.You have done a great job . If anyone want to get
    Networking Training in Chennai | Hibernate Training in Chennai.

    ReplyDelete
  8. This Blog is very helpful and useful,came to know that i should be strong in my basics and this blog helps me to improve it,Chicago Immediate Care Services Provided by Us.Thanks For Posting.I Am refereed by my friend to this blog and i also want to refer my other friends to this blog.

    ReplyDelete
  9. Hadoop concepts, Applying modelling through R programming using Machine learning algorithms and illustrate impeccable Data Visualization by leveraging on 'R' capabilities.With companies across industries striving to bring their research and analysis (R&A) departments up to speed, the demand for qualified data scientists is rising.
    data science training in bangalore
    Big Data and Hadoop training Unlike traditional systems, Big Data and Hadoop enables multiple types of analytic workloads to run on the same data, at the same time, at massive scale on industry-standard hardware.myTectra Big Data and Hadoop training is designed to help you become a expert Hadoop developer. myTectra offers Big Data Hadoop Training in Bangalore using Class Room.
    hadoop training in bangalore
    Looking for best Machine Learning Training in Bangalore then join myTectra the leader in Machine Learning Training in Bangalore. Classroom & Online Training
    machine learning training in bangalore

    ReplyDelete
  10. Learned a lot from your blog. Good creation and hats off to the creativity of your mind. Share more like this.
    AWS Training institutes in Chennai | AWS courses in Chennai | AWS Training Chennai | AWS Training center Chennai

    ReplyDelete
  11. Expected to form you a next to no word to thank you once more with respect to the decent recommendations you've contributed here.
    nebosh courses in chennai

    ReplyDelete
  12. This Blog provides more than enough a very great blog...

    Vijay Devarakonda Height

    ReplyDelete
  13. Well with your permission let me grab your RSS feed to keep updated with forthcoming post. Thanks a million, and please keep up the gratifying work.
    industrial course in chennai

    ReplyDelete
  14. I am really enjoying reading your well written articles.
    It looks like you spend a lot of effort and time on your blog.
    I have bookmarked it and I am looking forward to reading new articles. Keep up the good work..
    Hadoop Training in Chennai
    Big Data Training in Chennai
    Big Data Course in Chennai
    big data courses in bangalore
    hadoop training institutes in bangalore

    ReplyDelete
  15. Amazing article. Your blog helped me to improve myself in many ways thanks for sharing this kind of wonderful informative blogs in live. I have bookmarked more article from this website. Such a nice blog you are providing ! Kindly Visit Us @ Best Travels in Madurai | Tours and Travels in Madurai | Madurai Travels

    ReplyDelete
  16. I wondered upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon.
    PHP Training in Chennai
    PHP Course in Chennai
    Web Designing Course in chennai
    Hadoop Training in Chennai
    German Language Classes in Chennai
    PHP Training in Porur
    PHP Training in Adyar

    ReplyDelete
  17. Information from this blog is very useful for me, am very happy to read this blog Kindly visit us @ Luxury Watch Box | Shoe Box Manufacturer |  Candle Packaging Boxes

    ReplyDelete
  18. TreasureBox is operated by a group of young, passionate, and ambitious people that are working diligently towards the same goal - make your every dollar count, as we believe you deserve something better.
    tv stand nz
    bike stand nz
    sofa bed nz

    ReplyDelete
  19. I feel satisfied to read your blog, you have been delivering a useful & unique information to our vision.keep blogging.
    salesforce Training in Bangalore
    uipath Training in Bangalore
    blueprism Training in Bangalore

    ReplyDelete
  20. Nice Blog
    For Data Science training in Bangalore, Visit:
    Data Science training in Bangalore

    ReplyDelete
  21. I read your post and got it quite informative. I couldn't find any knowledge on this matter prior to. I would like to thanks for sharing this article here. Best AWS Training in Delhi

    ReplyDelete
  22. Good post!Thank you so much for sharing this lovely article.It was so good to read and useful to upgrade my understanding...
    salesforce Training in Bangalore
    uipath Training in Bangalore
    blueprism Training in Bangalore

    ReplyDelete
  23. Hi, Thanks for this valuable information.Mukul Sharma   When the film “Birds of Prey” was released on 07 Feb 2020, trade pundits projected it to gross $50 to $55 million during the opening weekend in the US and Canadian markets. Warner Bros, the distributors of the film had their own projection pegged at $45 million. However, It could muster only &hellip.
    https://onlineidealab.com/warner-bros-loses-22-million-in-a-weekend-due-to-poor-seo/

    ReplyDelete
  24. we are offering aws cloud practitioner course online. build your cloud skills with updated modules, instructor led live online courses & certifications. please visit our website to know more information.
    https://onlineidealab.com/aws-course/

    ReplyDelete
  25. Earn Rs.25000/- per month - Simple online Jobs - Are You Looking for Home-Based Online Jobs? - Are You a Student, Housewife, jobseeker ? - Are you ready to Work 1 to 2 Hours daily Online? - Do You need Guaranteed Payment Monthly? Then this is for You, - Clicking on their Advertisement E-mails. - Submitting their Data\'s online. - Reading their Advertisement Sms. - Filling Forms on their websites, etc,. FREE to Join >> http://dailyonlinejobs.com
    9PJK1587500784 2020-04-23 21:45:00

    ReplyDelete
  26. I’m happy I located this blog! From time to time, students want to cognitive the keys of productive literary essays composing. Your first-class knowledge about this good post can become a proper basis for such people. nice one
    PMP Certification
    PMP Course
    PMP Course in Malaysia
    PMP Training in Malaysia

    ReplyDelete
  27. Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!
    data analytics course
    big data analytics malaysia
    big data course

    ReplyDelete
  28. Nice blog and absolutely outstanding. You can do something much better but i still say this perfect.Keep trying for the best.
    data science course

    ReplyDelete
  29. Great article by the great author, it is very massive and informative but still preaches the way to sound like that it has some beautiful thoughts described so I really appreciate this article. Oracle fusion hcm training

    ReplyDelete
  30. Cognex providing Amazon Web Services (AWS) certification training in chennai helps you to gain real time hands on experience on AWS. Cognex offers AWS training in Chennai using classroom and AWS Online Training globally.

    ReplyDelete
  31. Stunning, What an Excellent post. I truly discovered this to much useful. It is the thing that I was looking for. I might want to propose you that please continue sharing such kind of data. microsoft office professional plus

    ReplyDelete
  32. Great post, you have pointed out some excellent points in the article of Software , I besides conceive this s a very good website for users. buy microsoft office 2019

    ReplyDelete
  33. Hey nice Blog... I love the way you presented the whole story of Software , Thanks for sharing such useful information with us.windows 10 enterprise

    ReplyDelete
  34. Really I enjoy your site with effective and useful information. It included a very nice post with a lot of our resources.thanks for share. i enjoy this post. and this information is really informatic to users . microsoft office professional 2019

    ReplyDelete

Post a comment

Popular posts from this blog

Freeing Disk Space on C:\ Windows Server 2008

  I just spent the last little while trying to clear space on our servers in order to install .NET 4.5 . Decided to post so my future self can find the information when I next have to do this. I performed all the usual tasks: Deleting any files/folders from C:\windows\temp and C:\Users\%UserName%\AppData\Local\Temp Delete all EventViewer logs Save to another Disk if you want to keep them Remove any unused programs, e.g. Firefox Remove anything in C:\inetpub\logs Remove any file/folders C:\Windows\System32\LogFiles Remove any file/folders from C:\Users\%UserName%\Downloads Remove any file/folders able to be removed from C:\Users\%UserName%\Desktop Remove any file/folders able to be removed from C:\Users\%UserName%\My Documents Stop Windows Update service and remove all files/folders from C:\Windows\SoftwareDistribution Deleting an Event Logs Run COMPCLN.exe Move the Virtual Memory file to another disk However this wasn’t enough & I found the most space was

CPF Contribution Rates for new Singapore Permanent Residents (SPR’s)

Recently my wife and I applied and got approved for Singapore Permanent Residency. After completing the formalities the most significant immediate change is the contribution to CPF which is Singapore’s mandatory social security savings scheme requiring contributions from employers and employees. CPF contributions start from the date you obtain SPR status, which is the date of the entry permit.   Being a relentless budgeter I needed to know exactly how much I and my employer would have to contribute so that I could adjust my budget accordingly as the employee contributions get deducted from the monthly salary. After doing some research I discovered that there is a “graduated” approach to CPF contributions for new SPR’s where the contributions gradually increase in the first and second year and then upon reaching the third year are at the full amount. Note: There is an option for employers to contribute the full amount for year 1 and year 2 and the employee can use the graduated ra

Populating Duplicate Fields with DocuSign's REST API

If you're using DocuSign's REST API for integrating e-Signing into your application then it's possible you'll come up against the issue of duplicate fields not populating. This is when you have the same field with the same label e.g. Company Name in multiple places on the Document but you only want to send a single label, value instance to the API and have it populate in all places where the field is. When you pass the label and value like so: { label: "company_name", value: "Blogger.com" } If you have the field company_name more than once in the document then only the first field will be populated. After a lot of digging into the DocuSign documentation I discovered the solution is to append "\\*" to the label name: { label: "\\*company_name", value: "Blogger.com" } Why this isn't the default behaviour is beyond me but the solution works as expected. DocuSign Rest API Documentation