How to Deploy on AWS w/ Amplify?
AWS stands for Amazon Web Services.
The AWS Amplify Console is a static web hosting service. Hosting a static generated Nuxt app on AWS w/ the Amplify Console is powerful and cheap.
First, push your Nuxt app to the Git provider of your choice. Then, visit the Amplify Console. Click the GET STARTED button under the Deploy header if you haven't used Amplify Hosting before, otherwise click the Connect App button.
From your existing code
On the "From your existing code" page, select your Git provider and click Continue.
Add repository branch
On the "Add repository branch" page, select your repository and the branch you want to deploy. Then, click Next.
Configure build settings
On the "Configure build settings" page, click the
Edit button under the "Build and test settings". Change the following:
- Set the build commands to
npm run generate.
- Set the
baseDirectorylocation to be
The settings should look like this once you are done editing them:
version: 1 frontend: phases: preBuild: commands: - yarn install build: commands: - npm run generate artifacts: # IMPORTANT - Please verify your build output directory baseDirectory: dist files: - '**/*' cache: paths: - node_modules/**/*
Then, click Save and Next.
On the review page, click Save and deploy.
Then, your application will deploy. This may take a few minutes.
Verify are green, click on the URL that the Amplify Console provides to view your site.