Manually it can be done when you go to setting on API Gateway page and adding an IAM role (https://console.aws.amazon.com/apigateway/home?region=us-east-1#/settings). But I dont know which API to use it for python sdk.
Asked
Active
Viewed 312 times
1 Answers
1
The CloudWatch role can be set by calling update_account using the python sdk https://boto3.readthedocs.io/en/latest/reference/services/apigateway.html#APIGateway.Client.update_account
The path for the cloudwatchArn is /cloudwatchRoleArn

Abhigna Nagaraja
- 1,874
- 15
- 17
-
Thanks a lot. It works with 'op':'replace' not with 'op':'add'. In the case where there is no cloudwatch role set, will the 'op':'replace' work? Apparently I cant test that case because once you have added a role in settings it doesn't allow you to remove it. – Jun 23 '16 at 13:50
-
You can set /cloudwatchRoleArn to null to remove it. – Abhigna Nagaraja Aug 18 '16 at 23:19