2 Answers
- Newest
- Most votes
- Most comments
0
You could add a condition that compares the Bucket account with the Principle's account. Something like:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1677693648738",
"Action": [
"s3:PutObject"
],
"Effect": "Allow",
"Resource": "arn:aws:s3:::mybucket/*",
"Condition": {
"StringEquals": {
"s3:ResourceAccount": "${aws:PrincipalAccount}"
}
}
}
]
}
0
Hi
I replace ${aws:PrincipalAccount} with my accound ID and it's work like I need !
Thx
Best regards
Benoit
answered a year ago
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 9 months ago