Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 7 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
# AWS Lambda for Go

[![tests][1]][2]
[![Go Reference][5]][6]
[![GoCard][7]][8]
[![codecov][9]][10]

[1]: https://github.com/aws/aws-lambda-go/workflows/tests/badge.svg
[2]: https://github.com/aws/aws-lambda-go/actions?query=workflow%3Atests
[5]: https://pkg.go.dev/badge/github.com/aws/aws-lambda-go.svg
[6]: https://pkg.go.dev/github.com/aws/aws-lambda-go
[7]: https://goreportcard.com/badge/github.com/aws/aws-lambda-go
[8]: https://goreportcard.com/report/github.com/aws/aws-lambda-go
[9]: https://codecov.io/gh/aws/aws-lambda-go/branch/master/graph/badge.svg
[10]: https://codecov.io/gh/aws/aws-lambda-go
[![tests](https://github.com/aws/aws-lambda-go/workflows/tests/badge.svg)](https://github.com/aws/aws-lambda-go/actions?query=workflow%3Atests)
[![Go Reference](https://pkg.go.dev/badge/github.com/aws/aws-lambda-go.svg)](https://pkg.go.dev/github.com/aws/aws-lambda-go)
[![GoCard](https://goreportcard.com/badge/github.com/aws/aws-lambda-go)](https://goreportcard.com/report/github.com/aws/aws-lambda-go)
[![codecov](https://codecov.io/gh/aws/aws-lambda-go/branch/master/graph/badge.svg)](https://codecov.io/gh/aws/aws-lambda-go)

Libraries, samples, and tools to help Go developers develop AWS Lambda functions.

Expand Down Expand Up @@ -108,5 +99,7 @@ To deploy your function, refer to the official documentation for [deploying usin

# Event Integrations

The [event models](https://github.com/aws/aws-lambda-go/tree/master/events) can be used to model AWS event sources. The official documentation has [detailed walkthroughs](https://docs.aws.amazon.com/lambda/latest/dg/use-cases.html).
[![events package](https://pkg.go.dev/badge/github.com/aws/aws-lambda-go/events.svg)](https://pkg.go.dev/github.com/aws/aws-lambda-go/events)

The events package provides type definitions for common AWS event sources. The official documentation has [detailed walkthroughs](https://docs.aws.amazon.com/lambda/latest/dg/use-cases.html).

36 changes: 0 additions & 36 deletions cfn/README.md

This file was deleted.

11 changes: 11 additions & 0 deletions cfn/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Package cfn provides helpers for implementing AWS CloudFormation custom resources.
//
// CloudFormation custom resources allow you to write custom provisioning logic that CloudFormation
// runs when you create, update, or delete stacks. This package handles the response protocol,
// making it easier to implement custom resource handlers.
//
// The LambdaWrap helper catches errors and ensures proper responses are sent to CloudFormation's
// pre-signed URL, preventing stack operations from hanging.
//
// See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources.html
package cfn
25 changes: 25 additions & 0 deletions cfn/example_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package cfn_test

import (
"context"

"github.com/aws/aws-lambda-go/cfn"
"github.com/aws/aws-lambda-go/lambda"
)

// CloudFormation custom resources require a different response handling due to the way stacks execute.
// The cfn.LambdaWrap helper catches all errors and ensures the correct response is sent to the
// pre-signed URL that comes with the event.
//
// This example safely 'Echo' back anything given into the Echo parameter within the Custom Resource call.
func Example() {
lambda.Start(cfn.LambdaWrap(func(ctx context.Context, event cfn.Event) (physicalResourceID string, data map[string]interface{}, err error) {
v, _ := event.ResourceProperties["Echo"].(string)

data = map[string]interface{}{
"Echo": v,
}

return
}))
}
71 changes: 0 additions & 71 deletions events/README.md

This file was deleted.

38 changes: 0 additions & 38 deletions events/README_ALBTargetGroupEvents.md

This file was deleted.

67 changes: 0 additions & 67 deletions events/README_ApiGatewayCustomAuthorizer.md

This file was deleted.

36 changes: 0 additions & 36 deletions events/README_ApiGatewayEvent.md

This file was deleted.

21 changes: 0 additions & 21 deletions events/README_AutoScaling.md

This file was deleted.

Loading
Loading