1

Currently using the aws console is simple: add repo folder using aws console

But I can't find the way to do it using the CDK.

atoledo
  • 435
  • 5
  • 12

1 Answers1

3

this can be added with the environement variable: AMPLIFY_MONOREPO_APP_ROOT

https://docs.aws.amazon.com/amplify/latest/userguide/environment-variables.html

AMPLIFY_MONOREPO_APP_ROOT

The path to use to specify the app root of a monorepo app, relative to the root of your repository.

apps/react-app

The AMPLIFY_MONOREPO_APP_ROOT environment variable must have the same value as the appRoot key inside the build spec. –

AWS PS
  • 4,420
  • 1
  • 9
  • 22
  • 1
    Thank you. To complement this answer, the AMPLIFY_MONOREPO_APP_ROOT environment variable must have the same value of the ```appRoot``` key inside the build spec. – atoledo Sep 06 '21 at 14:54
  • 1
    Sure, Im adding this to the answer :) – AWS PS Sep 06 '21 at 14:58
  • Just to expand on this, you will need to add your env variables in the `environmentVariables` object within the `amplify.App` third argument. – Josh Nov 30 '22 at 08:10