2 Answers
- Newest
- Most votes
- Most comments
1
Hello.
Try adding the following policy to the IAM user's policy.
If you add this, you will not be able to access CodeCommit unless you go through the VPC endpoint.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"codecommit:*"
],
"Resource": [
"*"
],
"Condition": {
"StringEquals": {
"aws:sourceVpce": [
"VPC EndPoint ID"
]
}
}
}
]
}
0
Apart finding a proper resource policy, you could use security groups on the vpc interface endpoint and whitelist only IPs you need.
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated a year ago