All Projects → elgohr → go-localstack

elgohr / go-localstack

Licence: Apache-2.0 license
Go Wrapper for using localstack

Programming Languages

go
31211 projects - #10 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to go-localstack

Awesome Aws
A curated list of awesome Amazon Web Services (AWS) libraries, open source repos, guides, blogs, and other resources. Featuring the Fiery Meter of AWSome.
Stars: ✭ 9,895 (+17569.64%)
Mutual labels:  route53, lambda, cloudformation, ec2, dynamodb, s3, cloudwatch, iam, redshift
Aws Sdk Perl
A community AWS SDK for Perl Programmers
Stars: ✭ 153 (+173.21%)
Mutual labels:  cloudformation, ec2, dynamodb, s3, sqs, sns
Lambdaguard
AWS Serverless Security
Stars: ✭ 300 (+435.71%)
Mutual labels:  lambda, dynamodb, iam, sqs, sns
gozeit
GoZeit
Stars: ✭ 19 (-66.07%)
Mutual labels:  lambda, dynamodb, s3, cloudwatch, ses
Sherlock Holmes Partying In The Jungle
Parses AWS events payloads into a plain JavaScript object
Stars: ✭ 12 (-78.57%)
Mutual labels:  lambda, dynamodb, s3, sns
Aws Cli Cheatsheet
☁️ AWS CLI + JQ = Make life easier
Stars: ✭ 94 (+67.86%)
Mutual labels:  lambda, ec2, dynamodb, sns
aws-pdf-textract-pipeline
🔍 Data pipeline for crawling PDFs from the Web and transforming their contents into structured data using AWS textract. Built with AWS CDK + TypeScript
Stars: ✭ 141 (+151.79%)
Mutual labels:  cloudformation, dynamodb, s3, sns
sensu-plugins-aws
This plugin provides native AWS instrumentation for monitoring and metrics collection, including: health and metrics for various AWS services, such as EC2, RDS, ELB, and more, as well as handlers for EC2, SES, and SNS.
Stars: ✭ 79 (+41.07%)
Mutual labels:  ec2, cloudwatch, sqs, sns
Serverless
This is intended to be a repo containing all of the official AWS Serverless architecture patterns built with CDK for developers to use. All patterns come in Typescript and Python with the exported CloudFormation also included.
Stars: ✭ 1,048 (+1771.43%)
Mutual labels:  cloudformation, dynamodb, sqs, sns
terraform-aws-lambda
A Terraform module to create AWS Lambda ressources.
Stars: ✭ 40 (-28.57%)
Mutual labels:  lambda, dynamodb, sqs, sns
Hands-On-Serverless-Applications-with-Go
Hands-On Serverless Applications with Go, published by Packt.
Stars: ✭ 92 (+64.29%)
Mutual labels:  lambda, cloudformation, dynamodb, s3
Dazn Lambda Powertools
Powertools (logger, HTTP client, AWS clients, middlewares, patterns) for Lambda functions.
Stars: ✭ 501 (+794.64%)
Mutual labels:  lambda, dynamodb, sqs, sns
Aws Sdk Js V3
Modularized AWS SDK for JavaScript.
Stars: ✭ 737 (+1216.07%)
Mutual labels:  lambda, dynamodb, s3, sns
Aws Iot Certificate Vending Machine
The CVM allows a device to apply for its own certificate and installation.
Stars: ✭ 64 (+14.29%)
Mutual labels:  lambda, cloudformation, dynamodb
Workshop Donkeytracker
Workshop to build a serverless tracking application for your mobile device with an AWS backend
Stars: ✭ 27 (-51.79%)
Mutual labels:  lambda, dynamodb, s3
Historical
A serverless, event-driven AWS configuration collection service with configuration versioning.
Stars: ✭ 85 (+51.79%)
Mutual labels:  lambda, dynamodb, s3
Awstaghelper
AWS bulk tagging tool
Stars: ✭ 98 (+75%)
Mutual labels:  lambda, ec2, s3
Sqs Worker Serverless
Example for SQS Worker in AWS Lambda using Serverless
Stars: ✭ 164 (+192.86%)
Mutual labels:  lambda, dynamodb, sqs
Aws Mobile React Native Starter
AWS Mobile React Native Starter App https://aws.amazon.com/mobile
Stars: ✭ 2,247 (+3912.5%)
Mutual labels:  lambda, dynamodb, s3
Github To S3 Lambda Deployer
⚓️ GitHub webhook extension for uploading static pages to AWS S3 directly after commiting to master via Lambda written in Node.js
Stars: ✭ 23 (-58.93%)
Mutual labels:  lambda, s3, sns

go-localstack

Test codecov CodeQL Go Report Card PkgGoDev License

Go Wrapper for using localstack in go testing

Installation

Please make sure that you have Docker installed.

go get github.com/elgohr/go-localstack

Usage

With SDK V2

func ExampleLocalstackWithContextSdkV2() {
    ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second)
    defer cancel()
    
    l, err := localstack.NewInstance()
    if err != nil {
        log.Fatalf("Could not connect to Docker %v", err)
    }
    if err := l.StartWithContext(ctx); err != nil {
        log.Fatalf("Could not start localstack %v", err)
    }
    
    cfg, err := config.LoadDefaultConfig(ctx,
        config.WithRegion("us-east-1"),
        config.WithEndpointResolverWithOptions(aws.EndpointResolverWithOptionsFunc(func(_, _ string, _ ...interface{}) (aws.Endpoint, error) {
            return aws.Endpoint{
			    PartitionID:       "aws", 
			    URL:               l.EndpointV2(localstack.SQS), 
			    SigningRegion:     "us-east-1", 
			    HostnameImmutable: true,
		    }, nil
        })),
        config.WithCredentialsProvider(credentials.NewStaticCredentialsProvider("dummy", "dummy", "dummy")),
    )
    if err != nil {
        log.Fatalf("Could not get config %v", err)
    }
    
    myTestWithV2(cfg)
}

With SDK V1

func TestWithLocalStack(t *testing.T) {
    ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second)
    defer cancel()

    l, err := localstack.NewInstance()
    if err != nil {
        log.Fatalf("Could not connect to Docker %v", err)
    }
    if err := l.StartWithContext(ctx); err != nil {
        log.Fatalf("Could not start localstack %v", err)
    }

    myTestWith(&aws.Config{
        Credentials: credentials.NewStaticCredentials("not", "empty", ""),
        DisableSSL:  aws.Bool(true),
        Region:      aws.String(endpoints.UsWest1RegionID),
        Endpoint:    aws.String(l.Endpoint(localstack.SQS)),
    })
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].