You've already forked EjemplosPoliticasAWS
Politicas RDS S3 Lambda
This commit is contained in:
44
S3/accesoBucketEnProduccionSoloConMFA.json
Normal file
44
S3/accesoBucketEnProduccionSoloConMFA.json
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Sid": "ListAllS3Buckets",
|
||||
"Effect": "Allow",
|
||||
"Action": ["s3:ListAllMyBuckets"],
|
||||
"Resource": "arn:aws:s3:::*"
|
||||
},
|
||||
{
|
||||
"Sid": "AllowBucketLevelActions",
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"s3:ListBucket",
|
||||
"s3:GetBucketLocation"
|
||||
],
|
||||
"Resource": "arn:aws:s3:::*"
|
||||
},
|
||||
{
|
||||
"Sid": "AllowBucketObjectActions",
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"s3:PutObject",
|
||||
"s3:PutObjectAcl",
|
||||
"s3:GetObject",
|
||||
"s3:GetObjectAcl",
|
||||
"s3:DeleteObject"
|
||||
],
|
||||
"Resource": "arn:aws:s3:::*/*"
|
||||
},
|
||||
{
|
||||
"Sid": "RequireMFAForProductionBucket",
|
||||
"Effect": "Deny",
|
||||
"Action": "s3:*",
|
||||
"Resource": [
|
||||
"arn:aws:s3:::Production/*",
|
||||
"arn:aws:s3:::Production"
|
||||
],
|
||||
"Condition": {
|
||||
"NumericGreaterThanIfExists": {"aws:MultiFactorAuthAge": "1800"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
17
S3/permiteAccesoLecturaEscrituraObjetos.json
Normal file
17
S3/permiteAccesoLecturaEscrituraObjetos.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Sid": "ListObjectsInBucket",
|
||||
"Effect": "Allow",
|
||||
"Action": ["s3:ListBucket"],
|
||||
"Resource": ["arn:aws:s3:::bucket-name"]
|
||||
},
|
||||
{
|
||||
"Sid": "AllObjectActions",
|
||||
"Effect": "Allow",
|
||||
"Action": "s3:*Object",
|
||||
"Resource": ["arn:aws:s3:::bucket-name/*"]
|
||||
}
|
||||
]
|
||||
}
|
||||
30
S3/permiteAccesoLecturaEscrituraObjetosConsola.json
Normal file
30
S3/permiteAccesoLecturaEscrituraObjetosConsola.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Sid": "ConsoleAccess",
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"s3:GetAccountPublicAccessBlock",
|
||||
"s3:GetBucketAcl",
|
||||
"s3:GetBucketLocation",
|
||||
"s3:GetBucketPolicyStatus",
|
||||
"s3:GetBucketPublicAccessBlock",
|
||||
"s3:ListAllMyBuckets"
|
||||
],
|
||||
"Resource": "*"
|
||||
},
|
||||
{
|
||||
"Sid": "ListObjectsInBucket",
|
||||
"Effect": "Allow",
|
||||
"Action": "s3:ListBucket",
|
||||
"Resource": ["arn:aws:s3:::bucket-name"]
|
||||
},
|
||||
{
|
||||
"Sid": "AllObjectActions",
|
||||
"Effect": "Allow",
|
||||
"Action": "s3:*Object",
|
||||
"Resource": ["arn:aws:s3:::bucket-name/*"]
|
||||
}
|
||||
]
|
||||
}
|
||||
32
S3/permiteUsuariosCognitoAccesoObjetosSuBucket.json
Normal file
32
S3/permiteUsuariosCognitoAccesoObjetosSuBucket.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Sid": "ListYourObjects",
|
||||
"Effect": "Allow",
|
||||
"Action": "s3:ListBucket",
|
||||
"Resource": [
|
||||
"arn:aws:s3:::bucket-name"
|
||||
],
|
||||
"Condition": {
|
||||
"StringLike": {
|
||||
"s3:prefix": [
|
||||
"cognito/application-name/${cognito-identity.amazonaws.com:sub}/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"Sid": "ReadWriteDeleteYourObjects",
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"s3:DeleteObject",
|
||||
"s3:GetObject",
|
||||
"s3:PutObject"
|
||||
],
|
||||
"Resource": [
|
||||
"arn:aws:s3:::bucket-name/cognito/application-name/${cognito-identity.amazonaws.com:sub}/*"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
35
S3/permiteUsuariosFederadosAccesoDirectorioPrincipal.json
Normal file
35
S3/permiteUsuariosFederadosAccesoDirectorioPrincipal.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"s3:ListAllMyBuckets",
|
||||
"s3:GetBucketLocation"
|
||||
],
|
||||
"Resource": "*"
|
||||
},
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": "s3:ListBucket",
|
||||
"Resource": "arn:aws:s3:::bucket-name",
|
||||
"Condition": {
|
||||
"StringLike": {
|
||||
"s3:prefix": [
|
||||
"",
|
||||
"home/",
|
||||
"home/${aws:userid}/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": "s3:*",
|
||||
"Resource": [
|
||||
"arn:aws:s3:::bucket-name/home/${aws:userid}",
|
||||
"arn:aws:s3:::bucket-name/home/${aws:userid}/*"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
35
S3/permiteUsuariosIAMAccesoDirectorioPrincipal.json
Normal file
35
S3/permiteUsuariosIAMAccesoDirectorioPrincipal.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"s3:ListAllMyBuckets",
|
||||
"s3:GetBucketLocation"
|
||||
],
|
||||
"Resource": "*"
|
||||
},
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": "s3:ListBucket",
|
||||
"Resource": "arn:aws:s3:::bucket-name",
|
||||
"Condition": {
|
||||
"StringLike": {
|
||||
"s3:prefix": [
|
||||
"",
|
||||
"home/",
|
||||
"home/${aws:username}/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": "s3:*",
|
||||
"Resource": [
|
||||
"arn:aws:s3:::bucket-name/home/${aws:username}",
|
||||
"arn:aws:s3:::bucket-name/home/${aws:username}/*"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
21
S3/restringirAdminBucketConcreto.json
Normal file
21
S3/restringirAdminBucketConcreto.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": "s3:*",
|
||||
"Resource": [
|
||||
"arn:aws:s3:::bucket-name",
|
||||
"arn:aws:s3:::bucket-name/*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Effect": "Deny",
|
||||
"NotAction": "s3:*",
|
||||
"NotResource": [
|
||||
"arn:aws:s3:::bucket-name",
|
||||
"arn:aws:s3:::bucket-name/*"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user