我用ansible创建了lambda。没事,我得到了ApiId
- name: Create API Gateway
environment:
AWS_PROFILE: "{{ aws_profile_name }}"
community.aws.aws_api_gateway:
state: present
endpoint_type: REGIONAL
stage: "{{ stage_name }}"
swagger_file: "{{ temp_swagger_lambda.path }}"
region: "{{ aws_region }}"但也需要创建与lambda的关系(通过UI这样做。但如何通过cli或ansible (我找不到)

发布于 2022-01-28 01:03:42
如果是一次一次的话,这样的事情应该能奏效。
aws apigateway put-integration --rest-api-id 1234123412 --resource-id a1b2c3 --http-method GET --type AWS --integration-http-method POST --uri 'arn:aws:apigateway:us-west-2:lambda:path//2015-03-31/functions/arn:aws:lambda:us-west-2:123412341234:function:function_name/invocations'https://docs.aws.amazon.com/cli/latest/reference/apigateway/put-integration.html
https://stackoverflow.com/questions/70881186
复制相似问题