Open basselabbara opened 1 year ago
Hi @basselabbara 👋🏽 Apologies for this inconvenience but Amplify Hosting currently doesn't support manually deploying SSR apps: https://docs.aws.amazon.com/amplify/latest/userguide/manual-deploys.html.
Please follow this guide instead to deploy Next.js apps with Amplify: https://docs.aws.amazon.com/amplify/latest/userguide/deploy-nextjs-app.html
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
This has been identified as a feature request. If this feature is important to you, we strongly encourage you to give a 👍 reaction on the request. This helps us prioritize new features most important to you. Thank you!
I wanted to add that this should not be exclusive to NextJS 13... would be great if it supported NextJS 12 as well.
Additionally, it would be great to trigger a deployment from an S3 package using CDK.
@hloriana I've been having discussions with support about this exact feature. In theory, it seems that there should not be any technical reason why we can't deploy Next JS SSR app using upload of files or S3, as long as the files are organized in some expected way.
It seems that Amplify Hosting does the following:
aws amplify update-app --app-id <app_id> --platform WEB_COMPUTE
aws amplify update-branch --app-id <app_id> --branch-name <branch_name> --framework 'Next.js - SSR'
Build of assets. In terms of Next JS, this would be a next build with some additional AWS specifics steps to build whatever is needed to deploy Lambda@Edge.
Infrastructure deployment. S3, CloudFront, Lambda@Edge, IAM, etc...
If I can configure the App properly using commands above and also perform a build on my end that mimics #2, could it be then possible for me to upload the output of that build using Manual approach (DnD files or S3) and trigger #3?
Hi team,
I did a test with git repo with "web_dynamic". And In the building phase, I notice a new "serverless" folder is generated by Amplify in the artifacts.zip
for the following deployment.
Looks like the only difference in the .next
and artifacts.zip
is the "serverless" folder.
Therefore, maybe Amplify could have the ability to know the manually uploaded zip files is from Nextjs project in the building phase, then somehow generating the "serverless" folder for the following deployment.
Is it possible to use the ZIP approach in 2023?
Is it possible to use the ZIP approach in 2023?
i have tried it. but did not work.
As a workaround, my CI/CD process push thing to AWS codecommit. I think it should be possible to upload ZIP to support different CI/CD use cases
any update? Forcing to use amplify CI/CD wouldn't work for all organization cause not everyone wanna stick fully with amplify CI/CD
This feature is highly desired for consistent use of Amplify Hosting from AWS CDK. Given that we can deploy an SPA app from CDK s3 asset to Amplify Hosting (doc), why not for SSR apps?
+1 to this feature I have a case where it would be very benificial to manually deploy a Nuxt 3 app with SSR enabled rather than having to go through ci/cd amplify console
+1 to this feature I have a case where it would be very benificial to manually deploy a Nuxt 3 app with SSR enabled rather than having to go through ci/cd amplify console
It is worth noting that, although not via inbuilt amplify API it is possible to download the build from an artifact repo like AWS CodeArtifact. Avoiding @aws-sdk/*
NodeJS SDK in your webapp build will reduce the total artifact size. And move @aws-sdk/client-codeartifact
into a different package that can download this using OIDC federation, and right permission setup on the amplify role. I use Next.js ISR and this works just fine.
But I would still like to see this feature to inbuilt in AWS APIs - aws cli and aws_amplify_app
terraform.
+1 on this. Manually deploying a SSR app would be really valuable for my use case, otherwise I would need to support two different CI/CD envs for devs, depending on whether they work on SSR apps or not.
Is this still on the radar? Last thing I heard from AWS rep was that this was going to be announced in re:Invent 2023. Came and went. I know AWS does not want to share/commit to roadmaps, but a little bit of news here would help.
+1, manual deployment for SSR via zip files would be helpful
Any news ?
Nope. I had to connect my github repo.
I recently visited on amplify and i saw the option for manual deployment but only for static site generation.
Hey everyone -- Matt from the Amplify Hosting team here. @FaijanSaifi99 @wolfgang000 @arturkasperek @sundeep-paulraj @lbustelo @j-boivie-rs @haarism @inthegreenwild
I know everyone wants an update here! The team is currently scoping this feature and I have a question to ask everyone.
What workflow do you plan to use this feature with? Meaning, we would need the build output to conform to our SSR deployment specification, listed here. Would you expect a CLI tool that you can run so the files are built in the correct format? Or would you add this into your own build pipeline?
Thank you
@mauerbac I prefere an option where I can own full process and build everything on my CI/CD. I think we should just send a ZIP. You can create some standalone tool which will transform nextjs build folder into yours format
@mauerbac a CLI tool would be awesome. Perhaps one that can package and deploy straight to Amplify. Thanks!
@mauerbac Being able to control the build independent of deployment would be ideal.
@mauerbac Would you consider the following capabilities:
The CLI tool can upload a zip file. Guide need on how to structure this for frameworks like Nextjs, and if any monorepo related specifics to be taken care of.
The CLI tool can to pull artifacts from AWS Artifactory. (Currently, I use custom tooling over @aws-sdk/client-codeartifact
to pull builds, enabling the Amplify deployment in few minutes compared to NextJS builds (SSG + ISR) that can take 22 min in the 4 core Amplify build lambda)
Full utilization of external CI/CD platforms are important especially in case of monorepos with fixed versioning bias (e.g., nx.dev). This is in contrast to independent versioning of dependencies that are shared across sites and each site can afford to run at an independent pace of development. So this presents edge cases when validating multiple web apps at scale, especially when shared dependencies change. The challenge increases with trunk-based development, where changes need to move to pre-production quickly (from a feature branch to main branch). Small PRs need to be ideally iterated rapidly across pre-production websites. Speed in pipeline automation is essential, and leveraging an external artifactory enables asynchronous pipeline tasks. If Amplify can pull such artifacts, it would greatly accelerate deployment without thinking though custom tooling like I have setup.
Before opening, please confirm:
App Id
d113cc0qzdxa93
AWS Region
us-east-1
Amplify Hosting feature
Deployments
Describe the bug
Trying to upload a zip build of Next.js with SSR. It says deployment successful but the environment URL says Access Denied.
Expected behavior
The URL should show the Next app instead of Access Denied.
Reproduction steps
Build Settings
No response
Log output
Additional information
No response