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

Using this library with AWS function URLs? #273

Open
ffMathy opened this issue Mar 21, 2023 · 3 comments
Open

Using this library with AWS function URLs? #273

ffMathy opened this issue Mar 21, 2023 · 3 comments

Comments

@ffMathy
Copy link

ffMathy commented Mar 21, 2023

AWS Lambda Function URLs are different from regular API Gateway URLs, in that they support IAM authentication, and they are also cheaper to use.

Does this library have support for an AWS Lambda that has a function URL instead of an API Gateway integration?

@dougmoscrop
Copy link
Owner

It will need some modification, I can't promise I will work on it but I might, otherwise PRs welcome

@jdrydn
Copy link

jdrydn commented Jul 19, 2023

It works fine on it's own (without IAM authentication), if you need to access the original event I suggest you use the options argument to amend the incoming req:

export const handler = serverless(app,{
  request(req, event, context) {
    // Append event & context to the request
    req.lambdaEvent = event;
    req.lambdaContext = context;
  },
});

Then in your framework, req.lambdaEvent would have the original event for you to access the IAM-specific request context you're after.

@ptz0n
Copy link

ptz0n commented Nov 8, 2023

I can confirm that Lambda Function URL's works fine.

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

4 participants