Skip to content

Commit 6c01a4d

Browse files
authored
Merge pull request #9441 from marcinczeczko/aws-sns-guide-fix
SNS Guide - Missing SNS topic creation
2 parents 6e8362d + 958b630 commit 6c01a4d

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

docs/src/main/asciidoc/amazon-sns.adoc

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,21 @@ Default region name [None]: us-east-1
5757
Default output format [None]:
5858
----
5959

60+
=== Create a SNS topic
61+
62+
Create a SNS topic using AWS CLI and store in `TOPIC_ARN` environment variable
63+
64+
[source,shell,subs="verbatim,attributes"]
65+
----
66+
TOPIC_ARN=`aws sns create-topic --name=QuarksCollider --profile localstack --endpoint-url=http://localhost:8009`
67+
----
68+
69+
If you want to run the demo using SNS on your AWS account, you can create a topic using AWS default profile
70+
[source,shell,subs="verbatim,attributes"]
71+
----
72+
TOPIC_ARN=`aws sns create-topic --name=QuarksCollider`
73+
----
74+
6075
== Solution
6176
The application built here allows to shoot elementary particles (quarks) into a `QuarksCollider` topic of the AWS SNS.
6277
Additionally, we create a resource that allows to subscribe to the `QuarksCollider` topic in order to receive published quarks.
@@ -634,7 +649,7 @@ quarkus.sns.aws.credentials.type=default
634649
=== Packaging
635650

636651
Packaging your application is as simple as `./mvnw clean package`.
637-
It can be run with `java -jar target/amazon-sns-quickstart-1.0-SNAPSHOT-runner.jar`.
652+
It can be run with `java -Dtopic.arn=$TOPIC_ARN -jar target/amazon-sns-quickstart-1.0-SNAPSHOT-runner.jar`.
638653

639654
With GraalVM installed, you can also create a native executable binary: `./mvnw clean package -Dnative`.
640655
Depending on your system, that will take some time.

0 commit comments

Comments
 (0)