aws-sam-cli: HttpApi event type does not work with local start-api
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)
- OS: Ubuntu 18.04
sam --version
: 0.37.0
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 63
- Comments: 19 (6 by maintainers)
Good catch. This is on our immediate roadmap to support. Marking this as a feature request for visibility.
+1 to this guys, as soon as people discover HttpApi and how faster and cheaper it is , this will become a big missing feature
Yeah with 1.0.0, still doesn’t work, it would have been nice to be able to test the api locally!
Hi guys, I just add
HttpApi
support inlocal start-api
. You can see the MR #1942.I’m exploring HttpApi and came across this issue. When would this become available?
Thanks @pyk! 🙇
@jfuss any chance you can have a look at this one and let us know what’s needed to be able to merge it? It’s a big blocker to using the new HTTP API like the old REST API in SAM 🐿️ 🙏
@sanathkr Is there any update on this please? We’re starting a new project and I noticed it’s not done yet. PR from @pyk has 1 not passing test. Seems we could be almost there 😃
Is this supposed to be fixed ? I can still reproduce this
I’ve updated my PR, now all tests are passed successfully 🙏
I updated sam to v0.47.0 and still HttpApi not working with
local start-api
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 likeTags
.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.Following…
Hi,
Is there any update? Also in my organization we are waiting for this feature.
Thanks!
Following…