Catalog PyPI
Back to packageRELEASE DETAILS

0.0.420

PyPI

a-bigelow.cdk-eventbridge-partner-processors

cdk-eventbridge-partner-processors

Published31 Dec 2023
Direct dependencies5
Transitive dependenciesNot calculated

README

Version 0.0.420 documentation

Eventbridge SaaS Partner fURLs

View on Construct Hub

npm version PyPI version Go project version

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

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

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 for additional information.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 5

Native requirements
5 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
aws-cdk-lib
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "~=3.8",
  "evaluation": "NOT_EVALUATED"
}
aws-cdk-lib <3.0.0,>=2.37.1runtime
constructs
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "~=3.8",
  "evaluation": "NOT_EVALUATED"
}
constructs <11.0.0,>=10.0.5runtime
jsii
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "~=3.8",
  "evaluation": "NOT_EVALUATED"
}
jsii <2.0.0,>=1.93.0runtime
publication
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "~=3.8",
  "evaluation": "NOT_EVALUATED"
}
publication >=0.0.3runtime
typeguard
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "~=3.8",
  "evaluation": "NOT_EVALUATED"
}
typeguard ~=2.13.3runtime

Distribution files

2 collected
a_bigelow.cdk_eventbridge_partner_processors-0.0.420-py3-none-any.whl

bdist_wheel · 41.67 KB · Python py3

Source file
a-bigelow.cdk-eventbridge-partner-processors-0.0.420.tar.gz

sdist · 42.98 KB · Python source

Source file

Repository

PENDING
a-bigelow/cdk-eventbridge-partner-processors

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:25 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:3e3d8866362d5abc16341c8ea2ea0786c9a9520109afc76b6533284bbf11061a

Other collected versions

View all collected versions →