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
    Type: AWS::Serverless::Function
      Handler: dist/handler/people
      Runtime: go1.x
      Tracing: Active
          Type: Api
            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.
  • 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…

  • Makefile Best-Practices

    April 30th, 2019 • 167 Words

    The more projects you work on, the more streamlined your tooling gets. Hopefully. Various services using different languages have different tooling requirements, of course. A sweet Makefile can be the entry to a unified…

  • AppSync GraphQL API with Custom Domain and CloudFormation

    April 7th, 2019 • 165 Words

    With AWS AppSync, it’s easy to run your own serverless GraphQL service API. Thanks to Velocity Mapping Templates, DynamoDB, and AWS Lambda your can aim for an architecture without any maintenance at all. Getting started…

  • Last Update: 2019-12-08T13:15:37.795Z
    Stresemannstraße 132, 22769 Hamburg
    +49 151 54 64 90 55