question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Documentation nit: Serverless functions

See original GitHub issue

A question I kinda wanted https://redwoodjs.com/docs/serverless-functions to answer: Why do the generated files from the serverless generator seem to tie to aws?

( I think I know the answer is that in general aws-lambda’s API style must be the default for many other cloud providers but it wasn’t on vercel + next’s nor azure’s which I at least have some experience with. Figured the docs would have the answer there. )

Related, perhaps yarn rw g functions can check for @types/aws-lambda in node_modules and recommend it when in TypeScript mode? The IDE doesn’t show errors that it’s missing (it just any’d) and installing aws-lambda doesn’t include those types (because it’s a different module). Ideally Redwood could inline the APIGatewayEvent types into @redwoodjs/api/webhooks instead then use those.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
dthyressoncommented, Oct 18, 2021

Are you thinking that if you yarn rw setup deploy that it might also run yarn rw setup template function --vercel or something similar, so that any future functions you generate will use a template customized for that host?

That’s an interesting thought. 🤔

0reactions
cannikincommented, Oct 18, 2021

It does! yarn rw setup generator function will give you the template and can change up whatever you want. Are you thinking that if you yarn rw setup deploy that it might also run yarn rw setup template function --vercel or something similar, so that any future functions you generate will use a template customized for that host?

It doesn’t currently have the ability to pass flags and select from other templates, but I don’t see why it couldn’t…

Read more comments on GitHub >

github_iconTop Results From Across the Web

AWS Lambda Functions - Serverless Framework
The Serverless Framework documentation for AWS Lambda, API Gateway, EventBridge, DynamoDB and much more.
Read more >
Documenting your Serverless Solutions | by Lee James Gilmore
Quite often we build out fantastic Serverless solutions but we are too light on the documentation side. This can include an OpenAPI document...
Read more >
Serverless Functions – Vercel Docs
Vercel Serverless Functions enable running code on-demand without needing to manage your own infrastructure, provision servers, or upgrade hardware.
Read more >
Functions overview - Netlify Docs
Use serverless functions to run on-demand, server-side code without having to run a dedicated server. Learn about default and custom deployment options.
Read more >
Function - AWS Serverless Application Model
Creates an AWS Lambda function, an AWS Identity and Access Management (IAM) execution role, and event source mappings that trigger the function.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found