我需要在API Gateway中使用boto3更新我的lambda函数的版本,将test:3
更新为test:4
。
据我所知,我需要在boto3中使用update_integration()
函数,并使用patchOperations
更新,但我不明白为什么会这样,因为没有太多关于它的文档。
client = boto3.client(
'apigateway',
aws_access_key_id='access_key',
aws_secret_access_key='secret_key',
region_name = 'us-east-1'
)
response = client.update_integration(...) # something here?
有什么建议吗?
-编辑-
arn = 'arn:aws:apigateway:us-east-1:lambda:path/2015-03-
31/functions/{lambdaFunctionArn}'
response = client.update_integration(
restApiId= '{restApiId}',
resourceId= '{resourceId}',
httpMethod='POST',
patchOperations=[
{
'op': 'replace',
'path': '/uri',
'value': arn
}
]
)
我在这个论坛上找到了解决方案:https://forums.aws.amazon.com/thread.jspa?messageID=694264,但我一直收到这个错误:
botocore.errorfactory.BadRequestException:调用UpdateIntegration操作时出错(BadRequestException):必须为UpdateIntegration集成
指定角色ARN
https://stackoverflow.com/questions/56190067
复制相似问题