Which AWS Lambda programming language should you use?

To me personally, when I think programming languages I think JavaScript and while 67% of the developers out there might think the same (at first) that does not imply it’s the most efficient language to use with AWS Lambda.

So without further ado, here we go.

1. Java

Java has been in service for decades and is, to this day, a reliable option when choosing the backbone of your stack. With AWS Lambda is no different as it makes a strong candidate for your functions.

Java applications in AWS Lambda have the following merits.

Reliable and well-tested libraries. The libraries will make life easy for you through enhanced testability and maintainability of AWS Lambda tasks.

Predictive performance. While Java has slower spin up time, you can easily predict the memory needs of your functions and to counteract those dreaded colds starts you can just up your memory allocation.

Tooling Support. Java has a wide range of tooling support which includes Eclipse, IntelliJ IDEA, Maven, and Gradle among others.

If you’re wondering how Java remains an efficient AWS lambda language, here is the answer. Java has unique characteristics like multi-thread concurrency, platform independence, security, and object-orientation.

2. Node.js

I’m definitely biased but Node.js is probably the best one on this list. I know it has it’s downfalls but the overwhelming support that Node had in the past years has to have its merits.

Why Node.js?

Modules. As of now, there are 2257 plugins on npm tagged “aws-lambda” which help developers with their applications in a lot of different ways from running Lambda locally to keeping vital functions warm to (avoid cold-starts)
Spinup times. Node.js has better spin-up times than C## or Java which make it a better option for client facing applications that risk suffering from uneven traffic distribution.

Community. It’d be a miss if I didn’t mentionin this as one of the major draw-ins of Node. You can always count on its community support to find a solution to your problem.

#aws

What is GEEK

Buddha Community

Which AWS Lambda programming language should you use?

Cross-account access to invoke AWS lambda using AWS CDK

If you are here, you may have a pretty good knowledge of how to use AWS CDK for defining cloud infrastructure in code and provisioning it through AWS. So let’s get started on how to grant permission to your lambda function to access the resources in another AWS account.

Let’s say you have two accounts called Account A and Account B, and you need to give permission to lambda function in Account A (ex: 11111111)to access the resources in Account B(22222222). You can easily do this by assuming an IAM Role in Account B and then uses the returned credentials to invoke AWS resources in Account B.

#acces #account #aws #lambda #aws lambda #aws cdk

Cache secrets using AWS Lambda extensions

What is the AWS Lambda extension?

A month back AWS announced a preview of Lambda Extensions, a new way to easily integrate Lambda with your favorite monitoring, observability, security, and governance tools. Extensions can be published as Lambda layers, there are two types are extension:

  • Internal extensions → Run as part of the runtime process, in-process with your code. Internal extensions enable use cases such as automatically instrumenting code.
  • External extensions → Allow you to run separate processes from the runtime but still within the same execution environment as the Lambda function. External extensions can start before the runtime process and can continue after the runtime shuts down. These extensions run as companion processes to Lambda functions.

#aws #aws-secrets-manager #lambda #aws lambda

Luis  Rodrigues

Luis Rodrigues

1604162762

Sending Email using AWS Lambda and Amazon SES

In this article, we’ll discuss the procedure to build a Lambda function that will send an email to the specified recipient from the specified sender using Amazon Simple Email Service (SES). In this project, we’ll do everything in AWS console.

Before beginning, let’s understand some key concepts.

Amazon Simple Email Service (SES)

Amazon SES is an email platform that provides an easy, cost-effective way for us to send and receive email using our own email addresses and domains.

Using SES, we can send marketing emails such as special offers, transactional emails such as order confirmations, and other types of correspondence such as newsletters. When we use Amazon SES to receive mail, we can develop software solutions such as email autoresponders, email unsubscribe systems, and applications that generate customer support tickets from incoming emails.

Amazon SES eliminates infrastructure challenges such as email server management, network configuration etc.

#programming #nodejs #aws #aws-lambda #aws-simple-email-service

Gordon  Matlala

Gordon Matlala

1617875400

Adding Code to AWS Lambda, Lambda Layers, and Lambda Extensions Using Docker

2020 was a difficult year for all of us, and it was no different for engineering teams. Many software releases were postponed, and the industry slowed its development speed quite a bit.

But at least at AWS, some teams released updates out of the door at the end of the year. AWS Lambda received two significant improvements:

  • AWS Lambda Extensions; and
  • Support of Docker images for your functions.

With these two new features and Lambda Layers, we now have three ways to add code to Lambda that isn’t directly part of our Lambda function.

The question is now: when should we use what?

In this article, I try to shine some light on the Lambda Layers, Lambda Extensions, and Docker image for Lambda.

First things first. All these Lambda features can be used together. So if you think about where to put your code, at least your decisions aren’t mutually exclusive. You can upload a Docker image and attach a regular Lambda Layer and a Lambda Extension. The same is possible if your Lambda function is based on a ZIP archive.

What does this all mean? Keep reading and find out.

#aws #aws-lambda #serverless #devops #docker #lambda

Automated Unit Testing in DevOps Pipeline - AWS Lambda using AWS CodeBuild

Learn to automated unit testing in AWS DevOps Pipeline using AWS CodeBuild, including demo in python.

#aws #lambda #aws lambda #pipeline