
Using this policy a user access can be restricted to deploy API only to particular stage(s)
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": "apigateway:POST",
"Resource": [
"arn:aws:apigateway:us-east-1::/restapis/<api-id>/deployments"
],
"Condition": {
"ForAnyValue:StringEquals": {
"apigateway:Request/StageName": "dev"
}
}
}
]
}