AWS Lambda

Application and Data / Application Hosting / Serverless / Task Processing
Engineering Manager at Taylor and Francis·

We are in the process of building a modern content platform to deliver our content through various channels. We decided to go with Microservices architecture as we wanted scale. Microservice architecture style is an approach to developing an application as a suite of small independently deployable services built around specific business capabilities. You can gain modularity, extensive parallelism and cost-effective scaling by deploying services across many distributed servers. Microservices modularity facilitates independent updates/deployments, and helps to avoid single point of failure, which can help prevent large-scale outages. We also decided to use Event Driven Architecture pattern which is a popular distributed asynchronous architecture pattern used to produce highly scalable applications. The event-driven architecture is made up of highly decoupled, single-purpose event processing components that asynchronously receive and process events.

To build our #Backend capabilities we decided to use the following: 1. #Microservices - Java with Spring Boot , Node.js with ExpressJS and Python with Flask 2. #Eventsourcingframework - Amazon Kinesis , Amazon Kinesis Firehose , Amazon SNS , Amazon SQS, AWS Lambda 3. #Data - Amazon RDS , Amazon DynamoDB , Amazon S3 , MongoDB Atlas

To build #Webapps we decided to use Angular 2 with RxJS

#Devops - GitHub , Travis CI , Terraform , Docker , Serverless

READ MORE
14 upvotes·1 comment·1.8M views
Jon Senterfitt
Jon Senterfitt
·
January 29th 2021 at 7:07AM

But why not just use Contentful?

·
Reply
CTO at Checkly·

When adding a new feature to Checkly rearchitecting some older piece, I tend to pick Heroku for rolling it out. But not always, because sometimes I pick AWS Lambda . The short story:

  • Developer Experience trumps everything.
  • AWS Lambda is cheap. Up to a limit though. This impact not only your wallet.
  • If you need geographic spread, AWS is lonely at the top.
The setup

Recently, I was doing a brainstorm at a startup here in Berlin on the future of their infrastructure. They were ready to move on from their initial, almost 100% Ec2 + Chef based setup. Everything was on the table. But we crossed out a lot quite quickly:

  • Pure, uncut, self hosted Kubernetes — way too much complexity
  • Managed Kubernetes in various flavors — still too much complexity
  • Zeit — Maybe, but no Docker support
  • Elastic Beanstalk — Maybe, bit old but does the job
  • Heroku
  • Lambda

It became clear a mix of PaaS and FaaS was the way to go. What a surprise! That is exactly what I use for Checkly! But when do you pick which model?

I chopped that question up into the following categories:

  • Developer Experience / DX 🤓
  • Ops Experience / OX 🐂 (?)
  • Cost 💵
  • Lock in 🔐

Read the full post linked below for all details

READ MORE
Why I pick Heroku over AWS Lambda for my SaaS. But not always. (blog.checklyhq.com)
13 upvotes·147.9K views
DevOps Engineer at PlayAsYouGo·

For our Compute services, we decided to use AWS Lambda as it is perfect for quick executions (perfect for a bot), is serverless, and is required by Amazon Lex, which we will use as the framework for our bot. We chose Amazon Lex as it integrates well with other #AWS services and uses the same technology as Alexa. This will give customers the ability to purchase licenses through their Alexa device. We chose Amazon DynamoDB to store customer information as it is a noSQL database, has high performance, and highly available. If we decide to train our own models for license recommendation we will either use Amazon SageMaker or Amazon EC2 with AWS Elastic Load Balancing (ELB) and AWS ASG as they are ideal for model training and inference.

READ MORE
3 upvotes·42.1K views
Software Engineer at Amazon·

I only know Java and so thinking of building a web application in the following order. I need some help on what alternatives I can choose. Open to replace components, services, or infrastructure.

  • Frontend: AngularJS, Bootstrap
  • Web Framework: Spring Boot
  • Database: Amazon DynamoDB
  • Authentication: Auth0
  • Deployment: Amazon EC2 Container Service
  • Local Testing: Docker
  • Marketing: Mailchimp (Separately Export from Auth0)
  • Website Domain: GoDaddy
  • Routing: Amazon Route 53

