Skip to content

Instantly share code, notes, and snippets.

@mearns
Created May 24, 2019 20:37
Show Gist options
  • Save mearns/c6a3e004451b8c56f4dc33f8c670b922 to your computer and use it in GitHub Desktop.
Save mearns/c6a3e004451b8c56f4dc33f8c670b922 to your computer and use it in GitHub Desktop.
Resource Policy for Private API Gateway
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": "execute-api:Invoke",
"Resource": "arn:aws:execute-api:${REGION}:${ACCOUNT_ID}:*/*",
"Condition": {
"StringEquals": {
"aws:sourceVpce": [
"vpce-${VPCE_ID_1}",
"vpce-${VPCE_ID_2}",
/* ... */
]
}
}
},
{
"Effect": "Allow",
"Principal": {
"AWS": [
"arn:aws:iam::${ALLOWED_ACCOUNT_ID_1}:${ALLOWED_ROLE_ID_1}",
"arn:aws:iam::${ALLOWED_ACCOUNT_ID_2}:${ALLOWED_ROLE_ID_2}"
/* ... */
]
},
"Action": "execute-api:Invoke",
"Resource": "arn:aws:execute-api:${REGION}:${ACCOUNT_ID}:*/*",
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment