Zynnode logoZynnode

Deploy to AWS

Deploy your app to Amazon Web Services — S3, EC2, ECS, or Lambda.

Zynnode supports four deployment targets on AWS. This guide explains what each one does, which apps they're best for, and what to expect after deployment.

Before deploying, make sure you've connected your AWS account.

Choosing a Deployment Target

During the project configuration step, you'll pick a deployment target from the dropdown. Here's how to choose:

TargetBest ForWhat You Get
S3 + CloudFrontStatic sites, React SPAs, marketing pagesFast global CDN with a CloudFront URL
EC2Full-stack apps, Node.js APIs, apps that need a serverA virtual machine running your app
ECS (Fargate)Containerized apps, microservicesA managed container service with auto-scaling
LambdaServerless APIs, lightweight functionsPay-per-request with no servers to manage

This is the simplest option. Zynnode builds your app and uploads the output files to an S3 bucket, then serves them through CloudFront — Amazon's global content delivery network.

What Happens During Deployment

  1. Zynnode runs your build command and produces static files.
  2. The files are uploaded to a new S3 bucket in your AWS account.
  3. A CloudFront distribution is created in front of the bucket for fast global delivery.
  4. Your app is live at the CloudFront URL (shown in your Zynnode dashboard).

After Deployment

  • Your live URL will look like https://d1234abcdef.cloudfront.net. You can add a custom domain at any time.
  • CloudFront caches your files globally, so your site loads fast for visitors anywhere in the world.
  • To update your site, just push a new commit. Zynnode will rebuild and upload the new files automatically.

Good to Know

  • S3 + CloudFront is for static output only — HTML, CSS, JavaScript, and images. It won't work for apps that need a running server (use EC2, ECS, or Lambda instead).
  • If you're using Next.js with static export (output: 'export'), this is a great fit.
  • CloudFront may take a few minutes to propagate changes globally after a redeploy.

Zynnode provisions an EC2 instance (a virtual machine) in your AWS account, deploys your app to it, and starts the application process.

What Happens During Deployment

  1. Zynnode runs your build command.
  2. An EC2 instance is launched in your AWS account.
  3. Your built app is transferred to the instance and started.
  4. The app is accessible at the instance's public IP address or domain.

After Deployment

  • Your live URL is shown in the Zynnode dashboard.
  • The instance runs continuously — your app is always on.
  • Subsequent deploys update the app on the same instance without creating a new one.

Things to Check in AWS

If your app deploys successfully but you can't access it in a browser, check the EC2 instance's security group in the AWS Console:

  1. Open the EC2 Console.
  2. Click Instances in the left sidebar and find your instance.
  3. Click the Security tab at the bottom.
  4. Click the security group link.
  5. Make sure there are inbound rules allowing:
    • HTTP on port 80 from 0.0.0.0/0
    • HTTPS on port 443 from 0.0.0.0/0

If these rules are missing, click Edit inbound rules and add them.

Make sure your app listens on 0.0.0.0 and reads the port from the environment (e.g., process.env.PORT). Apps that listen on localhost or 127.0.0.1 will reject external traffic.

ECS with Fargate runs your app in a container without managing any servers. Zynnode creates the ECS service, task definition, and load balancer automatically.

What Happens During Deployment

  1. Zynnode builds a container image from your app.
  2. The image is pushed to Amazon Elastic Container Registry (ECR) in your AWS account.
  3. An ECS service is created (or updated) with a Fargate launch type.
  4. A load balancer is configured in front of the service.
  5. Your app is accessible at the load balancer URL.

After Deployment

  • Your app runs in a container with automatic health checks.
  • ECS can scale your app up or down based on demand.
  • Subsequent deploys build a new container image and update the ECS service with zero downtime.

Things to Check in AWS

If the deployment succeeds but the app isn't reachable:

  1. Open the ECS Console.
  2. Click your cluster, then click your service.
  3. Check the Tasks tab — make sure there's at least one task in RUNNING state.
  4. If tasks keep restarting, check the Logs tab for crash details.

The most common issue is a health check failure — make sure your app returns a 200 response on the path / (or configure the health check path in the target group settings).

Lambda is AWS's serverless platform. Your app runs as a function that spins up on each request and scales automatically.

What Happens During Deployment

  1. Zynnode runs your build command and packages the output.
  2. The package is uploaded to AWS Lambda.
  3. An API Gateway is configured to route HTTP requests to your function.
  4. Your app is accessible via the API Gateway URL.

After Deployment

  • You only pay for the time your function is actually running.
  • Lambda handles scaling automatically — from zero to thousands of concurrent requests.
  • Cold starts may add a small delay to the first request after a period of inactivity.

Good to Know

  • Lambda works best for lightweight APIs and serverless functions.
  • If your app has a long startup time or uses WebSockets, consider EC2 or ECS instead.
  • Make sure your app reads the port from the environment — Lambda's runtime provides this.

Common Tips for All AWS Targets

  • Environment variables: Set them in the Zynnode dashboard under your project settings. They're injected during the build and/or runtime depending on your target. See Environment Variables.
  • Custom domains: Once your deployment is live, you can add a custom domain through the Zynnode dashboard.
  • Build failures: If your deployment fails during the build step, the issue is usually in your build command or missing dependencies. Check the build logs in your Zynnode dashboard. For provider-specific errors, see Troubleshooting.
Was this page helpful?