【发布时间】:2018-02-27 04:34:31
【问题描述】:
我正在使用 AWS SAM 定义我的 API Gateway API
ApiGatewayApi:
Type: AWS::Serverless::Api
Properties:
DefinitionUri: swagger.yml
StageName: prod
Variables:
Region: !Ref AWS::Region
AccountId: !Ref AWS::AccountId
Ec2Index: !Ref Ec2Index
AuthLogin: !Ref AuthLogin
Ec2Patch: !Ref Ec2Patch
AutoScalingIndex: !Ref AutoScalingIndex
AutoScalingPatch: !Ref AutoScalingPatch
AutoScalingScale: !Ref AutoScalingScale
在我的招摇文件中:
路径: /身份验证/会话: 邮政: 产生: - 应用程序/json x-amazon-apigateway 集成: uri:arn:aws:apigateway:ap-southeast-1:lambda:path/2015-03-31/functions/arn:aws:lambda:ap-southeast-1:598545985414:function:${stageVariables.AuthLogin}/invocations passthroughBehavior:when_no_match http方法:POST 类型:aws_proxy 回复: 200: 描述:应用令牌 401: 描述:401 403: 描述:403
AWS CloudFormation 错误提示
导入期间发现错误:无法为路径“/auth/session”的资源集成“POST”:Lambda 函数 ARN 必须位于同一账户中无法为路径“/autoscaling”的资源集成“GET” ':Lambda 函数 ARN 必须在同一账户中路径“/autoscaling/{groupName}/scale”:Lambda 函数 ARN 必须在同一个账户中 无法为路径“/ec2”的资源在“GET”上进行集成:Lambda 函数 ARN 必须在同一账户中 无法进行集成路径“/ec2/{id}”中资源的“PATCH”:Lambda 函数 ARN 必须在同一账户中
好像我的 ARN 无效。一旦我删除了变量,这个问题就解决了。这里有什么问题?
【问题讨论】:
标签: amazon-web-services amazon-cloudformation