-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
break down init hook into separate parts
- Loading branch information
1 parent
659a64b
commit 0b7bd25
Showing
5 changed files
with
49 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/sh | ||
|
||
awslocal sns create-topic --name ProductEventsTopic | ||
|
||
awslocal sqs create-queue --queue-name ProductEventsQueue | ||
|
||
awslocal sqs get-queue-attributes --queue-url http://localhost:4566/000000000000/ProductEventsQueue --attribute-names QueueArn | ||
|
||
awslocal sns subscribe \ | ||
--topic-arn arn:aws:sns:us-east-1:000000000000:ProductEventsTopic \ | ||
--protocol sqs \ | ||
--notification-endpoint arn:aws:sqs:us-east-1:000000000000:ProductEventsQueue | ||
|
||
awslocal lambda create-function \ | ||
--function-name process-product-events \ | ||
--runtime java17 \ | ||
--handler lambda.DynamoDBWriterLambda::handleRequest \ | ||
--memory-size 1024 \ | ||
--zip-file fileb://lambda-functions/target/product-lambda.jar \ | ||
--region us-east-1 \ | ||
--role arn:aws:iam::000000000000:role/productRole | ||
|
||
awslocal lambda create-event-source-mapping \ | ||
--function-name process-product-events \ | ||
--batch-size 10 \ | ||
--event-source-arn arn:aws:sqs:us-east-1:000000000000:ProductEventsQueue | ||
|
||
awslocal sqs set-queue-attributes \ | ||
--queue-url http://localhost:4566/000000000000/ProductEventsQueue \ | ||
--attributes VisibilityTimeout=10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters