How to configure IAM policy for giving the full access to specific API Gateway
We can give or restrict different permissions over API Gateway using default IAM policies. But this is applicable for the whole list of API Gateways in the AWS account.
There are certain cases where we need to give the read and write permissions only to specific API Gateway.
In such a situation we can create a new IAM policy as follows.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"apigateway:GET"
],
"Resource": [
"arn:aws:apigateway:*::/clientcertificates",
"arn:aws:apigateway:*::/restapis",
"arn:aws:apigateway:*::/restapis/*"
]
},
{
"Effect": "Allow",
"Action": [
"apigateway:*"
],
"Resource": [
"arn:aws:apigateway:us-east-1::/restapis/API-ID",
"arn:aws:apigateway:us-east-1::/restapis/API-ID/*"
]
}
]
}
Here we need to replace API-ID with the corresponding value.
In this case the user have read and write access to this particular API only and rest all API'S are restricted as read only.
That's all…