AWS machine-learning high security documentation change
Summary
Revised S3 bucket policy example with correct JSON syntax and explicit source validation conditions
Security assessment
Added granular condition keys (aws:SourceAccount/Arn) to prevent unauthorized write access. This mitigates risks of data exfiltration or tampering by enforcing least-privilege access.
Diff
diff --git a/machine-learning/latest/dg/granting-amazon-ml-permissions-to-output-predictions-to-amazon-s3.md b/machine-learning/latest/dg/granting-amazon-ml-permissions-to-output-predictions-to-amazon-s3.md index c1eb2ea20..c8478ed4c 100644 --- a//machine-learning/latest/dg/granting-amazon-ml-permissions-to-output-predictions-to-amazon-s3.md +++ b//machine-learning/latest/dg/granting-amazon-ml-permissions-to-output-predictions-to-amazon-s3.md @@ -27,0 +28,6 @@ The following example policy shows how to grant permission for Amazon ML to writ +JSON + + +**** + + @@ -30 +36 @@ The following example policy shows how to grant permission for Amazon ML to writ - "Version": "2008-10-17", + "Version":"2012-10-17", @@ -34 +40,3 @@ The following example policy shows how to grant permission for Amazon ML to writ - "Principal": { "Service": "machinelearning.amazonaws.com"}, + "Principal": { + "Service": "machinelearning.amazonaws.com" + }, @@ -39 +47 @@ The following example policy shows how to grant permission for Amazon ML to writ - "Resource": "arn:aws:s3:::examplebucket/exampleprefix/*" + "Resource": "arn:aws:s3:::examplebucket/exampleprefix/*", @@ -41,2 +49,6 @@ The following example policy shows how to grant permission for Amazon ML to writ - "StringEquals": { "aws:SourceAccount": "123456789012" } - "ArnLike": { "aws:SourceArn": "arn:aws:machinelearning:us-east-1:123456789012:*" } + "StringEquals": { + "aws:SourceAccount": "123456789012" + }, + "ArnLike": { + "aws:SourceArn": "arn:aws:machinelearning:us-east-1:123456789012:*" + } @@ -47 +59,3 @@ The following example policy shows how to grant permission for Amazon ML to writ - "Principal": { "Service": "machinelearning.amazonaws.com"}, + "Principal": { + "Service": "machinelearning.amazonaws.com" + }, @@ -51,3 +65,6 @@ The following example policy shows how to grant permission for Amazon ML to writ - "StringEquals": { "s3:x-amz-acl":"bucket-owner-full-control" } - "StringEquals": { "aws:SourceAccount": "123456789012" } - "ArnLike": { "aws:SourceArn": "arn:aws:machinelearning:us-east-1:123456789012:*" } + "StringEquals": { + "aws:SourceAccount": "123456789012" + }, + "ArnLike": { + "aws:SourceArn": "arn:aws:machinelearning:us-east-1:123456789012:*" + } @@ -58 +75,3 @@ The following example policy shows how to grant permission for Amazon ML to writ - "Principal": {"Service": "machinelearning.amazonaws.com"}, + "Principal": { + "Service": "machinelearning.amazonaws.com" + }, @@ -62,3 +81,9 @@ The following example policy shows how to grant permission for Amazon ML to writ - "StringLike": { "s3:prefix": "exampleprefix/*" } - "StringEquals": { "aws:SourceAccount": "123456789012" } - "ArnLike": { "aws:SourceArn": "arn:aws:machinelearning:us-east-1:123456789012:*" } + "StringLike": { + "s3:prefix": "exampleprefix/*" + }, + "StringEquals": { + "aws:SourceAccount": "123456789012" + }, + "ArnLike": { + "aws:SourceArn": "arn:aws:machinelearning:us-east-1:123456789012:*" + } @@ -66 +90,0 @@ The following example policy shows how to grant permission for Amazon ML to writ - }] @@ -67,0 +92,3 @@ The following example policy shows how to grant permission for Amazon ML to writ + ] + } +