- how to create a brand new Webiny project
- how to deploy it to your AWS account
Before proceeding, make sure you have the following:
- Node.js >=14
- Node.js versions 14 or greater
- If you don’t have Node.js installed, the easiest way to install it is by downloading the official binary
- yarn ^1.22.0 || >=2
- AWS account and user credentials
- in order to deploy Webiny, you must have a valid AWS account and user credentials set up on your system
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:
From there, follow the on-screen setup instructions, which includes answering a couple of project-related questions, and doing your first deployment.
Webiny supports two storage types at the moment: DynamoDB and DynamoDB+Elasticsearch. Choose which ever suits your needs more. Please, keep reading to find out more about the storage types…
- DynamoDB + Elasticsearch
As noted, this option should be used if you intend to have a small to medium size project: up to a few hundred (even thousands) records, per application, in the database.
Because the DynamoDB does not provide advanced filtering or sorting we had to implement our own.
Basically, we load the smallest amount of records possible from the DynamoDB and then perform filtering and sorting in the code to lower the DynamoDB cost. Unfortunately, it might happen that we load all the records from a certain application, depending on the filtering applied, but generally that will not be the case.
Once your new project has been created, it’s time to deploy it into your AWS account.
To do that, in your terminal, navigate to your project folder, and run the following command:
By executing this command, all of the project applications will first get built, and, along with needed cloud infrastructure resources, deployed into your AWS account.
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.
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.
yarn webiny info command in your Webiny project folder will give you all of the relevant project URLs.
yarn webiny disable-telemetry.
Deploying my project takes a long time to finish.
We’re aware of this fact, and this is mainly because of the Amazon Elasticsearch Service. While other cloud infrastructure resources get deployed reasonably fast, this service can take anywhere from 15 to 30 minutes to become ready.
Unfortunately, this is a well-known issue for quite some time, and until the present, there haven’t been any positive improvements.
SubscriptionRequiredException: 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:
The following are some of the reasons why you might be receiving this error:
- you didn’t verify your phone number
- you didn’t verify your payment method
- you didn’t select a support subscription (free or other)
- if you created a brand new AWS account, it wasn’t yet processed on the AWS side
The account signup and verification process can be completed via https://portal.aws.amazon.com/billing/signup?type=resubscribe#/resubscribed.
Pulumi is throwing a
There could be various reasons why this error was thrown. But, if deploying from a Windows machine, we’ve seen that it could be
caused by an anti-virus software that you might have installed on your machine. Our suggestion is to try to temporary disable it and see if that produces any positive outcome.
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:
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:
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.