AWS Amplify Console User Guide
Total Page:16
File Type:pdf, Size:1020Kb
AWS Amplify Console User Guide AWS Amplify: Console User Guide Copyright © Amazon Web Services, Inc. and/or its affiliates. All rights reserved. AWS Amplify Console User Guide Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon. AWS Amplify Console User Guide Table of Contents What is the AWS Amplify Console? ...................................................................................................... 1 Amplify Console features ............................................................................................................ 1 Getting started .......................................................................................................................... 2 Getting started with hosting ............................................................................................... 2 Getting started with the Admin UI ....................................................................................... 2 Modern SPA web applications ...................................................................................................... 2 Getting started .................................................................................................................................. 3 Step 1: Connect repository .......................................................................................................... 4 Step 2a: Confirm build settings for the front end ........................................................................... 5 Step 2b: Confirm build settings for the backend ............................................................................ 6 Step 2c: Add environment variables (optional) ............................................................................... 7 Step 3: Save and deploy ............................................................................................................. 7 Next steps ................................................................................................................................. 8 Getting started with fullstack deployments ........................................................................................... 9 Step 1: Deploy a fullstack sample ................................................................................................ 9 Step 2: Explore the fullstack app ................................................................................................ 10 Step 3: Add a GraphQL backend ................................................................................................ 12 Next steps: Set up feature branch deployments ........................................................................... 13 Server-side rendering (SSR) ............................................................................................................... 14 What is server-side rendering .................................................................................................... 14 Amplify support for Next.js SSR ................................................................................................. 14 Pricing for Next.js SSR apps ............................................................................................... 15 Deploying a Next.js SSR app with Amplify ................................................................................... 15 Package.json file settings .................................................................................................. 15 Amplify build settings ....................................................................................................... 15 Adding SSR functionality to a static Next.js app ........................................................................... 16 Add a service role ............................................................................................................ 17 Update build settings ....................................................................................................... 17 Update the package.json file .............................................................................................. 17 Updating the Next.js version for an existing app .......................................................................... 18 Troubleshooting SSR deployment issues ...................................................................................... 18 Your output directory is overridden .................................................................................... 18 You get a 404 error after deploying your SSR site ................................................................ 19 Your app is missing the rewrite rule for CloudFront SSR distributions ...................................... 19 Your app is too large to deploy .......................................................................................... 19 Your app has both SSR and SSG branches ........................................................................... 20 Your app stores static files in a folder with a reserved path .................................................... 20 Your app has reached a CloudFront limit ............................................................................. 20 Access control isn't available for your app ........................................................................... 20 Your Next.js app uses unsupported features ........................................................................ 20 Unsupported Regions ........................................................................................................ 20 Set up custom domains .................................................................................................................... 21 Understanding DNS terminology and concepts ............................................................................. 21 DNS terminology .............................................................................................................. 21 DNS verification ............................................................................................................... 22 Amplify Console custom domain setup ............................................................................... 22 Add a custom domain managed by Amazon Route 53 ................................................................... 23 Add a custom domain managed by a third-party DNS provider ...................................................... 24 Add a custom domain managed by GoDaddy ............................................................................... 26 Add a custom domain managed by Google Domains ..................................................................... 29 Manage subdomains ................................................................................................................. 30 To add a subdomain only .................................................................................................. 30 To add a multilevel subdomain .......................................................................................... 31 To add or edit a subdomain .............................................................................................. 31 iii AWS Amplify Console User Guide Set up automatic subdomains for a Amazon Route 53 custom domain ............................................ 31 Web previews with subdomains ......................................................................................... 32 Troubleshooting custom domains ............................................................................................... 32 How do I verify that my CNAME resolves? ........................................................................... 32 My domain hosted with a third-party is stuck in the Pending Verification state ......................... 33 My domain hosted with Amazon Route 53 is stuck in the Pending Verification state ................... 33 I get a CNAMEAlreadyExistsException error .......................................................................... 34 Configuring build settings ................................................................................................................. 35 Build specification YAML syntax ................................................................................................. 35 Branch-specific build settings ..................................................................................................... 36 Navigating to a subfolder .......................................................................................................... 37 Deploying the backend with the front end .................................................................................. 37 Setting the output folder .......................................................................................................... 37 Installing packages as part of a build ......................................................................................... 38 Using a private npm registry ..................................................................................................... 38 Installing OS packages .............................................................................................................