Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Calculadora

0

34
Vistas
The provided route key is not formatted properly for HTTP protocol

An error occurred: HttpApiRoutePostv1Banks - The provided route key is not formatted properly for HTTP protocol. Format should be "[HTTP METHOD] /[RESOURCE PATH]" or "$default" (Service: AmazonApiGatewayV2; Status Code: 400; Error Code: BadRequestException; Request ID: 38370b30-9c11-4a66-9f2d-710fd2c25329; Proxy: null).

provider:
  ...
  httpApi:
    payload: '2.0' # Define Http format needed for API GW
  ...
functions:
  banksCreate:
    handler: src/banks.create
    events:
      - httpApi: 'POST v1/banks'

I had set up serverless.yml file according to the official documentation

when I run serverless offline everything working fine, but when I try to deploy error above occurs.

I am not sure where I make a mistake?

note that deployment was ok with restApi event

9 months ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

NOTE: error message says [HTTP METHOD] /[RESOURCE PATH] which means that / should at path start and path be separated by blank space.

provider:
  ...
  httpApi:
    payload: '2.0' # Define Http format needed for API GW
  ...
functions:
  banksCreate:
    handler: src/banks.create
    events:
      - httpApi: 'POST /v1/banks'
9 months ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar empleo Planes Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2023 PeakU Inc. All Rights Reserved.