Bug: TITLE"Invalid API identifier specified" when attaching resources to an existing AWS::ApiGatewayV2::Api #7030
Labels
stage/needs-triage
Automatically applied to new issues and PRs, indicating they haven't been looked at.
Description:
Creating any resource which references an existing API Gateway V2 fails when trying to find the existing gateway. The following example uses an AWS:ApiGatewayV2::Stage as an example but the same issue occurs with:
Steps to reproduce:
Given this snippet in a template.yaml:
and a samconfig.toml file containing the following:
Running SAM ClI with:
sam deploy --config-env local
results in an error:
Invalid API identifier specified 665192190199:bwop0s66op (Service: AmazonApiGatewayV2; Status Code: 404; Error Code: NotFoundException; Request ID: 4722191c-c190-49e8-a6f2-cc014110bc21; Proxy: null)
where '665192190199' is the account number and 'bwop0s66op' is the ID of an existing APIGateway
Running the following aws command, which is logically equivalent to the SAM invocation succeeds:
aws apigatewayv2 create-stage --api-id bwop0s66op --stage-name local --auto-deploy
Observed result:
CREATE_FAILED AWS::ApiGatewayV2::Stage OCRStatusWebSocketAPIStage Invalid API identifier specified 665192190199:bwop0s66op (Service: AmazonApiGatewayV2; Status Code: 404; Error Code: NotFoundException; Request ID: 4c498551-bb24-4e63-b7be-a0541ecffbbf; Proxy: null)
Expected result:
The Stage/Mapping/Integration/Resource would be created and correctly reference the given ApiGateway
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)\
The text was updated successfully, but these errors were encountered: