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

HttpApi event type does not work with local start-api #1641

Open
Lanchez opened this issue Dec 5, 2019 · 8 comments
Open

HttpApi event type does not work with local start-api #1641

Lanchez opened this issue Dec 5, 2019 · 8 comments
Labels

Comments

@Lanchez
Copy link

@Lanchez Lanchez commented Dec 5, 2019

Description

I renamed all Api events from functions to HttpApi and sam local start-api gives error message Error: Template does not have any APIs connected to Lambda functions

Steps to reproduce

Create a function with event type HttpApi without any events of type Api and try to start local start-api

Observed result

Found '0' API Events in Serverless function with name 'XXX'
...
Removed duplicates from '0' Explicit APIs and '0' Implicit APIs to produce '0' APIs
0 APIs found in the template
Sending Telemetry: {'metrics': [{'commandRun': {'awsProfileProvided': False, 'debugFlagProvided': True, 'region': '', 'commandName': 'sam local start-api', 'duration': 242, 'exitReason': 'UserException', 'exitCode': 1, 'requestId': '76b3766e-5990-4e27-ae83-98f7d13b012c', 'installationId': '9ce7efdf-c007-4c1d-920f-939c97325721', 'sessionId': 'e46aa880-3d79-4ae3-92e9-139ccddd56d0', 'executionEnvironment': 'CLI', 'pyversion': '3.7.5', 'samcliVersion': '0.37.0'}}]}
HTTPSConnectionPool(host='aws-serverless-tools-telemetry.us-west-2.amazonaws.com', port=443): Read timed out. (read timeout=0.1)
Error: Template does not have any APIs connected to Lambda functions

Expected result

Local api starts with HttpApi event type just like with Api event type.

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

  1. OS: Ubuntu 18.04
  2. sam --version: 0.37.0
@sanathkr

This comment has been minimized.

Copy link
Contributor

@sanathkr sanathkr commented Dec 9, 2019

Good catch. This is on our immediate roadmap to support. Marking this as a feature request for visibility.

@enobufs

This comment has been minimized.

Copy link

@enobufs enobufs commented Feb 4, 2020

I'm exploring HttpApi and came across this issue. When would this become available?

@apemberton

This comment has been minimized.

Copy link

@apemberton apemberton commented Feb 16, 2020

Following...

1 similar comment
@metaskills

This comment has been minimized.

Copy link
Contributor

@metaskills metaskills commented Mar 11, 2020

Following...

@metaskills

This comment has been minimized.

Copy link
Contributor

@metaskills metaskills commented Mar 11, 2020

Does it work with local invoke?

@metaskills

This comment has been minimized.

Copy link
Contributor

@metaskills metaskills commented Mar 19, 2020

Adding some context. I have noticed that v0.45.0 does add full support for AWS::Serverless::HttpApi which I think was error'ing out for me prior on properties like Tags.

But in order for our team to update our highest invoked Lambda to HTTP API, we need the start-api feature to work since we use that for integration tests server.

@MartinMasek

This comment has been minimized.

Copy link

@MartinMasek MartinMasek commented Apr 1, 2020

Tested on version v0.45.0
Any updates on this (ETA)? I have to manually set Event to Api instead of HttpApi when I want to test locally which not the best flow.

@AmrAyoub97

This comment has been minimized.

Copy link

@AmrAyoub97 AmrAyoub97 commented Apr 6, 2020

I updated sam to v0.47.0 and still HttpApi not working with local start-api

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

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.