Use case
In a case you want to restrict the access of DDOE to specific folder within your S3 bucket, you can easily do that.
You can grant DDOE access to only the specific folder you want DDOE to work with, without worrying about accidental modifications or deletions in other parts of your S3 bucket.
In this article, we'll walk you through the steps to limits DDOE's access to a specific folder in your S3 bucket.
Restrict via AWS IAM policy & DDOE Storage Driver
You'll need to create a specific IAM policy and specific Storage driver, so when creating an integration follow this article IAM policy and storage driver creation
Create any type of integration
For example - AWS Cross Account integration.
Create an IAM policy
Log in to the AWS Management Console.
Go to Services and click All services. A list of services is displayed.
Select the IAM service from the list.
Click on Policies from the left navigation panel.
Click Create policy. The Create Policy page is displayed.
Select the JSON tab.
Define the policy document in JSON format as follows:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowBucketListAccessWithPrefix",
"Effect": "Allow",
"Action": [
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::<DataLoopBucketName>"
],
"Condition": {
"StringEquals": {
"s3:prefix": "<DataLoopFolderName>/"
}
}
},
{
"Sid": "AllowBucketGetPutDelete",
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:DeleteObject"
],
"Resource": [
"arn:aws:s3:::<DataLoopBucketName>/<DataLoopFolderName>/*"
]
}
]
}
Click Next to Review the policy.
Provide a meaningful name for the policy and an optional description.
Click the Create policy to finish.
Note:
a. s3:DeleteObject action allows DDOE platform to delete dataset items - please see downstream
a. Replace <DataLoopBucketName> with the name of the desired S3 bucket.
c. Replace <DataLoopFolderName> with the name of the desired folder you would like to restrict the access to.
Read step-by-step guide on creating an IAM policy in AWS.
Read step-by-step guide on condition key examples in AWS.