-
Notifications
You must be signed in to change notification settings - Fork 201
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
Add function url support #190
Conversation
Signed-off-by: thomasgouveia <[email protected]>
How to make use of it please @dza89? I've forked your PR as my copy -- github.com/suntong/aws-lambda-go-api-proxy $ grep replace go.mod
replace github.com/awslabs/aws-lambda-go-api-proxy => github.com/suntong/aws-lambda-go-api-proxy v0.0.0-20230922211856-09c9b90f1fd1 But for the following code: // import ...
fiberadapter "github.com/awslabs/aws-lambda-go-api-proxy/fiber"
//...
// Handler will deal with Fiber working with Lambda
func Handler(ctx context.Context, req events.LambdaFunctionURLRequest) (events.LambdaFunctionURLResponse, error) {
// If no name is provided in the HTTP request body, throw an error
return fiberLambda.ProxyFunctionURLWithContext(ctx, req)
}
func main() {
// Make the handler available for Remote Procedure Call by AWS Lambda
lambda.Start(Handler)
} I'm getting What I've done wrong, do you have a working code that I could try with please? thx |
@suntong |
Ah, yeah, now is working. thanks. |
Hi, Thanks for the progress on this! I, however, need gin 😉 Looks simple enough to add in though - so I can probably make the changes tomorrow/Friday. Assuming I am successful, how would you like me to get the changes over to you so you can add it into this PR? Thanks, |
If you fork my fork and make a new pr I'll close this one. |
Please don't close this one, as I'm still hoping the function url support for go fiber will be adopted by the official code someday, eventually... |
Oh, I know what you mean, you meant two changes in single PR. Ok. if so, sure. |
Haha then the post from you under #187 should be under this one? |
Haha, I re-read my post under #187, and now made it crystal clear what I meant (but won't repeat it under here for I'm afraid beating a dead horse won't gain us anything 🤦🏻♂️🤦🏻♂️). |
Hi, I've managed to get it working with gin and have tested it (both with added tests and a test deployed lambda with fURL). I have opened a PR (#192) with the updates (forked from this branch, so includes all changes from #190 and #187), but am happy to close that down if there is an alternative way to get the changes in. Thanks again, and please let me know if I can be of any further assistance. Best Wishes, |
superseeded by #192 |
Description of changes:
This PR adds function url support for go fiber and http.