【问题标题】:AWS Apigateway + Simple System Mangement + IntegrationAWS Api 网关 + 简单系统管理 + 集成
【发布时间】:2020-11-30 09:45:03
【问题描述】:

我正在尝试通过 AWS Apigateway 解析 ssm 参数,但我找不到任何示例。 我定义方法集成的云形成部分如下:

Integration:
   Type: AWS
   Uri: !Sub "arn:aws:apigateway:us-west-2:ssm:action/GetParameter"
   IntegrationHttpMethod: POST
   PassthroughBehavior: NEVER
   RequestTemplates: 
      application/json: ' 
            {
              "Name": "/dev/configs/xoxo"
            }
      '

当我在 AWS 控制台中测试它时,这是日志

Mon Aug 10 18:14:10 UTC 2020 : Method request body before transformations: 
Mon Aug 10 18:14:10 UTC 2020 : Endpoint request URI: https://ssm.us-west-2.amazonaws.com/?Action=GetParameter
Mon Aug 10 18:14:10 UTC 2020 : Endpoint request headers: {Authorization=**********************************************************************************************************************************************************************************************************************************************************************dbf24f, X-Amz-Date=20200810T181410Z, x-amzn-apigateway-api-id=mrvijesndc, Accept=application/json, User-Agent=AmazonAPIGateway_mrvijesndc, X-Amz-Security-Token=...[TRUNCATED]
Mon Aug 10 18:14:10 UTC 2020 : Endpoint request body after transformations: { "Name": "/dev/configs/xoxo"}
Mon Aug 10 18:14:10 UTC 2020 : Sending request to https://ssm.us-west-2.amazonaws.com/?Action=GetParameter
Mon Aug 10 18:14:10 UTC 2020 : Received response. Status: 400, Integration latency: 43 ms
Mon Aug 10 18:14:10 UTC 2020 : Endpoint response headers: {Server=Server, Date=Mon, 10 Aug 2020 18:14:10 GMT, Content-Type=application/json, Content-Length=220, Connection=keep-alive, x-amzn-RequestId=c2e56a30-d846-4cd6-b4af-1df95267a3fd}
Mon Aug 10 18:14:10 UTC 2020 : Endpoint response body before transformations: {"Error":{"Code":"ValidationError","Message":"1 validation error detected: Value null at 'name' failed to satisfy constraint: Member must not be null.","Type":"Sender"},"RequestId":"c2e56a30-d846-4cd6-b4af-1df95267a3fd"}

我想它没有正确拨打电话,有人可以帮助我吗?

【问题讨论】:

    标签: amazon-web-services api integration gateway aws-systems-manager


    【解决方案1】:

    好吧,经过长时间的研究,谷歌为我隐藏了这个帖子8个小时,终于找到了:

    https://forums.aws.amazon.com/thread.jspa?threadID=288118

    希望以后能对像我这样的人有所帮助

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-12-01
      • 2019-12-05
      • 2020-09-30
      • 2023-03-08
      • 1970-01-01
      • 1970-01-01
      • 2021-09-28
      • 1970-01-01
      相关资源
      最近更新 更多