Install Webiny

WHAT YOU’LL LEARN
  • how to create a brand new Webiny project
  • how to deploy it to your AWS account

Prerequisites

Before proceeding, make sure you have the following:

Node.js >= 12.0.0

yarn < 2.0

AWS account and configured credentials

  • With the mentioned software, you also must have a valid AWS Account and user credentials set up on your system. Please follow this guide if you need assistance in that regard.

Project setup

Once you have all the prerequisites in place, we recommend creating a new Webiny project using create-webiny-project - a tool that sets everything up automatically for you. So, in your terminal of choice, run the following command:

npx [email protected] my-new-project --tag beta

From there, follow the on-screen setup instructions, which includes answering a couple of project-related questions, and doing your first deployment.

VPC or no-VPC - what should you choose?

During the setup, one of the questions that shows up is should your new project be deployed in a Virtual Private Cloud (VPC) or not. The answer to that question depends on your needs.

If you're deploying this for development purposes, or you're working on a project prototype, it's reasonable to use a non-VPC deployment. This is because all of the cloud resources that are needed for this setup are free-tier eligible. And, having a bit less secure system probably doesn't impose a problem at this point in time.

On the other hand, if we're talking about production deployment, then deploying resources inside of a VPC is recommended. Although this does incur a cost, it significantly improves your project's security posture.

Still not sure?

If you're still not sure what to choose, go for the no-VPC setup. If needed, you can still do the switch down the road.

Cloud Infrastructure

Learn what gets deployed into the cloud (your AWS account) and how it all works in the Cloud Infrastructure key topics section.

First deployment

Once your new project has been created, it's time to deploy it to your AWS account.

To do that, in your terminal, navigate to your project folder, and run the following command:

yarn webiny deploy

This builds all the code and deploys it to your AWS account, along with the necessary cloud infrastructure resources.

Note that the first deployment can take up to 20 minutes! So, even though it might look nothing is happening in the terminal, please be patient and let the process finish. If something went wrong, an error will be shown.

What is deployed into my AWS account?

To learn more about the cloud architecture and the resources that are deployed into your AWS account, click here.

Finally, once the deployment has been done, you are presented with the URL over which you can access your Admin Area, and finish the installation.

Misplaced Admin area URL?

Running the yarn webiny info command in your Webiny project folder will give you all of the relevant project URLs.

Troubleshooting

The AWS Access Key Id needs a subscription for the service

In some cases, upon deploying a new Webiny project, it's possible for users to experience the following error being thrown in their terminal:

SubscriptionRequiredException: The AWS Access Key Id needs a subscription for the service

This error can happen if an AWS account was just created. If that's the case, then there needs to pass some time until the account is fully activated on the AWS side. So, the only thing that can be done at this point is simply waiting and trying again later.

Newer Apple M1 devices

If you're using a next-generation Apple M1 device, there is a chance you might run into problems while deploying your new Webiny project. For example:

+ pulumi:pulumi:Stack api-dev creating assertion failed [inst.has_value()]: failed to decode instruction: 0x0

This is probably due to the fact that the underlying software simply isn't ready yet for the new M1-based OS you're running. Based on this article, we've seen that doing the following export does resolve the shown issue in some cases:

export GODEBUG=asyncpreemptoff=1

Please try executing the command in your terminal, and run the deployment again. If this does not help, feel free to ask for additional help.

Last updated on by Adrian Smijulj