AWS Lambda 애플리케이션을 쉽게 배포하는 방법

Source: GitLab Blog | Author: Chrissie Buchanan

클라우드 네이티브 컴퓨팅 재단(CNCF) 2019년 조사에서는 응답자의 41%가 Serverless 기술을 사용합니다. 서버리스 사용자 중 80%는 호스트 플랫폼을 사용하지만, 20%는 설치 가능한 소프트웨어를 사용합니다. 사용하는 80%의 호스팅된 플랫폼 중 상위 도구가 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.

댓글 남기기