I'm trying to deploy an API Gateway with Lambda integration and I can't get around one particular error. I've checked some posts that took about making sure you've followed the request format, which I believe I have. The error I keep receiving is:
Invalid ARN specified in the request: Integrations of type 'AWS_PROXY' currently only supports Lambda function and Firehose stream invocations (Service: AmazonApiGatewayV2; Status Code: 400; Error Code: BadRequestException;
This is what my CloudFormation looks like:
Parameters:
EnvType:
Type: String
Default: "dev"
Resources:
routerLambda:
Type: AWS::Lambda::Function
Properties:
FunctionName: !Sub router-${EnvType}
...
routerLambdaIntegration:
Type: AWS::ApiGatewayV2::Integration
Properties:
ApiId: !Ref apiGateway
IntegrationType: AWS_PROXY
IntegrationUri: !Sub "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:router-dev/invocation"
DependsOn: routerLambda
Can anyone see what I'm missing?