Skip to content

Deploying Next.js 14 with Bitbucket Server using AWS Amplify

0

Hello,

I am planning to deploy a Next.js 14 application to AWS Amplify. While setting up the deployment in the Amplify Console, I noticed that it requires selecting a Git provider. I would like to confirm if it's possible to deploy using a self-hosted Bitbucket Server, as it doesn't appear to be listed as an option.

Additionally, I see that deployment via S3 is also an option, but can this work for a non-static app that includes SSR (Server-Side Rendering) functionality, or is S3 limited to static deployments?

Finally, in previous versions, it seems deployment via the Amplify CLI was supported. Does the latest version still support CLI-based deployment in the same way?

Thank you for your help.

asked 2 years ago556 views

1 Answer
0

AWS Amplify supports deploying Next.js 14 applications, but there are some considerations regarding your specific deployment scenario:

  1. Bitbucket Server: While Amplify offers integration with Bitbucket Cloud, it does not have native support for self-hosted Bitbucket Server installations. The typical Git provider options in the Amplify Console include GitHub, GitLab, and Bitbucket Cloud. For self-hosted Bitbucket Server, you might need to explore alternative deployment methods.

  2. S3 Deployment: S3 deployment in Amplify is primarily designed for static website hosting. For a Next.js 14 application that includes Server-Side Rendering (SSR), S3 alone would not be sufficient. SSR requires a server runtime, which S3 static hosting cannot provide. For applications with SSR, you would need to use Amplify's full hosting capabilities rather than just S3 storage.

  3. CLI-based Deployment: Amplify CLI still supports deployment for frontend applications. However, for a Next.js 14 application with SSR, you would typically use the Amplify Console for deployment rather than the CLI. The console provides a more streamlined process for handling SSR applications and managing the necessary server-side resources.

Given these constraints, for your Next.js 14 application with SSR using a self-hosted Bitbucket Server, you might need to consider alternative deployment strategies. One option could be to set up a CI/CD pipeline that pulls from your Bitbucket Server and then uses the Amplify CLI or AWS CloudFormation to deploy to Amplify. This would require more manual configuration but could potentially meet your needs for using a self-hosted Bitbucket Server with Amplify.

Remember to ensure that your Amplify setup is configured to support Next.js 14, including any necessary updates to build settings or environment configurations to handle the latest Next.js features and SSR requirements.

Sources
Integrate a Bitbucket repository with AWS Amplify using AWS CloudFormation - AWS Prescriptive Guidance
6 New AWS Amplify Launches for Frontend Developers | Front-End Web & Mobile
Next.js Pages Router - Next.js - AWS Amplify Gen 2 Documentation
Quickstart - AWS Amplify Gen 2 Documentation

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.