Source code location
In a default Landing Zone Accelerator on AWS deployment, CodePipeline retrieves the source code from the solution’s GitHub repository
Follow these instructions to implement this pattern:
-
Create an S3 bucket with versioning enabled. This bucket should be created in the same AWS account and region you plan to deploy the Landing Zone Accelerator on AWS solution.
-
Clone or download the latest release of the Landing Zone Accelerator on AWS source code
. -
Navigate to the source folder:
cd landing-zone-accelerator-on-aws/source
-
Compress the contents of the
source
folder into a new zip archive file. -
Upload the zip archive to the S3 bucket created in Step 1.
-
Install dependencies and build the source code:
yarn install && yarn build
-
Navigate to the installer folder:
cd packages/\@aws-accelerator/installer/
-
Synthesize the installer template by running:
cdk synth -context use-s3-source=true
Note
If your S3 bucket is encrypted with KMS (S3-KMS), you must pass the KMS key ID when synthesizing the template:
cdk synth -context use-s3-source=true --context
s3-source-kms-key-arn=arn:aws:kms:us-east-1:000000000000:key/aaaaaaaa-1111-bbbb-2222-cccccc333333
-
Retrieve the synthesize template named
AWSAccelerator- InstallerStack.template.json
from the cdk.out directory. -
Use this template to create the
AWSAccelerator-Installer
CloudFormation stack in the account and region the S3 bucket was created in. -
The deployment now follows the same process as the standard deployment process with the addition of the following parameters:
-
RepositoryBucketName - The name of the S3 bucket used to contain the source code.
-
RepositoryBucketObject - The S3 object key of the source code uploaded in Step 5.
-
RepositoryBucketKmsKeyArn - (OPTIONAL) The ARN of the KMS key used to encrypt the S3 bucket.
-