Skip to content

Commit 56ec3cc

Browse files
committed
📖 Adding SNS IntegrationSink example
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
1 parent 010c514 commit 56ec3cc

File tree

4 files changed

+38
-0
lines changed

4 files changed

+38
-0
lines changed

config/nav.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ nav:
253253
- IntegrationSink:
254254
- About IntegrationSink: eventing/sinks/integration-sink/README.md
255255
- AWS S3 Sink: eventing/sinks/integration-sink/aws_s3.md
256+
- AWS SNS Sink: eventing/sinks/integration-sink/aws_sns.md
256257
- AWS SQS Sink: eventing/sinks/integration-sink/aws_sqs.md
257258
- Generic Logger Sink: eventing/sinks/integration-sink/logger.md
258259
- Flows:

docs/eventing/sinks/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ The `svc` in `http://event-display.svc.cluster.local` determines that the sink i
133133
| Name | Maintainer | Description |
134134
|----------------------------------------------------------------------------------| -- |--------------------------------------|
135135
| [Amazon S3 Sink](./integration-sink/aws_s3.md) | Knative | Send events to AWS S3 bucket |
136+
| [Amazon SNS Sink](./integration-sink/aws_sns.md) | Knative | Send events to AWS SNS topic |
136137
| [Amazon SQS Sink](./integration-sink/aws_sqs.md) | Knative | Send events to AWS SQS queue |
137138
| [JobSink](job-sink.md) | Knative | Trigger long-running background jobs |
138139
| [KafkaSink](kafka-sink.md) | Knative | Send events to a Kafka topic |

docs/eventing/sinks/integration-sink/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ The `IntegrationSink` is a Knative Eventing custom resource supporting selected
88
## Supported Kamelet sinks
99

1010
* [AWS S3](./aws_s3.md)
11+
* [AWS SNS](./aws_sns.md)
1112
* [AWS SQS](./aws_sqs.md)
1213
* [Generic logger](./logger.md)
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# AWS Simple Notification Service Sink
2+
3+
The `IntegrationSink` supports the Amazon Web Services (AWS) Simple Notification Service (SNS) service, through its `aws.sns` property.
4+
5+
## Amazon credentials
6+
7+
For connecting to AWS the `IntegrationSink` uses Kubernetes `Secret`, present in the namespace of the reSink. The `Secret` can be created like:
8+
9+
```bash
10+
kubectl -n <namespace> create secret generic my-secret --from-literal=aws.accessKey=<accessKey> --from-literal=aws.secretKey=<secretKey>
11+
```
12+
13+
## AWS SQS Sink Example
14+
15+
Below is an `IntegrationSink` to send data to AWS SNS:
16+
17+
```yaml
18+
apiVersion: sinks.knative.dev/v1alpha1
19+
kind: IntegrationSink
20+
metadata:
21+
name: integration-sink-aws-sns
22+
namespace: knative-samples
23+
spec:
24+
aws:
25+
sns:
26+
arn: "my-topic"
27+
region: "eu-north-1"
28+
auth:
29+
secret:
30+
ref:
31+
name: "my-secret"
32+
```
33+
Inside of the `aws.sns` object we define the name of the topic (or _arn_) and its region. The credentials for the AWS service are referenced from the `my-secret` Kubernetes `Secret`
34+
35+
More details about the Apache Camel Kamelet [aws-sns-sink](https://camel.apache.org/camel-kamelets/latest/aws-sns-sink.html).

0 commit comments

Comments
 (0)