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

Feature request: APIGatewayRestResolver local server #1288

Closed
1 of 2 tasks
bauer-jan opened this issue Jul 11, 2022 · 6 comments
Closed
1 of 2 tasks

Feature request: APIGatewayRestResolver local server #1288

bauer-jan opened this issue Jul 11, 2022 · 6 comments
Labels
feature-request feature request

Comments

@bauer-jan
Copy link

Use case

When developing an API in Lambda which is interacting over boto3 with the AWS environment a local server would speed up the devlopment. I would like to be able to use uvicorn to spin up the local development server to test it with Postman. So i dont need to re-deploy my stack to aws whenever i make some changes. As a reference the FastAPI documentation can be used (see: https://fastapi.tiangolo.com/tutorial/first-steps/).

Solution/User Experience

Option to locally use the APIGatewayRestResolver with uvicorn for running a test server.

Alternative solutions

No response

Acknowledgment

@bauer-jan bauer-jan added feature-request feature request triage Pending triage from maintainers labels Jul 11, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented Jul 11, 2022

Thanks for opening your first issue here! We'll come back to you as soon as we can.

@leandrodamascena
Copy link
Contributor

Hello @bauerjan93. Hope you are doing well.

Well, I understand the motivation for asking for an environment where you can write and test your APIs quickly, but I don't think that's one of the responsibilities of this project. I mean this project is a suite to help everyone with a set of utilities for AWS Lambda functions such tracking, logging, metrics, batching and others.

In your case, why don't you try another framwework to help you? I don't know if you know AWS SAM (https://aws.amazon.com/en/serverless/sam/). This is an open source framework for building serverless applications (especially Lambda) and is also maintained by AWS. You can find a great example here of how to instrument and test your application locally using AWS SAM + Lambda Powertools.

Another option is Serverless Framework, where you can also test its functions locally and uses Lambda Powertools.

I hope this help you.

@bauer-jan
Copy link
Author

Thanks for pointing SAM and Serverless Framework out! This just came up since i have currently a Terraform project where i face the challenge described above. So far i always used FastAPI with Mangum (https://github.com/jordaneremieff/mangum) for running ASGI applications in AWS Lambda to handle Function URL, API Gateway. This seeded up development by several factors and i wanted to highlight an integration in powertools would simplify dependencies and complexity.

@heitorlessa
Copy link
Contributor

thank you @leandrodamascena!

hey @bauerjan93, the SAM CLI team is looking for feedback on the upcoming integration with Terraform. Once released, it'll help you start a local API Gateway (both REST and HTTP API), a local Lambda API, among other features like hot-reloading etc. - @praneetap (Product Manager) would love to hear your feedback on what the Terraform user experience should look like.

As Leandro mentioned, we focus on Lambda runtime only since projects like SAM CLI, CDK, Serverless.tf address any infrastructure construct better than we ever would.

Closing.

Thank you!

@github-actions
Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

This issue is now closed. Please be mindful that future comments are hard for our team to see.

If you need more assistance, please either tag a team member or open a new issue that references this one.

If you wish to keep having a conversation with other community members under this issue feel free to do so.

@praneetap
Copy link

@bauerjan93 happy to chat! Feel free to DM me on Twitter to set some time up twitter.com/praneetaprakash

@heitorlessa heitorlessa removed the triage Pending triage from maintainers label Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request feature request
Projects
None yet
Development

No branches or pull requests

4 participants