PS: Open to exploring options of going completely native ( AWS Lambda, AWS Security but have to learn all)

READ MORE
6 upvotes·80.8K views
Replies (2)
Founder and CEO at Facile Technolab Pvt Ltd·

I would recommend to upgrade your stack and consider Angular.

Also, if you are working with docker, instead of manually managing your EC2 and docker inside it, switch to ECS as its free of cost and hassle free way to deploy and keep running your containers efficiently.

Good luck.

READ MORE
4 upvotes·6.5K views
Recommends
Ambassador

Instead of Docker , no doubt its great but it has vulnerabilitis and restricitions with dameon and root thread. I would pickup Podman. Also Ambasador is a culmination of Gateway LB and ServiceMesh on istio and Envoy. Great for both East-west and North south microservices communication, policy managment and security with Istio. Spring Boot is not a WebFW. For platform web fw one can use Reactive like SPring WebFlow rather than Spring MVC. For java experience, Spring provides great assets.

I will switch to using Kubernetes whether managed or custom depends on several factors rather than AWS ecs. For LB Amabassador is a great alternative on AWS. One can simply use this on top of ECS clusters. Instead of running in to different frameworks one can simply use one FW at both client and server side for consuming and SSE. I believe one can look at Lot of it depends what you need a full FW or a light librarry like React to be part of V in your MVC. Whether you need a SPA , on Mobile etc... in that case KOTLIN is also another option on Java. Dont go with Android. Best luck. Swapnil S

READ MORE
3 upvotes·5.5K views
Needs advice
on
Docker
and
AWS Lambda

I am building an API that can be achieved from either.

It's a simple CRUD API.

Is there a well-known public API in production by a known company powered by AWS Lambda?

I see that everybody uses containers instead.

READ MORE
3 upvotes·4.4K views
Replies (1)
Recommends
AWS Lambda

