Deploy Golang Lambda with AWS Serverless Application Model

February 13th, 2018 • 107 Words

Amazon just recently announced native Golang support for AWS Lambda. Together with the Serverless Application Model (SAM) you can easily deploy your Golang code and create an HTTP interface using Amazon API Gateway.

I created an example project on GitHub with multiple binaries that are deployed using CircleCI and the AWS Command-Line interface. Thanks to the Serverless Application Model the needed CloudFormation template is minimal, compared to creating all resources individually:

AWSTemplateFormatVersion: 2010-09-09
Transform: AWS::Serverless-2016-10-31
Resources:
  People:
    Type: AWS::Serverless::Function
    Properties:
      Handler: dist/handler/people
      Runtime: go1.x
      Tracing: Active
      Events:
        GetEvent:
          Type: Api
          Properties:
            Path: /people
            Method: get

You can easily notice, the Serverless Application Model is heavily influenced by the serverless project. Together with improved AWS performance, using Golang, AWS Lambda, and SAM seem to create a perfect setup to deploy serverless applications.


View on GitHubSource code is published using the MIT License.
  • Deploy React SPA with CodePipeline and CodeBuild using AWS CDK

    January 23rd, 2020 • 748 Words

    There are plenty of tools and services for continuous delivery available. Most of them are either directly built into the source code management tools you already use, or perfectly integrate with them. You might be…

  • AWS re:Invent 2019 Recap & Videos

    December 15th, 2019 • 360 Words

    I was able to attend the AWS re:Invent 2019 conference. A week full of learning about current and new technologies, services, and general approaches is definitely overwhelming. There is no much content available, during…

  • CloudFormation Best-Practices

    May 1st, 2019 • 457 Words

    You can find plenty of frameworks and tools to provision your AWS resources. Some of them do a great job for a specific purpose, others are more generic. Nevertheless, I do prefer to use native CloudFormation templates…

  • Last Update: 2020-01-23T19:02:36.710Z
    Stresemannstraße 132, 22769 Hamburg
    +49 151 54 64 90 55
    inbox@sbstjn.com