You are on page 1of 11

Create a bucket for logging

1. Enter the name of the Bucket and create it in N.Virginia with default configurations
and hit Create.

2.Enable Versioning by going under bucket properties and Enable versioning and hit
Save.
Create a Primary bucket for hosting static website
1. Enter the name of the Bucket and create it in N.Virginia with default configurations
and hit Create.

2. Enable Versioning by going under bucket properties and Enable versioning and hit
Save.

3. Enable Server access logging by going under bucket properties and Enable
access logging, select the destination bucket to store the logs and hit Save.
4. Enable Static website hosting by going under bucket properties and enable static
web hosting and mention the name of the index document as “index.html” and hit
Save.

5. To grant public access, go under bucket permissions and update the policy as
mentioned below to allow traffic from everywhere (*) to have access to the buckets ARN
followed by “/*” to grant access to object level as mentioned in the screenshot below.
Once updated hit Save.
Setup Replica Bucket
Create a Replica Bucket which will be used for Cross region replication and it will
be used as a reference for sending notifications via email every time a new
object is pushed.

1. Enter the name of the Bucket and create it in Oregon with default configurations and
hit Create.

2. Enable Versioning by going under bucket properties and Enable versioning and hit
Save.

3. Enable Static website hosting by going under bucket properties and enable static
web hosting and mention the name of the index document as “index.html” and hit
Save.

4. To grant public access, go under bucket permissions and update the policy as
mentioned below to allow traffic from everywhere (*) to have access to the buckets ARN
followed by “/*” to grant access to object level as mentioned in the screenshot below.
Once updated hit Save.
Setup Cross Region Replication
1. Navigate to the primary bucket, under management tab select Create replication
rule and enter the name of the rule

2. For source, select “Apply to all objects in the bucket” and for Destination select the
replication bucket from the dropdown. Also, select create a new role to have the
permissions in place. (In exam the rule was pre created to I had selected the role
from the dropdown)
3. Select, do not replicate existing objects as the bucket is empty at this point in time
and hit submit.
Setup Notifications
1. Create a SNS Topic by giving a name

2. Select “Email”as a protocol and enter the email to which we want to send mails every
time a new object is pushed to the bucket. Keep everything as default and hit Create
3.Create a new EventBridge Rule

2. Enter the name of the rule and select “default” event bus and hit next
3. Select S3 under AWS Services and Event Notifications under event types for
“specific events” for all Buckets. And hit Next

4. Select the target as SNS and from the dropdown select the SNS topic which we
created in step 2 and hit next, next and create.

5. For the replication bucket we need to enable notifications for EventBridge by going
under properties for the bucket and switching ON the setting as mentioned in the
screenshot below. Once done hit Save changes.

You might also like