-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
94 additions
and
265 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
63 changes: 63 additions & 0 deletions
63
content/en/docs/s3/Chapter4-PerformanceEfficiency/SNS-EventBridge/SNS.md
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,63 @@ | ||
--- | ||
title: "SNS Topic Notifications" | ||
date: 2022-01-01 | ||
weight: 1 | ||
description: > | ||
SNS Triggers. | ||
--- | ||
<span class=opex-off>OpEx</span> | ||
<span class=sec-off>Sec</span> | ||
<span class=rel-sec>Rel</span> | ||
<span class=perf-on>Perf</span> | ||
<span class=cost-off>Cost</span> | ||
<span class=sus-off>Sus</span> | ||
|
||
|
||
## Configuring event notifications via the console | ||
|
||
### Publish event messages to an SNS Topic | ||
|
||
- Head to the SNS console and create a new topic, Just set the name and leave everything else as standard. | ||
- Make a note of the ARN you'll need this in a second | ||
- Now edit the SNS topic and edit the Acess Policy. We are going to narrow the policy down to SNS:Publish from your bucket only. Make sure your replace <SNS-ARN>, <BUCKET-NAME> and <ACCOUNT-ID> with your details: | ||
|
||
``` | ||
{ | ||
"Version": "2012-10-17", | ||
"Id": "example-ID", | ||
"Statement": [ | ||
{ | ||
"Sid": "Example SNS topic policy", | ||
"Effect": "Allow", | ||
"Principal": { | ||
"Service": "s3.amazonaws.com" | ||
}, | ||
"Action": [ | ||
"SNS:Publish" | ||
], | ||
"Resource": "<SNS-ARN>", | ||
"Condition": { | ||
"ArnLike": { | ||
"aws:SourceArn": "arn:aws:s3:*:*:<BUCKET-NAME>" | ||
}, | ||
"StringEquals": { | ||
"aws:SourceAccount": "<ACCOUNT-ID>" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
``` | ||
|
||
- Save your settings | ||
- Now back on the S3 console select your bucket and click edit | ||
- Click on the __Properties__ tab and scroll down to __Notifications__ | ||
|
||
![Enable Notifications](./sns-s3-1.png) | ||
|
||
- Create a new notification and follow the settings in the following screen shot and be sure to select the correct SNS Topic! | ||
|
||
![Add The configuration](./sns-s3-2.png) | ||
|
||
|
||
|
23 changes: 23 additions & 0 deletions
23
content/en/docs/s3/Chapter4-PerformanceEfficiency/SNS-EventBridge/_index.md
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,23 @@ | ||
--- | ||
title: "SNS and EventBridge" | ||
date: 2022-01-01 | ||
weight: 1 | ||
description: > | ||
SNS and EventBridge Triggers. | ||
--- | ||
<span class=opex-off>OpEx</span> | ||
<span class=sec-off>Sec</span> | ||
<span class=rel-sec>Rel</span> | ||
<span class=perf-on>Perf</span> | ||
<span class=cost-off>Cost</span> | ||
<span class=sus-off>Sus</span> | ||
|
||
Enabling notifications is a bucket-level operation. You store notification configuration information in the notification subresource that's associated with a bucket. After you create or change the bucket notification configuration, it usually takes about five minutes for the changes to take effect. When the notification is first enabled, an s3:TestEvent occurs. Amazon S3 stores the notification configuration as XML in the notification subresource that's associated with a bucket. | ||
|
||
### Technical Considerations | ||
|
||
Using SNS or eventbridge can give you great flexibility to have actions performed when a file is upload/deleted/updated in S3. During this guide you'll also see you can additionally use SQS or trigger Lambda directly and you may wonder why not use these approaches instead, and you'd be right, It's more efficient to go direct to Lambda, however, SNS can deliver to multiple subscribers (lambda, email, etc) So it gives you a few more options. Eventbridge is also an enhancement over direct to Lambda as it allows you to filter which messages will actually triger Lambda running and potentially save you 1000's of unneeded invocations. | ||
|
||
### Business Considerations | ||
|
||
Using cheaper storage such as S3 has a real potential to lower your bill, but you'll probably want to do something with that data. This chapter shows that S3 can be a power hub allowing your data to be automatically processed on update or other operations. This way of working can help your business transform to a micro-services style of working, which will help you gain speed in rolling out new features and updates without affecting the entire business, thus you can innovate faster. |
Binary file added
BIN
+48 KB
.../en/docs/s3/Chapter4-PerformanceEfficiency/SNS-EventBridge/eventbridge-s3-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+66.9 KB
content/en/docs/s3/Chapter4-PerformanceEfficiency/SNS-EventBridge/sns-s3-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+369 KB
content/en/docs/s3/Chapter4-PerformanceEfficiency/SNS-EventBridge/sns-s3-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
174 changes: 0 additions & 174 deletions
174
content/en/docs/s3/Chapter4-PerformanceEfficiency/SNS-SQSandEventBridge/SNS-SQS.md
This file was deleted.
Oops, something went wrong.
74 changes: 0 additions & 74 deletions
74
content/en/docs/s3/Chapter4-PerformanceEfficiency/SNS-SQSandEventBridge/_index.md
This file was deleted.
Oops, something went wrong.
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