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.

[Request]: Moving withSSRContext out of the aws-amplify pakage

See original GitHub issue

Is your feature request related to a problem? Please describe. I am using Serverless framework to deploy Nextjs. They deploy single lambda@edge for all server side rendering pages and single lambda@edge for all api. Each lambda has limitation of 50MB storage zipped. import Amplify, { withSSRContext } from 'aws-amplify Adds 1.3 MB per SSR page or per SSR path. So at max I can deploy only 40 SSR pages or 40 API not including other packages. It looks like a lot but gets over quickly.

I added single api and size of lambda@edge was 1.3 Mb. I added 3 api paths and size of lambda@edge became 4Mb.

All all Api’s I am checking if user is logged in or not.

Describe the solution you’d like I use import Amplify from '@aws-amplify/core. I was hoping to get something like import { withSSRContext } from '@aws-amplify/ssr'

Describe alternatives you’ve considered Give up on SSR/Nextjs and go back to CSR/React.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
harrysolovaycommented, Dec 4, 2020

I thought this was a very nice & minimal example. As for CDK tutorials, I’d recommend following along with CDK Workshop.

I have no immediately-obvious advice on ensuring a smooth NextJS + Fargate + AmplifyJS experience: I think it’ll be pretty smooth even without the advice 😉 but if you do encounter difficulty, please don’t hesitate to file an issue or reach out in our Discord.

That’s an awesome announcement! Would definitely be interesting to explore. I’m eager to test out the Deno runtime on AWS Lambda functions.

0reactions
github-actions[bot]commented, Dec 5, 2021

This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Started with Server-Side Rendering (SSR) - JavaScript
The withSSRContext utility creates an instance of Amplify scoped to a single request ( req ) using those cookie credentials. For client-side code...
Read more >
aws-amplify | Yarn - Package Manager
AWS Amplify is a JavaScript library for Frontend and mobile developers building cloud-enabled applications. ... Open Bugs Feature Requests Closed Issues.
Read more >
Build a chat app in 9 minutes with AWS Amplify & Next JS
Learn How To Use AWS Amplify Subscriptions with Next.JS to Build A Real-Time Chat Application.
Read more >
amplify-js
We recommend to migrate to aws-sdk-js-v3 if you rely on AWS services that are not supported by ... Defined in packages/aws-amplify/src/withSSRContext.ts:19 ...
Read more >
Get Started With AWS Amplify, Next.JS & Typescript. Full Stack ...
A GraphQL API hosted on AWS AppSync; A basic authentication system using AWS Cognito; A basic Todo web application to demonstrate the front-end....
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