How to do it...

  1. Create the source and recovery projects from the following templates:
$ sls create --template-url https://github.com/danteinc/js-cloud-native-cookbook/tree/master/ch5/dr/recovery-account --path cncb-dr-recovery-account$ sls create --template-url https://github.com/danteinc/js-cloud-native-cookbook/tree/master/ch5/dr/src1-account --path cncb-dr-src1-account
  1. Navigate to the cncb-dr-recovery-account directory with cd cncb-dr-recovery-account.
  2. Review the file named serverless.yml with the following content:
service: cncb-dr-recovery-accountprovider:  name: aws  # cfnRole: arn:aws:iam::<account-number>:role/${opt:stage}-cfnRolecustom:  accounts:    src1:      accountNumber: '#{AWS::AccountId}' # using same account to simplify recipe

Get JavaScript Cloud Native Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.