nitro icon indicating copy to clipboard operation
nitro copied to clipboard

feat(preset): Aws lambda edge

Open juankamilo opened this issue 2 years ago β€’ 6 comments

πŸ”— Linked issue

❓ Type of change

  • [ ] πŸ“– Documentation (updates to the documentation or readme)
  • [ ] 🐞 Bug fix (a non-breaking change that fixes an issue)
  • [ ] πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • [x] ✨ New feature (a non-breaking change that adds functionality)
  • [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Add AWS Lambda@Edge to the preset.

The current aws-lambda preset is not compatible with the Lambda@Edge This option is one of the most cost-effective on cloud technologies, it is much faster and more effective than "API Gateway". I take WinterYukky job as a base, focusing more on ".output/server/index.mjs" and removing the zero config functionalities as there are several CloudFormation templates to deploy, leaving a simpler option to implement inside your CI/CD.

Resolves #79

πŸ“ Checklist

  • [ ] I have linked an issue or discussion.
  • [x] I have updated the documentation accordingly.

juankamilo avatar Mar 21 '23 22:03 juankamilo

Live Preview ready!

Name Edit Preview Latest Commit
nitro Edit on Studio β†—οΈŽ View Live Preview b5b8599b885b83e3ac50378aa899b4f6b7372269

nuxt-studio[bot] avatar Mar 21 '23 22:03 nuxt-studio[bot]

Codecov Report

Merging #1075 (b5b8599) into main (1d0c120) will increase coverage by 0.01%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1075      +/-   ##
==========================================
+ Coverage   76.64%   76.66%   +0.01%     
==========================================
  Files          71       72       +1     
  Lines        7241     7247       +6     
  Branches      723      723              
==========================================
+ Hits         5550     5556       +6     
  Misses       1690     1690              
  Partials        1        1              
Impacted Files Coverage Ξ”
src/presets/aws-lambda-edge.ts 100.00% <100.00%> (ΓΈ)
src/presets/cloudflare-module.ts 100.00% <100.00%> (ΓΈ)
src/presets/cloudflare.ts 100.00% <100.00%> (ΓΈ)
src/presets/index.ts 100.00% <100.00%> (ΓΈ)

codecov[bot] avatar Mar 24 '23 23:03 codecov[bot]

@pi0 can we get this PR merged soon ?

anjali89r avatar Mar 29 '23 16:03 anjali89r

@pi0 @danielroe can we get a review and merge of this pr soon ?

galaxy79 avatar Apr 18 '23 07:04 galaxy79

Hey @pi0 do we have plans to get this merged for the next release? Our team is looking forward to use it.

caiorhian avatar May 25 '23 12:05 caiorhian

This is looking very good, and it also would be a compatible with SST as demonstrated here https://github.com/jdevdevdev/nuxt-sst/blob/lambda-edge/nuxt-app/server/nitro/preset/entry.ts

@pi0 Some presets such as vercel and netlify have multiple presets, while some like cloudflare and azure don't, so I'm not sure what to do here.

Hebilicious avatar Jul 03 '23 17:07 Hebilicious