Skip to content

TypeScript: Resource handler returned message: "Another resource with the same parent already has this name:... #16

@paulatwilson

Description

@paulatwilson

Hello,

We are trying to use the openapi-integration-helper with the TypeScript template of server less 3.x. We have spent nearly two days on this and continue to have the same issue:

Error:
CREATE_FAILED: ApiGatewayResourceExt (AWS::ApiGateway::Resource)
Resource handler returned message: "Another resource with the same parent already has this name: ext (Service: ApiGateway, Status Code: 409, Request ID:<snip>)" (RequestToken:<snip>, HandlerErrorCode: AlreadyExists)

There is nothing else using "ext" and it doesn't matter what we change the the URL to, it always says that is AlreadyExists. Even if I were to created a UUID v4.

The config in our serverless.ts file is:

  openApiIntegration: {
    package: true,
    inputFile: 'schema.yml',
    mapping: [
      {
        stage: ['sb','dev', 'test', 'prod'],
      },
    ],
  },
  resources: {
    Resources: {
      ApiGatewayRestApi: {
        Type: 'AWS::ApiGateway::RestApi',
        Properties: {
          DisableExecuteApiEndpoint: true,
          ApiKeySourceType: 'HEADER',
          Body: '~',
          Description: 'Some Description',
          FailOnWarnings: false,
          Name: 'ips-external-client-apis-${opt:stage, self:provider.stage}',
          EndpointConfiguration: {
            Types: ['REGIONAL'],
          },
        },
      },     
    },
  },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions