Skip to content

v0.1.1

Compare
Choose a tag to compare
@kislerdm kislerdm released this 24 Jan 23:13
· 30 commits to master since this release
af90a3d

[v0.1.1] - 2023-01-25

Changed

  • Changed the module's façade API:
    • now: The main function NewHandler(cfg Config) is used to initialise the Lambda handler used as the input
      to lambda.Start
      function to initialize AWS Lambda
    • was: The main function Start(cfg Config) wraps the
      function lambda.Start
      to initialize AWS Lambda

An example:

package main

import (
	"log"
	"os"
	
	"github.com/aws/aws-lambda-go/lambda"
	
	secretRotation "github.com/kislerdm/aws-lambda-secret-rotation"
)

func main()  {
	/* ... */
	handler, err := secretRotation.NewHandler(
		secretRotation.Config{
			/* ... */
			Debug: secretRotation.StrToBool(os.Getenv("DEBUG")),
		},
	)
	if err != nil {
		log.Fatalf("unable to init lambda handler to rotate secret, %v", err)
	}

	lambda.Start(handler)
}