Skip to content

Commit

Permalink
Updated READMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
mzazon committed Oct 27, 2021
1 parent 909b2d4 commit 6c1c018
Show file tree
Hide file tree
Showing 14 changed files with 190 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@
]
}
]
}
<<<<<<< HEAD
}
=======
}
>>>>>>> d0119e3 (Updated READMEs)
14 changes: 13 additions & 1 deletion 302-Using-S3-Intelligent-Tiering/tiering.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
<<<<<<< HEAD
"IntelligentTieringConfiguration": {
"Id": "awscookbook302",
"Status": "Enabled",
Expand All @@ -9,4 +10,15 @@
}
]
}
}
}
=======
"Id": "awscookbook302",
"Status": "Enabled",
"Tierings": [
{
"Days": 90,
"AccessTier": "ARCHIVE_ACCESS"
}
]
}
>>>>>>> d0119e3 (Updated READMEs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
s3-perms-policy.json
s3-replication.json
.venv
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
<<<<<<< HEAD
"Version":"2012-10-17",
"Statement":[
{
Expand Down Expand Up @@ -34,4 +35,40 @@
}
]
}


=======
"Version":"2012-10-17",
"Statement":[
{
"Effect":"Allow",
"Action":[
"s3:GetObjectVersionForReplication",
"s3:GetObjectVersionAcl",
"s3:GetObjectVersionTagging"
],
"Resource":[
"arn:aws:s3:::SRCBUCKET/*"
]
},
{
"Effect":"Allow",
"Action":[
"s3:ListBucket",
"s3:GetReplicationConfiguration"
],
"Resource":[
"arn:aws:s3:::SRCBUCKET"
]
},
{
"Effect":"Allow",
"Action":[
"s3:ReplicateObject",
"s3:ReplicateDelete",
"s3:ReplicateTags"
],
"Resource":"arn:aws:s3:::DSTBUCKET/*"
}
]
}
>>>>>>> d0119e3 (Updated READMEs)
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
<<<<<<< HEAD
"Version":"2012-10-17",
"Statement":[
{
Expand Down Expand Up @@ -34,4 +35,40 @@
}
]
}


=======
"Version":"2012-10-17",
"Statement":[
{
"Effect":"Allow",
"Action":[
"s3:GetObjectVersionForReplication",
"s3:GetObjectVersionAcl",
"s3:GetObjectVersionTagging"
],
"Resource":[
"arn:aws:s3:::awscookbook303-src-b0jeyb/*"
]
},
{
"Effect":"Allow",
"Action":[
"s3:ListBucket",
"s3:GetReplicationConfiguration"
],
"Resource":[
"arn:aws:s3:::awscookbook303-src-b0jeyb"
]
},
{
"Effect":"Allow",
"Action":[
"s3:ReplicateObject",
"s3:ReplicateDelete",
"s3:ReplicateTags"
],
"Resource":"arn:aws:s3:::awscookbook303-dst-b0jeyb/*"
}
]
}
>>>>>>> d0119e3 (Updated READMEs)
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
<<<<<<< HEAD
"Rules": [
{
"Status": "Enabled",
Expand All @@ -25,4 +26,35 @@
}
],
"Role": "ROLEARN"
}
}
=======
"Rules": [
{
"Status": "Enabled",
"Filter": {
"Prefix": ""
},
"Destination": {
"Bucket": "arn:aws:s3:::DSTBUCKET",
"Metrics": {
"Status": "Enabled",
"EventThreshold": {
"Minutes": 15
}
},
"ReplicationTime": {
"Status": "Enabled",
"Time": {
"Minutes": 15
}
}
},
"DeleteMarkerReplication": {
"Status": "Disabled"
},
"Priority": 1
}
],
"Role": "ROLEARN"
}
>>>>>>> d0119e3 (Updated READMEs)
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
<<<<<<< HEAD
"Rules": [
{
"Status": "Enabled",
Expand All @@ -25,4 +26,35 @@
}
],
"Role": "arn:aws:iam::611652777867:role/AWSCookbook303S3Role"
}
}
=======
"Rules": [
{
"Status": "Enabled",
"Filter": {
"Prefix": ""
},
"Destination": {
"Bucket": "arn:aws:s3:::awscookbook303-dst-b0jeyb",
"Metrics": {
"Status": "Enabled",
"EventThreshold": {
"Minutes": 15
}
},
"ReplicationTime": {
"Status": "Enabled",
"Time": {
"Minutes": 15
}
}
},
"DeleteMarkerReplication": {
"Status": "Disabled"
},
"Priority": 1
}
],
"Role": "arn:aws:iam::664865145641:role/AWSCookbook303S3Role"
}
>>>>>>> d0119e3 (Updated READMEs)
4 changes: 3 additions & 1 deletion 305-Configuring-Application-Specific-Access-to-S3/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Recipe304Test.txt
Recipe304Test.txt
app-1-policy.json
app-2-policy.json

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:

iam_role1 = iam.Role(self, "Instance1SSM", assumed_by=iam.ServicePrincipal("ec2.amazonaws.com"))

iam_role1.add_managed_policy(iam.ManagedPolicy.from_aws_managed_policy_name("service-role/AmazonEC2RoleforSSM"))
iam_role1.add_managed_policy(iam.ManagedPolicy.from_aws_managed_policy_name("AmazonSSMManagedInstanceCore"))

instance1 = ec2.Instance(
self,
Expand All @@ -104,7 +104,11 @@ def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:

iam_role2 = iam.Role(self, "Instance2SSM", assumed_by=iam.ServicePrincipal("ec2.amazonaws.com"))

<<<<<<< HEAD
iam_role2.add_managed_policy(iam.ManagedPolicy.from_aws_managed_policy_name("service-role/AmazonEC2RoleforSSM"))
=======
iam_role2.add_managed_policy(iam.ManagedPolicy.from_aws_managed_policy_name("AmazonSSMManagedInstanceCore"))
>>>>>>> d0119e3 (Updated READMEs)

instance2 = ec2.Instance(
self,
Expand Down
1 change: 1 addition & 0 deletions 306-Using-Amazon-S3-Bucket-Keys-with-KMS/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bucket-policy.json
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"Version":"2012-10-17",
"Id":"PutObjectPolicy",
"Statement":[{
"Sid":"DenyUnEncryptedObjectUploads",
"Effect":"Deny",
"Principal":"*",
"Action":"s3:PutObject",
"Resource":"arn:aws:s3:::BUCKET_NAME/*",
"Condition":{
"StringNotEquals":{
"s3:x-amz-server-side-encryption":"aws:kms"
}
}
}
]
}

0 comments on commit 6c1c018

Please sign in to comment.