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

AWS Lambda Build #8

Open
rallisf1 opened this issue Mar 14, 2023 · 4 comments
Open

AWS Lambda Build #8

rallisf1 opened this issue Mar 14, 2023 · 4 comments

Comments

@rallisf1
Copy link

I think it would make better sense for this package to use AWS Lambda, maybe create a new branch for it? You only need to swap the http server block and response functions with the lambda events.

If you are not familiar with it here's a nice example I found: https://dev.to/preethamsathyamurthy/serverless-golang-rest-api-with-aws-lambda-4cn6

P.S. I'd do it myself but I'm swamped and already run a few EC2 instances that I just added this on.

@joeirimpan
Copy link
Owner

@rallisf1 I don't think this package should move from a HTTP server to lambda events. If possible, you could add it in such a way that it is configurable to use http server / aws lambda events.

@rallisf1
Copy link
Author

@joeirimpan completely removing the http server would be a mistake; that's why I suggested another branch. Proxies to AWS services fit like a glove to Lambda though and it is more generous than EC2 Free Tier.

@joeirimpan
Copy link
Owner

Like i said earlier, you can make it configurable also. If a specific config is enabled, use lamdba otherwise create http server. That way, this feature can co-exist with current one.

@symroe
Copy link

symroe commented Aug 25, 2023

FWIW, this makes running Docker images that communicate over HTTP trivial to host on AWS Lambda:

https://github.com/awslabs/aws-lambda-web-adapter

Simply add

COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.7.0 /lambda-adapter /opt/extensions/lambda-adapter

to the top of the Dockerfile

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

No branches or pull requests

3 participants