Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty stage in API Gateway output for endpoints #221

Open
hahuang65 opened this issue May 10, 2023 · 0 comments
Open

Empty stage in API Gateway output for endpoints #221

hahuang65 opened this issue May 10, 2023 · 0 comments

Comments

@hahuang65
Copy link

hahuang65 commented May 10, 2023

With this serverless.yml:

service: scraperator
frameworkVersion: "3"
provider:
  name: aws
  runtime: python3.9
  stage: local
  region: us-east-1
  logs:
    httpApi: true
  deploymentBucket:
    name: serverless-deploys
    serverSideEncryption: AES256
  httpApi:
    cors: true
    disableDefaultEndpoint: false
plugins:
  - serverless-python-requirements
  - serverless-localstack
custom:
  stage: ${opt:stage, self:provider.stage}
  localstack:
    stages:
      - local
    autostart: false
functions:
  config:
    handler: capture.config
    events:
      - httpApi:
          method: GET
          path: /config
  capture:
    handler: capture.handler
    events:
      - httpApi:
          method: POST
          path: /capture

A successful deploy yields this output:

endpoints:
  GET - https://746fbc6e.execute-api.localhost.localstack.cloud:4566//config
  POST - https://746fbc6e.execute-api.localhost.localstack.cloud:4566//capture

Note the // where there should be /local/.
The URL as printed does not work. However, removing a / (e.g. https://746fbc6e.execute-api.localhost.localstack.cloud:4566/config) does work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants