AWS Lambda in Go, running locally with SAM and Docker

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • # Run this command $ sam init You can preselect a particular runtime or package type when using the `sam init` experience. Call `sam init --help` to learn more. Which template source would you like to use? 1 - AWS Quick Start Templates 2 - Custom Template Location Choice: 1 Choose an AWS Quick Start application template 1 - Hello World Example 2 - Multi-step workflow 3 - Serverless API 4 - Scheduled task 5 - Standalone function 6 - Data processing 7 - Infrastructure event management 8 - Lambda EFS example 9 - Machine Learning Template: 1 Use the most popular runtime and package type? (Python and zip) [y/N]: n Which runtime would you like to use? 1 - dotnet6 2 - dotnet5.0 3 - dotnetcore3.1 4 - go1.x 5 - graalvm.java11 (provided.al2) 6 - graalvm.java17 (provided.al2) 7 - java11 8 - java8.al2 9 - java8 10 - nodejs16.x 11 - nodejs14.x 12 - nodejs12.x 13 - python3.9 14 - python3.8 15 - python3.7 16 - python3.6 17 - ruby2.7 18 - rust (provided.al2) Runtime: 4 What package type would you like to use? 1 - Zip 2 - Image Package type: 1 Based on your selections, the only dependency manager available is mod. We will proceed copying the template using mod. Would you like to enable X-Ray tracing on the function(s) in your application? [y/N]: n Project name [sam-app]: test Cloning from https://github.com/aws/aws-sam-cli-app-templates (process may take a moment) ----------------------- Generating application: ----------------------- Name: test Runtime: go1.x Architectures: x86_64 Dependency Manager: mod Application Template: hello-world Output Directory: . Next steps can be found in the README file at ./test/README.md Commands you can use next ========================= [*] Create pipeline: cd test && sam pipeline init --bootstrap [*] Validate SAM template: sam validate [*] Test Function in the Cloud: sam sync --stack-name {stack-name} --watch

  • A working example on GitHub is provided for you, which has a template.yaml file that’s different to the ‘Hello World’ version, different Go code and synthetic events tailored for SQS. That repository is here: https://github.com/davedotdev/aws-local-lambda-test.git

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • serverless-java-container

    A Java wrapper to run Spring, Spring Boot, Jersey, and other apps inside AWS Lambda.

    You can read more about AWS Serverless here: https://aws.amazon.com/serverless/

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts