v0.1.1
[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
tolambda.Start
function to initialize AWS Lambda - was: The main function
Start(cfg Config)
wraps the
functionlambda.Start
to initialize AWS Lambda
- now: The main function
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)
}