Blog Insights How to deploy AWS Lambda applications with ease
Published on: April 29, 2020
5 min read

How to deploy AWS Lambda applications with ease

Highlights from our serverless webcast with AWS exploring the Serverless Application Model.

default-blog-image.png

In the Cloud Native Computing Foundation (CNCF) 2019 survey, 41% of respondents use serverless technology. Among those using serverless, 80% use a hosted platform vs. 20% who use installable software. Of the 80% using a hosted platform, the top tool is AWS Lambda (53%).

As organizations continue to explore the power and scalability of serverless computing, AWS Lambda remains a large part of the conversation. On April 9, AWS and GitLab hosted a serverless webcast to demonstrate how teams can use GitLab CI/CD and the AWS Serverless Application Model (SAM) to build, test, and deploy Lambda applications. For the serverless webcast, we showed attendees how to:

  • Use and install the AWS SAM CLI
  • Create a SAM application including a Lambda function and API
  • Build, test, and deploy the application using GitLab CI/CD

Whether you’re an AWS customer, a serverless newbie, or wanting to explore new ways to utilize GitLab CI/CD, this webcast had something for everyone. We’ve compiled some highlights from the discussion and a link to the on-demand webcast.

   Watch the webcast with AWS and GitLab to learn all about serverless - Tune in here!   

What is the Serverless Application Model (SAM)?

Tooling and workflows are the biggest roadblocks to adopting serverless. Organizations love the scalability and automation of serverless but don’t believe that they have the tools to implement it effectively. In this webcast, we showed how teams can seamlessly use SAM with GitLab CI/CD for their serverless application development.

AWS SAM is an open source framework for building serverless applications on AWS. It can be considered an extension to CloudFormation that makes it easier to define and deploy AWS resources – such as Lambda functions, API Gateway APIs and DynamoDB tables – commonly used in serverless applications.

In addition to its templating capabilities, SAM also includes a CLI for testing and deployment allows teams to define the resources they need as code. So that includes the serverless functions, but can also include any of the rest of the AWS suite of tools. SAM works by taking all of those things and creates a cloud formation stack from a SAM template. Next it automatically deploys those various functions and other AWS components and gets the IAM configured correctly between all of them so that an application can run not only Lambda functions, but also leverage the rest of the AWS stack to create an entire system and application.

Why is SAM a great tool for enterprise teams?

Senior developer evangelist at GitLab, Brendan O’Leary, is a Node.js developer at heart. "For better or worse," he laughs. When putting together the presentation, he noted that SAM offered templates not only in Python but in Node.js as well. "I think applies directly to the enterprise because those teams are going to be diverse. They're going to have different needs, they're going to choose the language that best fits those needs. It was great to have this starter template that I could start with Node.js 12X to really get started on coding in a comfortable environment for me."

The SAM templates can also be an asset for enterprise teams because they streamline a lot of the backend work. In the project presented during the webcast, we were able to start from a SAM template to orchestrate the IAM permissions we needed instead of coding all of the cloud formation ourselves. For a large or distributed team, this makes SAM a great out-of-the-box tool for serverless applications.

The benefits of going serverless

Ram Dileepan, solutions architect at AWS, highlighted this quote from AWS CTO Werner Vogels: No server is easier to manage than no server at all. "The main goal of modern application development is to automate and abstract as much as possible from the customer. So what we do as an AWS cloud, we abstract a lot of the details from developers so they can actually focus on building applications instead of working with infrastructure."

For teams looking to incorporate serverless, it can provide a number of benefits:

  • Scalable
  • Pay for what you use
  • Availability

Serverless and microservices best practices

While serverless means that, from the developer perspective, servers are not actively managed, there is still work to do. When you design the application, you have to design how are you going to monitor it and what you are going to monitor. "Even when you go to serverless, you can actually just follow the standard development best practices," says Ram. Here he presented his three serverless/microservices best practices:

  • Treat your infrastructure the way you treat your code
  • Set up an automated integration and deployment pipeline
  • Build with monitoring and observability from day one

In addition to going over the SAM CLI and creating a GitLab CI/CD pipeline, Brendan O’Leary and Ram Dileepan also fielded a variety of questions in the live Q&A. To watch the full webcast and learn more about serverless with GitLab and AWS, click the link below or in the header.

Watch our serverless webcast Ram Dileepan of AWS and Brendan O'Leary of GitLab 🍿

We want to hear from you

Enjoyed reading this blog post or have questions or feedback? Share your thoughts by creating a new topic in the GitLab community forum. Share your feedback

Ready to get started?

See what your team could do with a unified DevSecOps Platform.

Get free trial

Find out which plan works best for your team

Learn about pricing

Learn about what GitLab can do for your team

Talk to an expert