Skip to content

Latest commit

 

History

History
55 lines (37 loc) · 2.54 KB

File metadata and controls

55 lines (37 loc) · 2.54 KB

Install

This section supposes that you already have an active AWS account.

Requirements

Change the project general settings

If you only want to run the example, you can skip this section.

If you want to take is as an example to start your own projet,

  • Go to the shared configuration file;
  • Change the projectName variable to the name of your project (note that this name must not be too long);
  • Change the dev profile name to one that suits you;
  • Search and replace "sls-monorepo" and replace it with the same project name

Install modules

  • nvm use: use the version of node set in .nvmrc;
  • yarn: install node dependencies in all packages;
  • yarn package: compile the common packages;
  • yarn upgrade-interactive --latest in order to bump all dependencies to their latest version. Be careful as it may introduce breaking changes;

Test the installation

At the root of the project:

  • yarn test:all

Configure the deploy user

In order to deploy the stack on a development environment, you will need to setup a user on the stack.

⚠️ This step is only for the development environment.

  • Head to the IAM console;
  • Add a new user, give it a name;
  • In "AWS access type", select "Programmatic access", then click on "Next: permissions";
  • Click on the "Attach existing policy directly", then select "AdministratorAccess" and click on "Next: tags";
  • Click "Next: review", then "Create user";
  • Do not close the window yet;
  • Open a terminal and run: aws configure --profile <your-profile> (the value of <your-profile> depends of your choice in the personalisation section. By default it will be sls-monorepo-developer);
  • Fill in the Access Key Id and the Secret Access Key from your user;
  • For the region, use the AWS region chosen for your project. See the list of AWS regions.

Deploy the stacks

At the root of the project, run yarn deploy. This will compile and deploy all the stacks in order. You can follow the creation of the stacks on the Cloudformation console