AWS S3 bucket control policy for cross-account access
up vote
0
down vote
favorite
I have S3 bucket called "atest-bucket". Inside of this bucket I have directory named "data". I need to provide access to user from external account to this directory (this user will access my data in order to run AWS ElasticMapReduce job).
With the policy I created, user still getting 403, when trying access it:
Access Denied (Service: Amazon S3; Status Code: 403; Error Code:
AccessDenied;
Here is my policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AccessToDataFiles",
"Effect": "Allow",
"Principal": {
"AWS": [
"arn:aws:iam::11111111111:user/emr",
"arn:aws:iam::11111111111:role/EMR_EC2_DefaultRole"
]
},
"Action": "s3:List*",
"Resource": "arn:aws:s3:::atest-bucket/data"
},
{
"Sid": "Stmt1234456",
"Effect": "Allow",
"Principal": {
"AWS": [
"arn:aws:iam::11111111111:user/emr",
"arn:aws:iam::11111111111:role/EMR_EC2_DefaultRole"
]
},
"Action": [
"s3:Get*",
"s3:List*",
"s3:Put*"
],
"Resource": "arn:aws:s3:::atest-bucket/data/*"
}
]
}
Please help me investigate this issue.
amazon-web-services amazon-s3 amazon-iam amazon-emr
add a comment |
up vote
0
down vote
favorite
I have S3 bucket called "atest-bucket". Inside of this bucket I have directory named "data". I need to provide access to user from external account to this directory (this user will access my data in order to run AWS ElasticMapReduce job).
With the policy I created, user still getting 403, when trying access it:
Access Denied (Service: Amazon S3; Status Code: 403; Error Code:
AccessDenied;
Here is my policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AccessToDataFiles",
"Effect": "Allow",
"Principal": {
"AWS": [
"arn:aws:iam::11111111111:user/emr",
"arn:aws:iam::11111111111:role/EMR_EC2_DefaultRole"
]
},
"Action": "s3:List*",
"Resource": "arn:aws:s3:::atest-bucket/data"
},
{
"Sid": "Stmt1234456",
"Effect": "Allow",
"Principal": {
"AWS": [
"arn:aws:iam::11111111111:user/emr",
"arn:aws:iam::11111111111:role/EMR_EC2_DefaultRole"
]
},
"Action": [
"s3:Get*",
"s3:List*",
"s3:Put*"
],
"Resource": "arn:aws:s3:::atest-bucket/data/*"
}
]
}
Please help me investigate this issue.
amazon-web-services amazon-s3 amazon-iam amazon-emr
1
Refer this aws.amazon.com/premiumsupport/knowledge-center/…
– Shiv Rajawat
Nov 21 at 6:19
1
When you say "when trying access it", what specific command did you use? Also, what S3-related permissions does the user/role in the other account have? (They need permission to call S3 granted by their own account AND they need permission via the Bucket Policy.)
– John Rotenstein
Nov 21 at 9:45
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have S3 bucket called "atest-bucket". Inside of this bucket I have directory named "data". I need to provide access to user from external account to this directory (this user will access my data in order to run AWS ElasticMapReduce job).
With the policy I created, user still getting 403, when trying access it:
Access Denied (Service: Amazon S3; Status Code: 403; Error Code:
AccessDenied;
Here is my policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AccessToDataFiles",
"Effect": "Allow",
"Principal": {
"AWS": [
"arn:aws:iam::11111111111:user/emr",
"arn:aws:iam::11111111111:role/EMR_EC2_DefaultRole"
]
},
"Action": "s3:List*",
"Resource": "arn:aws:s3:::atest-bucket/data"
},
{
"Sid": "Stmt1234456",
"Effect": "Allow",
"Principal": {
"AWS": [
"arn:aws:iam::11111111111:user/emr",
"arn:aws:iam::11111111111:role/EMR_EC2_DefaultRole"
]
},
"Action": [
"s3:Get*",
"s3:List*",
"s3:Put*"
],
"Resource": "arn:aws:s3:::atest-bucket/data/*"
}
]
}
Please help me investigate this issue.
amazon-web-services amazon-s3 amazon-iam amazon-emr
I have S3 bucket called "atest-bucket". Inside of this bucket I have directory named "data". I need to provide access to user from external account to this directory (this user will access my data in order to run AWS ElasticMapReduce job).
With the policy I created, user still getting 403, when trying access it:
Access Denied (Service: Amazon S3; Status Code: 403; Error Code:
AccessDenied;
Here is my policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AccessToDataFiles",
"Effect": "Allow",
"Principal": {
"AWS": [
"arn:aws:iam::11111111111:user/emr",
"arn:aws:iam::11111111111:role/EMR_EC2_DefaultRole"
]
},
"Action": "s3:List*",
"Resource": "arn:aws:s3:::atest-bucket/data"
},
{
"Sid": "Stmt1234456",
"Effect": "Allow",
"Principal": {
"AWS": [
"arn:aws:iam::11111111111:user/emr",
"arn:aws:iam::11111111111:role/EMR_EC2_DefaultRole"
]
},
"Action": [
"s3:Get*",
"s3:List*",
"s3:Put*"
],
"Resource": "arn:aws:s3:::atest-bucket/data/*"
}
]
}
Please help me investigate this issue.
amazon-web-services amazon-s3 amazon-iam amazon-emr
amazon-web-services amazon-s3 amazon-iam amazon-emr
asked Nov 21 at 5:37
HelloWorld
3517
3517
1
Refer this aws.amazon.com/premiumsupport/knowledge-center/…
– Shiv Rajawat
Nov 21 at 6:19
1
When you say "when trying access it", what specific command did you use? Also, what S3-related permissions does the user/role in the other account have? (They need permission to call S3 granted by their own account AND they need permission via the Bucket Policy.)
– John Rotenstein
Nov 21 at 9:45
add a comment |
1
Refer this aws.amazon.com/premiumsupport/knowledge-center/…
– Shiv Rajawat
Nov 21 at 6:19
1
When you say "when trying access it", what specific command did you use? Also, what S3-related permissions does the user/role in the other account have? (They need permission to call S3 granted by their own account AND they need permission via the Bucket Policy.)
– John Rotenstein
Nov 21 at 9:45
1
1
Refer this aws.amazon.com/premiumsupport/knowledge-center/…
– Shiv Rajawat
Nov 21 at 6:19
Refer this aws.amazon.com/premiumsupport/knowledge-center/…
– Shiv Rajawat
Nov 21 at 6:19
1
1
When you say "when trying access it", what specific command did you use? Also, what S3-related permissions does the user/role in the other account have? (They need permission to call S3 granted by their own account AND they need permission via the Bucket Policy.)
– John Rotenstein
Nov 21 at 9:45
When you say "when trying access it", what specific command did you use? Also, what S3-related permissions does the user/role in the other account have? (They need permission to call S3 granted by their own account AND they need permission via the Bucket Policy.)
– John Rotenstein
Nov 21 at 9:45
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
I believe you granted permission for another account(111----------). In this account you need to delegate further permission to specific user that you are using.
You need to delegate permission to your user for accessing the bucket created by previous account.
Create inline policy for the user in account(111----------):
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Example",
"Effect": "Allow",
"Action": [
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::examplebucket"
]
}
]
}
Please refer the following url:
https://docs.aws.amazon.com/AmazonS3/latest/dev/example-walkthroughs-managing-access-example2.html
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
I believe you granted permission for another account(111----------). In this account you need to delegate further permission to specific user that you are using.
You need to delegate permission to your user for accessing the bucket created by previous account.
Create inline policy for the user in account(111----------):
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Example",
"Effect": "Allow",
"Action": [
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::examplebucket"
]
}
]
}
Please refer the following url:
https://docs.aws.amazon.com/AmazonS3/latest/dev/example-walkthroughs-managing-access-example2.html
add a comment |
up vote
1
down vote
accepted
I believe you granted permission for another account(111----------). In this account you need to delegate further permission to specific user that you are using.
You need to delegate permission to your user for accessing the bucket created by previous account.
Create inline policy for the user in account(111----------):
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Example",
"Effect": "Allow",
"Action": [
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::examplebucket"
]
}
]
}
Please refer the following url:
https://docs.aws.amazon.com/AmazonS3/latest/dev/example-walkthroughs-managing-access-example2.html
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
I believe you granted permission for another account(111----------). In this account you need to delegate further permission to specific user that you are using.
You need to delegate permission to your user for accessing the bucket created by previous account.
Create inline policy for the user in account(111----------):
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Example",
"Effect": "Allow",
"Action": [
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::examplebucket"
]
}
]
}
Please refer the following url:
https://docs.aws.amazon.com/AmazonS3/latest/dev/example-walkthroughs-managing-access-example2.html
I believe you granted permission for another account(111----------). In this account you need to delegate further permission to specific user that you are using.
You need to delegate permission to your user for accessing the bucket created by previous account.
Create inline policy for the user in account(111----------):
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Example",
"Effect": "Allow",
"Action": [
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::examplebucket"
]
}
]
}
Please refer the following url:
https://docs.aws.amazon.com/AmazonS3/latest/dev/example-walkthroughs-managing-access-example2.html
answered Nov 21 at 10:08
Dharmesh Purohit
462
462
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53405831%2faws-s3-bucket-control-policy-for-cross-account-access%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Refer this aws.amazon.com/premiumsupport/knowledge-center/…
– Shiv Rajawat
Nov 21 at 6:19
1
When you say "when trying access it", what specific command did you use? Also, what S3-related permissions does the user/role in the other account have? (They need permission to call S3 granted by their own account AND they need permission via the Bucket Policy.)
– John Rotenstein
Nov 21 at 9:45