a-bigelow.cdk-eventbridge-partner-processors


Namea-bigelow.cdk-eventbridge-partner-processors JSON
Version 0.0.420 PyPI version JSON
download
home_pagehttps://github.com/a-bigelow/cdk-eventbridge-partner-processors.git
Summarycdk-eventbridge-partner-processors
upload_time2023-12-31 00:17:31
maintainer
docs_urlNone
authora-bigelow<adam@adambigelow.com>
requires_python~=3.8
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Eventbridge SaaS Partner fURLs

[![View on Construct Hub](https://constructs.dev/badge?package=cdk-eventbridge-partner-processors)](https://constructs.dev/packages/cdk-eventbridge-partner-processors)

[![npm version](https://badge.fury.io/js/cdk-eventbridge-partner-processors.svg)](https://badge.fury.io/js/cdk-eventbridge-partner-processors)
[![PyPI version](https://badge.fury.io/py/a-bigelow.cdk-eventbridge-partner-processors.svg)](https://badge.fury.io/py/a-bigelow.cdk-eventbridge-partner-processors)
[![Go project version](https://badge.fury.io/go/github.com%2Fa-bigelow%2Fcdk-eventbridge-partner-processors-go.svg)](https://badge.fury.io/go/github.com%2Fa-bigelow%2Fcdk-eventbridge-partner-processors-go)

This CDK Construct library provides CDK constructs for the 1st-party (i.e. developed by AWS) lambda fURL webhook receivers for:

* GitHub
* Stripe
* Twilio

## Usage Examples (Simplified)

These examples are consistent for all 3 primary exported constructs of this library:

* `GitHubEventProcessor`
* `TwilioEventProcessor`
* `StripeEventProcessor`

> Note: Click on the above `View on Construct Hub` button to view auto-generated examples in Python/Go

### Typescript

```python
import { GitHubEventProcessor } from 'cdk-eventbridge-partner-processors';
import { Stack, StackProps } from 'aws-cdk-lib';
import { Construct } from 'constructs';
import { EventBus } from 'aws-cdk-lib/aws-events';
import { Secret } from 'aws-cdk-lib/aws-secretsmanager';

export class MyStackWithABetterName extends Stack {
    constructor(scope: Construct, id: string, props: StackProps) {
        super(scope, id, props);

        // This library has no opinion on how you reference your EventBus,
        // It just needs to fulfill the IEventBus protocol
        const myEventBus = new EventBus(this, 'TheBestBusEver', {
            eventBusName: 'TheGreatestBus'
        });

        // This library has no opinion on how you reference your secret,
        // It just needs to fulfill the ISecret protocol
        const mySecret = Secret.fromSecretNameV2(this, 'MyNuclearCodeSecret', '/home/recipes/icbm')

        // Function will automatically receive permission to:
        // 1. Post events to the given bus
        // 2. Read the given secret
        const githubEventProcessor = new GitHubEventProcessor(this, 'GitHubProcessor', {
            eventBus: myEventBus,
            webhookSecret: mySecret,
            lambdaInvocationAlarmThreshold: 2000,
        })

    }
}
```

### Golang

```go
package main

import (
	partner "github.com/a-bigelow/cdk-eventbridge-partner-processors-go"
	"github.com/aws/aws-cdk-go/awscdk/v2"
	"github.com/aws/aws-cdk-go/awscdk/v2/awsevents"
	"github.com/aws/constructs-go/constructs/v10"
	"github.com/aws/jsii-runtime-go"
)

type ClusterStackProps struct {
	awscdk.StackProps
}

func NewClusterStack(scope constructs.Construct, id string, props *ClusterStackProps) awscdk.Stack {
	var sprops awscdk.StackProps
	if props != nil {
		sprops = props.StackProps
	}
	stack := awscdk.NewStack(scope, &id, &sprops)

	// The code that defines your stack goes here
	eventProps := awsevents.EventBusProps{EventBusName: jsii.String("name")}

	eventBus := awsevents.NewEventBus(stack, jsii.String("id"), &eventProps)

	secret := secretsmanager.secret.fromSecretNameV2(scope, jsii.String("secret"), jsii.String("secretName"))
	partnerProcessor := partner.GithubEventProcessor{
		EventBus:                       eventBus,
		WebhookSecret:                  secret,
		LambdaInvocationAlarmThreshold: 2000,
	}

	_ = partner.NewGitHubEventProcessor(stack, jsii.String("id"), partnerProcessor)

	return stack
}
```

### Disclaimer

> :warning: The Lambda Functions that handle the actual event processing in this Library are owned and maintained by Amazon Web Services. This CDK Construct library provides a thin deployment wrapper for these functions. Changes made to the S3 location of the functions will break this library. Until I have a way to deterministically track where these things are, please raise an **issue** if you have reason to believe that the functions have moved.

### AWS Documentation

See [here](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-saas-furls.html) for additional information.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/a-bigelow/cdk-eventbridge-partner-processors.git",
    "name": "a-bigelow.cdk-eventbridge-partner-processors",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "~=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "a-bigelow<adam@adambigelow.com>",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/c4/58/3ff92bee0880186d4e4d539d017042509d77ddf7574ff0267219c3ebda77/a-bigelow.cdk-eventbridge-partner-processors-0.0.420.tar.gz",
    "platform": null,
    "description": "# Eventbridge SaaS Partner fURLs\n\n[![View on Construct Hub](https://constructs.dev/badge?package=cdk-eventbridge-partner-processors)](https://constructs.dev/packages/cdk-eventbridge-partner-processors)\n\n[![npm version](https://badge.fury.io/js/cdk-eventbridge-partner-processors.svg)](https://badge.fury.io/js/cdk-eventbridge-partner-processors)\n[![PyPI version](https://badge.fury.io/py/a-bigelow.cdk-eventbridge-partner-processors.svg)](https://badge.fury.io/py/a-bigelow.cdk-eventbridge-partner-processors)\n[![Go project version](https://badge.fury.io/go/github.com%2Fa-bigelow%2Fcdk-eventbridge-partner-processors-go.svg)](https://badge.fury.io/go/github.com%2Fa-bigelow%2Fcdk-eventbridge-partner-processors-go)\n\nThis CDK Construct library provides CDK constructs for the 1st-party (i.e. developed by AWS) lambda fURL webhook receivers for:\n\n* GitHub\n* Stripe\n* Twilio\n\n## Usage Examples (Simplified)\n\nThese examples are consistent for all 3 primary exported constructs of this library:\n\n* `GitHubEventProcessor`\n* `TwilioEventProcessor`\n* `StripeEventProcessor`\n\n> Note: Click on the above `View on Construct Hub` button to view auto-generated examples in Python/Go\n\n### Typescript\n\n```python\nimport { GitHubEventProcessor } from 'cdk-eventbridge-partner-processors';\nimport { Stack, StackProps } from 'aws-cdk-lib';\nimport { Construct } from 'constructs';\nimport { EventBus } from 'aws-cdk-lib/aws-events';\nimport { Secret } from 'aws-cdk-lib/aws-secretsmanager';\n\nexport class MyStackWithABetterName extends Stack {\n    constructor(scope: Construct, id: string, props: StackProps) {\n        super(scope, id, props);\n\n        // This library has no opinion on how you reference your EventBus,\n        // It just needs to fulfill the IEventBus protocol\n        const myEventBus = new EventBus(this, 'TheBestBusEver', {\n            eventBusName: 'TheGreatestBus'\n        });\n\n        // This library has no opinion on how you reference your secret,\n        // It just needs to fulfill the ISecret protocol\n        const mySecret = Secret.fromSecretNameV2(this, 'MyNuclearCodeSecret', '/home/recipes/icbm')\n\n        // Function will automatically receive permission to:\n        // 1. Post events to the given bus\n        // 2. Read the given secret\n        const githubEventProcessor = new GitHubEventProcessor(this, 'GitHubProcessor', {\n            eventBus: myEventBus,\n            webhookSecret: mySecret,\n            lambdaInvocationAlarmThreshold: 2000,\n        })\n\n    }\n}\n```\n\n### Golang\n\n```go\npackage main\n\nimport (\n\tpartner \"github.com/a-bigelow/cdk-eventbridge-partner-processors-go\"\n\t\"github.com/aws/aws-cdk-go/awscdk/v2\"\n\t\"github.com/aws/aws-cdk-go/awscdk/v2/awsevents\"\n\t\"github.com/aws/constructs-go/constructs/v10\"\n\t\"github.com/aws/jsii-runtime-go\"\n)\n\ntype ClusterStackProps struct {\n\tawscdk.StackProps\n}\n\nfunc NewClusterStack(scope constructs.Construct, id string, props *ClusterStackProps) awscdk.Stack {\n\tvar sprops awscdk.StackProps\n\tif props != nil {\n\t\tsprops = props.StackProps\n\t}\n\tstack := awscdk.NewStack(scope, &id, &sprops)\n\n\t// The code that defines your stack goes here\n\teventProps := awsevents.EventBusProps{EventBusName: jsii.String(\"name\")}\n\n\teventBus := awsevents.NewEventBus(stack, jsii.String(\"id\"), &eventProps)\n\n\tsecret := secretsmanager.secret.fromSecretNameV2(scope, jsii.String(\"secret\"), jsii.String(\"secretName\"))\n\tpartnerProcessor := partner.GithubEventProcessor{\n\t\tEventBus:                       eventBus,\n\t\tWebhookSecret:                  secret,\n\t\tLambdaInvocationAlarmThreshold: 2000,\n\t}\n\n\t_ = partner.NewGitHubEventProcessor(stack, jsii.String(\"id\"), partnerProcessor)\n\n\treturn stack\n}\n```\n\n### Disclaimer\n\n> :warning: The Lambda Functions that handle the actual event processing in this Library are owned and maintained by Amazon Web Services. This CDK Construct library provides a thin deployment wrapper for these functions. Changes made to the S3 location of the functions will break this library. Until I have a way to deterministically track where these things are, please raise an **issue** if you have reason to believe that the functions have moved.\n\n### AWS Documentation\n\nSee [here](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-saas-furls.html) for additional information.\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "cdk-eventbridge-partner-processors",
    "version": "0.0.420",
    "project_urls": {
        "Homepage": "https://github.com/a-bigelow/cdk-eventbridge-partner-processors.git",
        "Source": "https://github.com/a-bigelow/cdk-eventbridge-partner-processors.git"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b26ea6751a821cf8fcc8652910b83e7f58767f32c708a0e828350813e20027dc",
                "md5": "0cbb5669e86c832ef2028566b53d46a2",
                "sha256": "c5ce1f11b9c49c12718037973f37e33e0d98d8130b64a11d04ef37e18d3db261"
            },
            "downloads": -1,
            "filename": "a_bigelow.cdk_eventbridge_partner_processors-0.0.420-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0cbb5669e86c832ef2028566b53d46a2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.8",
            "size": 42673,
            "upload_time": "2023-12-31T00:17:27",
            "upload_time_iso_8601": "2023-12-31T00:17:27.410891Z",
            "url": "https://files.pythonhosted.org/packages/b2/6e/a6751a821cf8fcc8652910b83e7f58767f32c708a0e828350813e20027dc/a_bigelow.cdk_eventbridge_partner_processors-0.0.420-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c4583ff92bee0880186d4e4d539d017042509d77ddf7574ff0267219c3ebda77",
                "md5": "b6fb2cf16585087a7e3e067645082fd6",
                "sha256": "0c3d44591d30d2bb47ec3a884e10da8604bba25cf3d569475bc728601c2c385b"
            },
            "downloads": -1,
            "filename": "a-bigelow.cdk-eventbridge-partner-processors-0.0.420.tar.gz",
            "has_sig": false,
            "md5_digest": "b6fb2cf16585087a7e3e067645082fd6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.8",
            "size": 44013,
            "upload_time": "2023-12-31T00:17:31",
            "upload_time_iso_8601": "2023-12-31T00:17:31.594267Z",
            "url": "https://files.pythonhosted.org/packages/c4/58/3ff92bee0880186d4e4d539d017042509d77ddf7574ff0267219c3ebda77/a-bigelow.cdk-eventbridge-partner-processors-0.0.420.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-31 00:17:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "a-bigelow",
    "github_project": "cdk-eventbridge-partner-processors",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "a-bigelow.cdk-eventbridge-partner-processors"
}
        
Elapsed time: 0.16784s