Nag*_*ama 7 lambda aws-cloudformation aws-lambda aws-api-gateway serverless-framework
我想为我的api网关启用api网关日志,这是我的lambda函数的环绕.
service: myservice
provider:
name: aws
runtime: python3.6
stage: ${opt:stage}
region: ${self:custom.AwsRegion}
timeout: 130
memorySize: 128
functions:
create_user:
handler: functions/create_user.lambda_handler
events:
- http:
path: /create_user
method: post
authorizer: aws_iam
private: true
Run Code Online (Sandbox Code Playgroud)
当我部署它时,我确实看到云计算中的lambda日志.但是API网关日志没有在cloudwatch中重新编码.任何人都可以启发我的云形成语法,为我的api门方式启用日志吗?
我尝试添加下面的代码,但看起来它正在尝试创建新的api端点.
资源:资源:
ApiGatewayStage:
Type: AWS::ApiGateway::Stage
Properties:
RestApiId:
Ref: ApiGatewayRestApi
StageName: ${opt:stage}
MethodSettings:
- DataTraceEnabled: true
HttpMethod: "*"
LoggingLevel: INFO
ResourcePath: "/*"
MetricsEnabled: true
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2035 次 |
| 最近记录: |