# Amazon EventBridge Pipes Sources Construct Library
<!--BEGIN STABILITY BANNER-->---
![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge)
> The APIs of higher level constructs in this module are experimental and under active development.
> They are subject to non-backward compatible changes or removal in any future version. These are
> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be
> announced in the release notes. This means that while you may use them, you may need to update
> your source code when upgrading to a newer version of this package.
---
<!--END STABILITY BANNER-->
EventBridge Pipes Sources let you create a source for a EventBridge Pipe.
For more details see the service documentation:
[Documentation](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-source.html)
## Pipe sources
Pipe sources are the starting point of a EventBridge Pipe. They are the source of the events that are sent to the pipe.
### Amazon SQS
A SQS message queue can be used as a source for a pipe. The queue will be polled for new messages and the messages will be sent to the pipe.
```python
# source_queue: sqs.Queue
# target_queue: sqs.Queue
pipe_source = sources.SqsSource(source_queue)
pipe = pipes.Pipe(self, "Pipe",
source=pipe_source,
target=SqsTarget(target_queue)
)
```
The polling configuration can be customized:
```python
# source_queue: sqs.Queue
# target_queue: sqs.Queue
pipe_source = sources.SqsSource(source_queue,
batch_size=10,
maximum_batching_window=cdk.Duration.seconds(10)
)
pipe = pipes.Pipe(self, "Pipe",
source=pipe_source,
target=SqsTarget(target_queue)
)
```
### Amazon Kinesis
A Kinesis stream can be used as a source for a pipe. The stream will be polled for new messages and the messages will be sent to the pipe.
```python
# source_stream: kinesis.Stream
# target_queue: sqs.Queue
pipe_source = sources.KinesisSource(source_stream,
starting_position=sources.KinesisStartingPosition.LATEST
)
pipe = pipes.Pipe(self, "Pipe",
source=pipe_source,
target=SqsTarget(target_queue)
)
```
### Amazon DynamoDB
A DynamoDB stream can be used as a source for a pipe. The stream will be polled for new messages and the messages will be sent to the pipe.
```python
# target_queue: sqs.Queue
table = ddb.TableV2(self, "MyTable",
partition_key=ddb.Attribute(
name="id",
type=ddb.AttributeType.STRING
),
dynamo_stream=ddb.StreamViewType.NEW_IMAGE
)
pipe_source = sources.DynamoDBSource(table,
starting_position=sources.DynamoDBStartingPosition.LATEST
)
pipe = pipes.Pipe(self, "Pipe",
source=pipe_source,
target=SqsTarget(target_queue)
)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/aws/aws-cdk",
"name": "aws-cdk.aws-pipes-sources-alpha",
"maintainer": null,
"docs_url": null,
"requires_python": "~=3.8",
"maintainer_email": null,
"keywords": null,
"author": "Amazon Web Services",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/7d/2d/bfcf738ffd126004e5735ea73dd103bc667e8e584a16ffc10224f667fd62/aws_cdk_aws_pipes_sources_alpha-2.170.0a0.tar.gz",
"platform": null,
"description": "# Amazon EventBridge Pipes Sources Construct Library\n\n<!--BEGIN STABILITY BANNER-->---\n\n\n![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge)\n\n> The APIs of higher level constructs in this module are experimental and under active development.\n> They are subject to non-backward compatible changes or removal in any future version. These are\n> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be\n> announced in the release notes. This means that while you may use them, you may need to update\n> your source code when upgrading to a newer version of this package.\n\n---\n<!--END STABILITY BANNER-->\n\nEventBridge Pipes Sources let you create a source for a EventBridge Pipe.\n\nFor more details see the service documentation:\n\n[Documentation](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-source.html)\n\n## Pipe sources\n\nPipe sources are the starting point of a EventBridge Pipe. They are the source of the events that are sent to the pipe.\n\n### Amazon SQS\n\nA SQS message queue can be used as a source for a pipe. The queue will be polled for new messages and the messages will be sent to the pipe.\n\n```python\n# source_queue: sqs.Queue\n# target_queue: sqs.Queue\n\n\npipe_source = sources.SqsSource(source_queue)\n\npipe = pipes.Pipe(self, \"Pipe\",\n source=pipe_source,\n target=SqsTarget(target_queue)\n)\n```\n\nThe polling configuration can be customized:\n\n```python\n# source_queue: sqs.Queue\n# target_queue: sqs.Queue\n\n\npipe_source = sources.SqsSource(source_queue,\n batch_size=10,\n maximum_batching_window=cdk.Duration.seconds(10)\n)\n\npipe = pipes.Pipe(self, \"Pipe\",\n source=pipe_source,\n target=SqsTarget(target_queue)\n)\n```\n\n### Amazon Kinesis\n\nA Kinesis stream can be used as a source for a pipe. The stream will be polled for new messages and the messages will be sent to the pipe.\n\n```python\n# source_stream: kinesis.Stream\n# target_queue: sqs.Queue\n\n\npipe_source = sources.KinesisSource(source_stream,\n starting_position=sources.KinesisStartingPosition.LATEST\n)\n\npipe = pipes.Pipe(self, \"Pipe\",\n source=pipe_source,\n target=SqsTarget(target_queue)\n)\n```\n\n### Amazon DynamoDB\n\nA DynamoDB stream can be used as a source for a pipe. The stream will be polled for new messages and the messages will be sent to the pipe.\n\n```python\n# target_queue: sqs.Queue\ntable = ddb.TableV2(self, \"MyTable\",\n partition_key=ddb.Attribute(\n name=\"id\",\n type=ddb.AttributeType.STRING\n ),\n dynamo_stream=ddb.StreamViewType.NEW_IMAGE\n)\n\npipe_source = sources.DynamoDBSource(table,\n starting_position=sources.DynamoDBStartingPosition.LATEST\n)\n\npipe = pipes.Pipe(self, \"Pipe\",\n source=pipe_source,\n target=SqsTarget(target_queue)\n)\n```\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "The CDK Construct Library for Amazon EventBridge Pipes Sources",
"version": "2.170.0a0",
"project_urls": {
"Homepage": "https://github.com/aws/aws-cdk",
"Source": "https://github.com/aws/aws-cdk.git"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f79f6b38d38df915bc606907dd197a086bca2eb258fdfe831197d16678c474f5",
"md5": "f0b51e9ab0b18f40240cf0e9982a5e71",
"sha256": "12d79c261222342b345ee5f01dfe41f3c2f107e4338a40e1094aa0a904a0db36"
},
"downloads": -1,
"filename": "aws_cdk.aws_pipes_sources_alpha-2.170.0a0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f0b51e9ab0b18f40240cf0e9982a5e71",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "~=3.8",
"size": 55791,
"upload_time": "2024-11-22T04:41:53",
"upload_time_iso_8601": "2024-11-22T04:41:53.633417Z",
"url": "https://files.pythonhosted.org/packages/f7/9f/6b38d38df915bc606907dd197a086bca2eb258fdfe831197d16678c474f5/aws_cdk.aws_pipes_sources_alpha-2.170.0a0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7d2dbfcf738ffd126004e5735ea73dd103bc667e8e584a16ffc10224f667fd62",
"md5": "7a9ef170460cd384dbb89b6d79d3ce05",
"sha256": "d760e3afa72f73f2ac73043da80e577502e28066ffed39b31721e37dff975d38"
},
"downloads": -1,
"filename": "aws_cdk_aws_pipes_sources_alpha-2.170.0a0.tar.gz",
"has_sig": false,
"md5_digest": "7a9ef170460cd384dbb89b6d79d3ce05",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "~=3.8",
"size": 57121,
"upload_time": "2024-11-22T04:42:37",
"upload_time_iso_8601": "2024-11-22T04:42:37.098193Z",
"url": "https://files.pythonhosted.org/packages/7d/2d/bfcf738ffd126004e5735ea73dd103bc667e8e584a16ffc10224f667fd62/aws_cdk_aws_pipes_sources_alpha-2.170.0a0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-22 04:42:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "aws",
"github_project": "aws-cdk",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "aws-cdk.aws-pipes-sources-alpha"
}