Skip to content

NextOption/aws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Next Option Logo

Next Option of AWS, LocalStack

AWS did not support local development.
LocalStack was born to solve this problem.
But now they come with Premium Plan (-__-!) and provide cloud services.
We are here with you, the next option of AWS, LocalStack.

Feature

  • Support for local development for RealAWS services.
  • Become a Localstack alternative.
  • Ready to live on production as a backup for RealAWS.

Lambda

Just inject our fake lambda inside your code and you are ready to go. It has the same interface as AWS Lambda but run in your code. Only provide basic functions to Invoke now. It's enough for most of the cases that we just need to invoke lambda.

Supported Interface:

  1. Invoke(input *InvokeInput) (*InvokeOutput, error)
  2. InvokeWithContext(aws.Context, *lambda.InvokeInput, ...request.Option) (*lambda.InvokeOutput, error)
  3. InvokeAsync & InvokeAsyncWithContext deprecated by aws but supported by Invoke or InvokeWithContext
  4. Other APIs are not supported yet.

Sample code:

	if enableFakeLambda {
		InitFakeLambda(
			fake.WithFunction(lambdaFn1Name, handleFn1),
			fake.WithFunction(fn2Name, handleFn2),
		)
	} else {
		InitAWSLambda()
	}
	// invoke lambda_fn_1
	// lambda_fn_1 return nothing so we just skip it
	_, err := GetServerless().Invoke(&real.InvokeInput{
		FunctionName: &lambdaFn1Name,
	})
	if err != nil {
		fmt.Printf("error when invoke lambda 1: %v", err)
		return
	}

Check the example/lambda folder for more information.

SQS (in progress)

Just try to implement simple queue by go channel.