-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
I am trying to use this Swagger:
paths:
/documents:
post:
responses: {}
security:
- authorizerFunc: []
x-amazon-apigateway-integration:
uri: arn:aws:apigateway:ap-southeast-2:lambda:path/2015-03-31/functions/arn:aws:lambda:ap-southeast-2:${stageVariables.AccountId}:function:${stageVariables.PostFunctionName}/invocations
passthroughBehavior: "when_no_match"
httpMethod: "POST"
type: "aws_proxy"
with the corresponding template:
Resources:
Explicit API Gateway definition needed for the Custom Authorizer.
ApiGatewayApi:
Type: AWS::Serverless::Api
Properties:
DefinitionUri: swaggerFile.yaml
StageName: Prod
Variables:
PostFunctionName: !Ref PostFunction
AccountId: 1234567890
But I get a CloudFormation stack event with:
"ResourceStatusReason": "Errors found during import:\n\tUnable to put integration on 'POST' for resource at path '/documents': Lambda function ARN must be in same account"
It works fine when I put the literal AccountId 1234567890 in the URI.
It looks like the stageVariable reference isn't expanded, is that right?
Thanks!