Skip to content

Commit a956961

Browse files
committed
Add post-ingest SNS topic provisioning to serverless.example.yml
1 parent 859d280 commit a956961

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

serverless.example.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ functions:
7272
handler: index.handler
7373
memorySize: 512
7474
timeout: 60
75+
environment:
76+
POST_INGEST_TOPIC_ARN: !Ref postIngestTopic
7577
package:
7678
artifact: dist/ingest/ingest.zip
7779
events:
@@ -101,6 +103,14 @@ resources:
101103
Type: "AWS::SNS::Topic"
102104
Properties:
103105
TopicName: ${self:service}-${self:provider.stage}-ingest
106+
postIngestTopic:
107+
# After a collection or item is ingested, the status of the ingest (success
108+
# or failure) along with details of the collection or item are sent to this
109+
# SNS topic. To take future action on items after they are ingested
110+
# suscribe an endpoint to this topic
111+
Type: AWS::SNS::Topic
112+
Properties:
113+
TopicName: ${self:service}-${self:provider.stage}-post-ingest
104114
deadLetterQueue:
105115
Type: AWS::SQS::Queue
106116
Properties:

0 commit comments

Comments
 (0)