We have microservices in production with both technologies (hosting simple CRUDs, more complex async processes, GraphQL endpoints, etc). As a matter of preference, for greenfield projects, we tend to go full serverless (lambda, dynamo, aurora...), because is not only cheaper in general, but way easier to continuously integrate with bitbucket pipelines, github actions, etc. The drawback is still the cold starts, despite the last improvements in VPC cold starts; it's way less noticeable in non statically typed languages though (Node.js, Python...). You will have to keep the lambdas warmed with Cloudwatch events if you can't wait for a few seconds after the first invocation, or use the new feature Provisioned Concurrency (which we haven't), that kind of defeat the purpose of being serverless.

As to how to host different methods of an API in lambdas, there are different approaches: we have for example stacks of cloud formation where every lambda host unique functionalities (one for detecting faces in images, another for cropping, another for comparing, etc), and also other stacks where the entire GraphQL API is hosted with Fastify in just one lambda. It really depends on your use-case.

If you host your API in ECS with an ALB, you won't have cold starts, it will automatically handle blue/green deployments with no disruption in the service while you deploy, but your bill will increase, and the infrastructure will be more difficult to automate in something like a template.yaml.

Give it a try with aws sam (Serverless Application Model), with a few commands, you can have a sample API running in a couple of minutes.

READ MORE
5 upvotes·1 comment·167 views
aleyrizvi
aleyrizvi
·
July 29th 2020 at 9:20PM

thanks for the great advice.

I actually did play with serverless and rebuilt an api to see how it works.

I wasn't using vpc so the cold start was not noticeable. However, what was no able to achieve:

lambda to lambda communication.

I was easy with microservices. gPRC and rest based microservices can communicate with each other easily. How would we achieve something similar in lambda?

Secondly, CRUD api: would you recommend serverless over ecs/eks?

·
Reply

I planned to do a project in Cloud Firestore, which will store about 100GB of data. Shall I go for Cloud Firestore or traditional AWS RDS MS-SQL SERVER with AWS Lambda? Please I need your suggestion.

READ MORE
3 upvotes·7.8K views
Replies (1)
CTO at ITBVision·
Recommends
Cloud Firestore

Hi, It's depend of which type of data and interaction with database requires, I vote for Cloud firestore as NoSQL Db to store large or complex data. RDS is good for relational data with simple queries. Based on your application functionality you choose the stack. Hope, it helps.

READ MORE
2 upvotes·96 views
Sr. Backend Engineer at Grappus·
Needs advice
on
Spring Cloud
Node.js
and
Java

I am trying to write a cloud function that needs to perform a specific task. I will be using AWS Lambda for executing the function. I have 3 choices for stacks to write the lambda function: Plain Java, Node.js, or a Spring Boot stack. I have an idea of the time that the lambda would take to execute for a Hello World example for each of these stacks, and based on that, it is a close competition between Java and Node.js. I want to get some insight into what to chose and also how it would affect if my lambda would need scaling.

READ MORE
4 upvotes·9.1K views
Replies (3)
Recommends
Node.js

Hi Nikhil, I agree either Node.js or Java can be used to write the AWS lambda function. As you didn't say the type of task is going to be performed in AWS function. I would recommend Node.js if the task has to run asynchronous (i.e) Don't wait and simple continue with the next request.

Some difference between Node JS and Java

  • Node JS is open source where as Public updates for Oracle Java SE 8 released after January 2019 will not be available for business, commercial, or production use without a commercial license, as Oracle announced.
  • Node.JS uses asynchronous programming language, so its easier to write and executions is non blocking.
READ MORE
4 upvotes·1 comment·2.8K views
Nikhil Gurnani
Nikhil Gurnani
·
October 13th 2020 at 7:11AM

Agreed, however my task is not asynchronous in nature. Although, its still a lightweight task so I think this argument would still apply. Thanks for your insight!

·
Reply
Recommends
Spring Cloud

I find Spring Boot is the most productive environment, and written properly, it is fast. However, speed is the least of your concerns. You should be considering support and maintenance, along with time to market. The best tool for the job is the one that you can support 5 years in to the future. It is the one that will return dollars from customers soonest. You can always scale up your AWS Lambda servers to get more power.

READ MORE
4 upvotes·1 comment·5K views
Nikhil Gurnani
Nikhil Gurnani
·
October 13th 2020 at 7:10AM

Agreed on the points. Thanks for your insight!

·
Reply
View all (3)
Needs advice
on
Flutter
Firebase
and
AWS Amplify

I am currently working on a long term mobile app project. Current stack: Frontend: Dart/Flutter Backend: Go, AWS Resources (AWS Lambda, Amazon DynamoDB, etc.) Since there are only two developers and we have limited time and resources, we are looking for a BAAS like Firebase or AWS Amplify to handle auth and push notifications for now. We are prioritizing developing speed so we can iterate quickly. The only problem is that AWS amplify support for flutter is in developer preview and has limited capabilities (We have tested it out in our app). Firebase is the more mature option. It has great support for flutter and has more than we need for auth, notifications, etc. My question is that, if we choose firebase, we would be stuck with using two different cloud providers. Is this bad, or is this even a problem? I am willing to change anything on the backend architecture wise, so any suggestions would be greatly appreciated as I am somewhat unfamiliar with Google Cloud Platform. Thank you.

READ MORE
6 upvotes·38.8K views
Replies (1)
CEO at Kokoen GmbH·

I have never understood why using different vendors is such a big problem for many people. Each vendor is better than others for certain aspects, but no vendor is better than others for everything. At Kokoen, we usually host the applications we develop in AWS (EC2, RDS, S3), use Firebase (usually with OneSignal.com) for notifications, use Netlify for hosting certain SPAs, use Heroku to provide APIs directly from Git while we are still developing, MongoDB Cloud when we need NonSQL databases, etc..

READ MORE
3 upvotes·558 views