### Application Configuration Example (YAML) Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_customizations_config.IAppConfigItem An example demonstrating how to configure an application using the `IAppConfigItem` structure in YAML format. This example shows the setup for a two-tier application including network load balancers, application load balancers, autoscaling, and launch templates. ```yaml applications: - name: appA vpc: test1 deploymentTargets: accounts: - Management excludedRegions: - us-east-1 - us-west-2 autoscaling: name: appA-asg-1 maxSize: 4 minSize: 1 desiredSize: 2 launchTemplate: appA-lt healthCheckGracePeriod: 300 healthCheckType: ELB targetGroups: - appA-nlb-tg-1 - appA-alb-tg-1 subnets: - Private-Subnet-A - Private-Subnet-B maxInstanceLifetime: 86400 targetGroups: - name: appA-nlb-tg-1 port: 80 protocol: TCP type: instance connectionTermination: true preserveClientIp: true proxyProtocolV2: true healthCheck: enabled: true port: 80 protocol: TCP - name: appA-alb-tg-1 port: 80 protocol: HTTP type: instance connectionTermination: true preserveClientIp: true proxyProtocolV2: true healthCheck: enabled: true port: 80 protocol: HTTP networkLoadBalancer: name: appA-nlb-01 scheme: internet-facing deletionProtection: false subnets: - Public-Subnet-A - Public-Subnet-B listeners: - name: appA-listener-1 port: 80 protocol: TCP targetGroup: appA-nlb-tg-1 applicationLoadBalancer: name: appA-alb-01 scheme: internet-facing subnets: - Public-Subnet-A - Public-Subnet-B securityGroups: - demo-app-sg listeners: - name: appA-listener-2 port: 80 protocol: HTTP targetGroup: appA-alb-tg-1 type: forward launchTemplate: name: appA-lt blockDeviceMappings: - deviceName: /dev/xvda ebs: deleteOnTermination: true encrypted: true kmsKeyId: key1 - deviceName: /dev/xvdb ebs: deleteOnTermination: true encrypted: true - deviceName: /dev/xvdc ebs: deleteOnTermination: true securityGroups: - demo-app-sg iamInstanceProfile: EC2-Default-SSM-AD-Role imageId: ${ACCEL_LOOKUP::ImageId:/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2} instanceType: t3.large userData: appConfigs/appA/launchTemplate/userData.sh ``` -------------------------------- ### Module Implementation Example (TypeScript) Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/developer-guide/module-development/module-naming-and-scope Provides an example of implementing the module interface, specifically for the Setup Landing Zone functionality. It shows the class structure and the implementation of the handler method. ```typescript // lib/control-tower/setup-landing-zone/index.ts export class SetupLandingZoneModule implements ISetupLandingZoneModule { public async handler( props: ISetupLandingZoneHandlerParameter ): Promise { // Implementation logic } } ``` -------------------------------- ### Central Network Services Configuration Example Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_lib_models_network_config.ICentralNetworkServicesConfig Provides an example of how to configure central network services, specifying a delegated admin account and detailing configurations for Route 53 Resolver query logs. This example demonstrates setting up centralized networking resources and their destinations. ```yaml centralNetworkServices: delegatedAdminAccount: Network gatewayLoadBalancers: [] ipams: [] networkFirewall: firewalls: [] policies: [] rules: [] route53Resolver: endpoints: [] firewallRuleGroups: [] queryLogs: name: accelerator-query-logs destinations: - cloud-watch-logs - s3 shareTargets: organizationalUnits: - Root ``` -------------------------------- ### Example Configuration for Get CloudFormation Templates (JSON) Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_accelerator_dist_packages__aws_lza_interfaces_aws_cloudformation_get_cloudformation_templates.IGetCloudFormationTemplatesHandlerParameter Provides an example JSON object illustrating the structure of the 'configuration' property for the IGetCloudFormationTemplatesHandlerParameter. This configuration specifies details like the stack prefix, directory for templates, roles to assume, and environment-specific account and region information. ```json { "stackPrefix": "AWSAccelerator-NetworkVpc", "directory": "./", "roleNameToAssume": "AWSControlTowerExecution", "centralAccountId": "111111111111", "environments": [ { "accountId": "222222222222", "region": "us-east-1" } ] } ``` -------------------------------- ### Example: acceleratorSettings Configuration Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_global_config.IGlobalConfig Example of how to configure accelerator settings. ```APIDOC ## `Optional` `Readonly` acceleratorSettings ### Description Accelerator Settings Configuration. Allows setting additional properties for accelerator. ### Example ```yaml acceleratorSettings: maxConcurrentStacks: 250 ``` ``` -------------------------------- ### Configuration Example for Get CloudFormation Templates Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_modules_dist_packages__aws_lza_interfaces_aws_cloudformation_get_cloudformation_templates.IGetCloudFormationTemplatesHandlerParameter Provides an example of the configuration object required for the get CloudFormation templates operation. It specifies stack prefixes, directories, roles to assume, account details, and environments. ```json { stackPrefix: 'AWSAccelerator-NetworkVpc', directory: './', roleNameToAssume: 'AWSControlTowerExecution', centralAccountId: '111111111111', environments: [ { accountId: '222222222222', region: 'us-east-1' } ... ] } ``` -------------------------------- ### Example: backup Configuration Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_global_config.IGlobalConfig Example of how to configure backup vaults. ```APIDOC ## `Optional` `Readonly` backup ### Description Backup Vaults Configuration. To generate vaults, you need to provide below value for this parameter. ### Example ```yaml backup: vaults: - name: MyBackUpVault deploymentTargets: organizationalUnits: - Root ``` ``` -------------------------------- ### Stack Deployment Examples Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_accelerator_lib_stacks_v2_network_utils_types.V2NetworkStacksBaseProps Examples demonstrating how to deploy stacks with different environment configurations using the AWS CDK. ```APIDOC ## Stack Deployment Examples ### Deploying a Stack to a Concrete Account and Region ```typescript // Use a concrete account and region to deploy this stack to: // `.account` and `.region` will simply return these values. new Stack(app, 'Stack1', { env: { account: '123456789012', region: 'us-east-1' }, }); ``` ### Deploying a Stack Using CLI Credentials ```typescript // Use the CLI's current credentials to determine the target environment: // `.account` and `.region` will reflect the account+region the CLI // is configured to use (based on the user CLI credentials) new Stack(app, 'Stack2', { env: { account: process.env.CDK_DEFAULT_ACCOUNT, region: process.env.CDK_DEFAULT_REGION }, }); ``` ### Defining Multiple Stacks with a Stage ```typescript // Define multiple stacks stage associated with an environment const myStage = new Stage(app, 'MyStage', { env: { account: '123456789012', region: 'us-east-1' } }); // both of these stacks will use the stage's account/region: // `.account` and `.region` will resolve to the concrete values as above new MyStack(myStage, 'Stack1'); new YourStack(myStage, 'Stack2'); ``` ### Defining an Environment-Agnostic Stack ```typescript // Define an environment-agnostic stack: // `.account` and `.region` will resolve to `{ "Ref": "AWS::AccountId" }` and `{ "Ref": "AWS::Region" }` respectively. // which will only resolve to actual values by CloudFormation during deployment. new MyStack(app, 'Stack1'); ``` ### Default Environment Behavior - The environment of the containing `Stage` if available, otherwise the stack will be environment-agnostic. ``` -------------------------------- ### Example: cdkOptions Configuration Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_global_config.IGlobalConfig Example of how to configure AWS CDK options. ```APIDOC ## `Optional` `Readonly` cdkOptions ### Description AWS CDK options configuration. This lets you customize the operation of the CDK within LZA, specifically: * `centralizeBuckets`: Enabling this option modifies the CDK bootstrap process to utilize a single S3 bucket per region located in the management account for CDK assets generated by LZA. Otherwise, CDK will create a new S3 bucket in every account and every region supported by LZA. * `useManagementAccessRole`: Enabling this option modifies CDK operations to use the IAM role specified in the `managementAccountAccessRole` option in `global-config.yaml` rather than the default roles created by CDK. Default CDK roles will still be created, but will remain unused. Any stacks previously deployed by LZA will retain their associated execution role. For more information on these roles, please see [here](https://aws.github.io/aws-solutions/landing-zone-accelerator-on-aws/reference/global-config/#cdkoptions). ### Example ```yaml cdkOptions: centralizeBuckets: true useManagementAccessRole: true ``` ``` -------------------------------- ### Transit Gateway Configuration Example - Basic Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_network_config.ITransitGatewayConfig This example demonstrates the basic configuration for a Transit Gateway (TGW) named 'Network-Main'. It specifies the account, region, ASN, and enables DNS and VPN ECMP support. Share targets and route tables are left empty in this basic setup. ```yaml transitGateways: - name: Network-Main account: Network region: us-east-1 shareTargets: organizationalUnits: [] asn: 65000 dnsSupport: enable vpnEcmpSupport: enable defaultRouteTableAssociation: disable defaultRouteTablePropagation: disable autoAcceptSharingAttachments: enable routeTables: tags: [] ``` -------------------------------- ### Run CDK Synthesis for Installer Stack Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/installation Performs a CDK synthesis to generate the CloudFormation template for the Installer stack. Requires NodeJS, AWS CDK, Yarn, and AWS CLI to be installed. Runs from the installer package directory. ```bash cd /source/packages/@aws-accelerator/installer yarn build && yarn cdk synth ``` -------------------------------- ### Example: acceleratorMetadata Configuration Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_global_config.IGlobalConfig Example of how to configure accelerator metadata. ```APIDOC ## `Optional` `Readonly` acceleratorMetadata ### Description Accelerator Metadata Configuration. Creates a bucket in the logging account to enable accelerator metadata collection. ### Example ```yaml acceleratorMetadata: enable: true account: Logging ``` ``` -------------------------------- ### Example INetworkInterfaceItem Configuration (YAML) Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_customizations_config.INetworkInterfaceItem An example of how to configure network interface parameters using YAML, demonstrating the use of deleteOnTermination, description, deviceIndex, groups, and subnetId. ```yaml networkInterfaces: - deleteOnTermination: true description: secondary network interface deviceIndex: 1 groups: # security group is from network-config.yaml under the same vpc - SharedServices-Main-sg # subnet is from network-config.yaml under the same vpc subnetId: SharedServices-App-A ``` -------------------------------- ### Backup Vaults Configuration - Example Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_global_config.IGlobalConfig Provides an example of how to configure backup vaults. It shows how to specify the vault name and the deployment targets using organizational units. ```YAML backup: vaults: - name: MyBackUpVault deploymentTargets: organizationalUnits: - Root ``` -------------------------------- ### Example IEbsItem Configuration (YAML) Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_customizations_config.IEbsItem An example demonstrating how to configure an EBS volume using the IEbsItem properties within a block device mapping. This example specifies the device name and EBS volume attributes like deleteOnTermination, encrypted, and kmsKeyId. ```yaml - deviceName: /dev/xvda ebs: deleteOnTermination: true encrypted: true kmsKeyId: key1 ``` -------------------------------- ### SSM Inventory Configuration Example Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_global_config.ISsmInventoryConfig An example configuration block for enabling SSM Inventory and defining deployment targets using organizational units. ```YAML ssmInventoryConfig: enable: true deploymentTargets: organizationalUnits: - Infrastructure ``` -------------------------------- ### Resource Control Policy Configuration Example Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_organization_config.IOrganizationConfig Example for setting up resource control policies, such as restricting access to only HTTPS connections. ```yaml resourceControlPolicies: - name: ResrictHttpsConnection description: Restrict access to only HTTPS connections to your resources policy: resource-control-policies/restrict-https-connections.json ``` -------------------------------- ### Example Product Support Configuration (YAML) Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_customizations_config.IProductSupportConfig Provides an example of how to configure product support details in YAML format. This configuration includes a description, email address, and URL for customer support. ```yaml description: Product support details email: support@example.com url: support.example.com ``` -------------------------------- ### Example Configuration for OU Detail Retrieval Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_accelerator_dist_packages__aws_lza_interfaces_aws_organizations_get_organizational_units_detail.IGetOrganizationalUnitsDetailHandlerParameter An example of the configuration object required for the get organizational units detail handler. This example shows how to enable AWS Control Tower. ```json { enableControlTower: true } ``` -------------------------------- ### MkDocs Local Development Server Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/developer-guide/doc-guidelines Instructions for running a local development server to test documentation changes for the Landing Zone Accelerator on AWS project. This requires Python, MkDocs, and the MkDocs Material theme installed. ```bash mkdocs serve ``` -------------------------------- ### Define VPC Gateway Endpoint Service Configuration (YAML Example) Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_network_config.IGatewayEndpointServiceConfig Example demonstrating how to define service and endpoint policy for gateway endpoints using YAML configuration. This configuration is part of the network setup for AWS. ```yaml - service: s3 policy: Default ``` -------------------------------- ### IProductConfig Interface and Example Configuration Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_lib_models_customizations_config.IProductConfig Defines the structure for Service Catalog Product configurations, including name, description, owner, versions, and constraints. An example demonstrates how to define a product with its versions and constraints. ```yaml - name: Product01 description: Example product owner: Product-Owner versions: - name: v1 description: Product version 1 template: path/to/template.json constraints: launch: type: localRole | Role role: string tagUpdate: true | false notifications: - topicName ``` ```typescript interface IProductConfig { constraints?: IProductConstraintConfig; description?: string; distributor?: string; name: string; owner: string; support?: IProductSupportConfig; tagOptions?: ITagOptionsConfig[]; versions: IProductVersionConfig[]; } ``` -------------------------------- ### Example VPC Gateway Endpoint Configuration Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_network_config.IGatewayEndpointConfig An example demonstrating how to configure a default policy for gateway endpoints. This configuration is part of the network setup within the AWS Landing Zone Accelerator. ```yaml defaultPolicy: Default endpoints: [] ``` -------------------------------- ### Configuration Example for CloudFormation Templates Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_lza_dist_interfaces_aws_cloudformation_get_cloudformation_templates.IGetCloudFormationTemplatesHandlerParameter An example demonstrating the structure of the configuration object required by IGetCloudFormationTemplatesHandlerParameter. This includes stack prefixes, deployment directories, roles to assume, account IDs, and regional configurations for environments. ```json { stackPrefix: 'AWSAccelerator-NetworkVpc', directory: './', roleNameToAssume: 'AWSControlTowerExecution', centralAccountId: '111111111111', environments: [ { accountId: '222222222222', region: 'us-east-1' } ] } ``` -------------------------------- ### Example ISetupLandingZoneConfiguration (TypeScript) Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_accelerator_dist_packages__aws_lza_interfaces_control_tower_setup_landing_zone.ISetupLandingZoneHandlerParameter Provides an example configuration object for setting up an AWS Landing Zone. This includes specifying enabled regions, logging configurations (like trail and retention periods), security settings, and details for shared accounts (management, logging, audit). ```typescript { version: '1.3.0', enabledRegions: ['us-east-1', 'us-west-2'], logging: { organizationTrail: true, retention: { loggingBucket: 30, accessLoggingBucket: 30, }, }, security: { enableIdentityCenterAccess: true, }, sharedAccounts: { management: { name: 'Management', email: 'management@example.com', }, logging: { name: 'Logging', email: 'logging@example.com', }, audit: { name: 'Audit', email: 'audit@example.com', }, }, } ``` -------------------------------- ### Example VPN Configuration for VPC (YAML) Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_network_config.IVpnConnectionConfig Defines a Site-to-Site VPN connection terminating at a VPC. This example illustrates the setup for connecting a VPC to an on-premises network, including optional tunnel details. ```yaml - name: accelerator-vpn vpc: Inspection-Vpc staticRoutesOnly: false # Tunnel specifications are optional -- additional tunnel options available in configuration reference tunnelSpecifications: - tunnelInsideCidr: 169.254.200.0/30 preSharedKey: Key1-AbcXyz - tunnelInsideCidr: 169.254.200.100/30 preSharedKey: Key1-AbcXyz ``` -------------------------------- ### Direct Connect Virtual Interface Configuration Example Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_network_config.IDxVirtualInterfaceConfig Example YAML configuration for creating a transit VIF (virtual interface) to a DX Gateway. This setup enables on-premises access to AWS services. ```yaml - name: Accelerator-VIF region: us-east-1 connectionId: dxcon-example customerAsn: 64512 interfaceName: Accelerator-VIF ownerAccount: Network type: transit vlan: 100 ``` -------------------------------- ### Product Version Configuration Example (YAML) Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_customizations_config.IProductVersionConfig An example demonstrating how to define product version configurations in YAML format. This includes specifying the name, description, and the path to the product template. ```yaml - name: v1 description: Product version 1 template: path/to/template.json ``` -------------------------------- ### Route 53 Resolver Configuration Example Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_network_config.IResolverConfig Example demonstrating how to configure Route 53 Resolver endpoints, DNS firewall rule groups, and query logs. This configuration is part of the network setup for AWS resources. ```yaml route53Resolver: endpoints: - name: accelerator-outbound type: OUTBOUND vpc: Network-Endpoints allowedCidrs: - 10.0.0.0/16 subnets: - Subnet-A - Subnet-B rules: [] tags: [] firewallRuleGroups: - name: accelerator-rule-group regions: - us-east-1 rules: - name: accelerator-dns-rule action: BLOCK priority: 100 blockResponse: NXDOMAIN customDomainList: path/to/domains.txt shareTargets: organizationalUnits: - Root tags: [] queryLogs: name: accelerator-query-logs destinations: - s3 - cloud-watch-logs shareTargets: organizationalUnits: - Root ``` -------------------------------- ### Chatbot Policy Configuration Example Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_organization_config.IOrganizationConfig Example showing how to set up chatbot policies, including policy name, description, policy file path, and deployment targets within the organization. ```yaml chatbotPolicies: - name: ChatbotPolicy description: Organization Chatbot Policy policy: chatbot-policies/org-chatbot-policy.json deploymentTargets: organizationalUnits: - Root ``` -------------------------------- ### Get Central Endpoint VPC Configuration Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/classes/___packages__aws_accelerator_accelerator_dist_packages__aws_accelerator_accelerator_lib_stacks_organizations_stack.OrganizationsStack Retrieves the VPC configuration for the central endpoint. This protected function returns a VpcConfig object, essential for network setup. ```typescript getCentralEndpointVpc(): VpcConfig ``` -------------------------------- ### Enable GuardDuty S3 Protection Example Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_security_config.IGuardDutyS3ProtectionConfig A sample configuration demonstrating how to enable AWS GuardDuty S3 Protection. This example sets 'enable' to true and leaves 'excludeRegions' empty, meaning S3 Protection will be active across all available regions. This is a basic setup for activating the security feature. ```yaml enable: true excludeRegions: [] ``` -------------------------------- ### Example Configuration for Inviting an Account Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_lza_interfaces_aws_organizations_invite_account_to_organization.IInviteAccountToOrganizationHandlerParameter Provides an example of the configuration object required for the 'configuration' property. This includes the target account's email, account ID, and optional tags to be applied. ```json { email: 'account@example.com', accountId: 'XXXXXXXXX', tags: [ { Key: 'tag1', Value: 'value1', }, { Key: 'tag2', Value: 'value2', }, ], } ``` -------------------------------- ### ISetupLandingZoneConfiguration Interface Example (TypeScript) Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_accelerator_dist_packages__aws_lza_interfaces_control_tower_setup_landing_zone.ISetupLandingZoneConfiguration An example demonstrating the structure of the ISetupLandingZoneConfiguration interface. This interface defines the essential inputs required for the AWS Control Tower Landing Zone setup API operation, covering regional enablement, logging, security, and shared account configurations. ```typescript interface ISetupLandingZoneConfiguration { enabledRegions: string[]; logging: { organizationTrail: boolean; retention: { accessLoggingBucket: number; loggingBucket: number; }; }; security: { enableIdentityCenterAccess: boolean; }; sharedAccounts: { audit: ISharedAccountDetails; logging: ISharedAccountDetails; management: ISharedAccountDetails; }; version: string; } ``` -------------------------------- ### SetupLandingZoneModule API Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/classes/___packages__aws_accelerator_modules_dist_packages__aws_lza_lib_control_tower_setup_landing_zone.SetupLandingZoneModule Provides functionality to manage AWS Control Tower Landing Zone operations, including setup, update, and reset. ```APIDOC ## POST /setup-landing-zone ### Description Handler function to manage AWS Control Tower Landing Zone. This function performs pre-requisites and creates the landing zone if not configured. If configured, it updates the landing zone based on global config. It also resets the landing zone if it's drifted. ### Method POST ### Endpoint /setup-landing-zone ### Parameters #### Request Body - **props** (ISetupLandingZoneHandlerParameter) - Required - Parameters for the setup landing zone handler. ### Request Example ```json { "props": { "controlTower": { "landingZone": { "accountEmail": "org-admin@example.com", "organizationalUnits": [ { "name": "Sandbox" } ] } } } } ``` ### Response #### Success Response (200) - **status** (string) - The status of the landing zone operation. #### Response Example ```json { "status": "Landing Zone setup complete." } ``` ``` -------------------------------- ### Example: Disable AWS KMS CMK for S3 Encryption Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_global_config.IS3GlobalConfig An example demonstrating how to disable the creation of AWS KMS Customer Master Keys (CMKs) for S3 bucket encryption using the IS3GlobalConfig interface. Note that CMKs are still mandatory for installer, pipeline, and central logs buckets. ```yaml s3: encryption: createCMK: false deploymentTargets: organizationalUnits: - Root ``` -------------------------------- ### Control Tower Landing Zone Configuration Example Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/classes/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_global_config.ControlTowerLandingZoneConfig An example configuration block for setting up AWS Control Tower Landing Zone. This includes parameters for version, logging settings like bucket retention days and organization trail, and security settings such as enabling identity center access. ```yaml landingZone: version: '3.3' logging: loggingBucketRetentionDays: 365 accessLoggingBucketRetentionDays: organizationTrail: true security: enableIdentityCenterAccess: true ``` -------------------------------- ### Example Configuration: Quarantine New Accounts (YAML) Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_organization_config.IQuarantineNewAccountsConfig An example demonstrating how to enable and configure the quarantine policy for new accounts. This configuration snippet shows the 'enable' flag and the 'scpPolicyName' to be applied. ```yaml quarantineNewAccounts: enable: true scpPolicyName: QuarantineAccounts ``` -------------------------------- ### Get Accelerator Module Runner Parameters Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/functions/___packages__aws_accelerator_modules_lib_functions.getAcceleratorModuleRunnerParameters Retrieves the necessary parameters to run an accelerator module. This function is essential for configuring and executing various aspects of the AWS landing zone setup. ```APIDOC ## Function getAcceleratorModuleRunnerParameters ### Description Function to get accelerator module runner parameters. This function is crucial for initializing and running accelerator modules within the AWS environment. ### Method GET (Conceptual - as this is a function call, not a REST endpoint) ### Endpoint N/A (Internal function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "configDirPath": "/path/to/config", "partition": "aws-cn", "resourcePrefixes": { "account": "acc-", "vpc": "vpc-" }, "solutionId": "lz-accel-" } ``` ### Response #### Success Response (200) - **AcceleratorModuleRunnerParametersType** (object) - An object containing all parameters required for the accelerator module runner. #### Response Example ```json { "parameters": { "region": "us-east-1", "account_id": "123456789012", "s3_bucket_name": "my-landing-zone-bucket" } } ``` ``` -------------------------------- ### Example Port Range Configuration for Network Firewall Rule Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_network_config.INfwRuleSourceStatelessPortRangeConfig This is an example YAML snippet demonstrating how to define a port range for a stateless rule in AWS Network Firewall. It specifies a single port (22) for both the start and end of the range, indicating that traffic on port 22 should be matched. ```yaml - fromPort: 22 toPort: 22 ``` -------------------------------- ### IAppConfigItem Interface Definition and Example Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_lib_models_customizations_config.IAppConfigItem Defines the IAppConfigItem interface for application configuration. It includes optional and required properties for setting up applications with various AWS resources like load balancers, autoscaling, and launch templates. The example demonstrates a detailed configuration for an application named 'appA'. ```typescript interface IAppConfigItem { applicationLoadBalancer?: IApplicationLoadBalancerConfig; autoscaling?: IAutoScalingConfig; deploymentTargets: IDeploymentTargets; launchTemplate?: ILaunchTemplateConfig; name: string; networkLoadBalancer?: INetworkLoadBalancerConfig; targetGroups?: ITargetGroupItem[]; vpc: string; } ``` ```yaml applications: - name: appA vpc: test1 deploymentTargets: accounts: - Management excludedRegions: - us-east-1 - us-west-2 autoscaling: name: appA-asg-1 maxSize: 4 minSize: 1 desiredSize: 2 launchTemplate: appA-lt healthCheckGracePeriod: 300 healthCheckType: ELB targetGroups: - appA-nlb-tg-1 - appA-alb-tg-1 subnets: - Private-Subnet-A - Private-Subnet-B maxInstanceLifetime: 86400 targetGroups: - name: appA-nlb-tg-1 port: 80 protocol: TCP type: instance connectionTermination: true preserveClientIp: true proxyProtocolV2: true healthCheck: enabled: true port: 80 protocol: TCP - name: appA-alb-tg-1 port: 80 protocol: HTTP type: instance connectionTermination: true preserveClientIp: true proxyProtocolV2: true healthCheck: enabled: true port: 80 protocol: HTTP networkLoadBalancer: name: appA-nlb-01 scheme: internet-facing deletionProtection: false subnets: - Public-Subnet-A - Public-Subnet-B listeners: - name: appA-listener-1 port: 80 protocol: TCP targetGroup: appA-nlb-tg-1 applicationLoadBalancer: name: appA-alb-01 scheme: internet-facing subnets: - Public-Subnet-A - Public-Subnet-B securityGroups: - demo-app-sg listeners: - name: appA-listener-2 port: 80 protocol: HTTP targetGroup: appA-alb-tg-1 type: forward launchTemplate: name: appA-lt blockDeviceMappings: - deviceName: /dev/xvda ebs: deleteOnTermination: true encrypted: true kmsKeyId: key1 - deviceName: /dev/xvdb ebs: deleteOnTermination: true encrypted: true - deviceName: /dev/xvdc ebs: deleteOnTermination: true securityGroups: - demo-app-sg iamInstanceProfile: EC2-Default-SSM-AD-Role imageId: "${ACCEL_LOOKUP::ImageId:/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2}" instanceType: t3.large userData: appConfigs/appA/launchTemplate/userData.sh ``` -------------------------------- ### ISetupLandingZoneConfiguration Interface Definition and Example Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_lza_dist_interfaces_control_tower_setup_landing_zone.ISetupLandingZoneConfiguration Defines the ISetupLandingZoneConfiguration interface for AWS Control Tower Landing Zone setup and provides a JSON example of its structure. This interface specifies essential inputs for API operations, including enabled regions, logging configurations, security settings, and shared account details. ```typescript interface ISetupLandingZoneConfiguration { enabledRegions: string[]; logging: { organizationTrail: boolean; retention: { accessLoggingBucket: number; loggingBucket: number; }; }; security: { enableIdentityCenterAccess: boolean; }; sharedAccounts: { audit: ISharedAccountDetails; logging: ISharedAccountDetails; management: ISharedAccountDetails; }; version: string; } ``` ```json { "version": "1.3.0", "enabledRegions": ["us-east-1", "us-west-2"], "logging": { "organizationTrail": true, "retention": { "loggingBucket": 30, "accessLoggingBucket": 30 } }, "security": { "enableIdentityCenterAccess": true }, "sharedAccounts": { "management": { "name": "Management", "email": "management@example.com" }, "logging": { "name": "Logging", "email": "logging@example.com" }, "audit": { "name": "Audit", "email": "audit@example.com" } } } ``` -------------------------------- ### Example IAM Role Set Configuration (YAML) Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_iam_config.IRoleSetConfig Illustrates a sample configuration for role sets using YAML syntax. This example specifies deployment targets and defines roles with their assumed-by principals, boundary policies, and managed policies. ```yaml roleSets: - deploymentTargets: organizationalUnits: - Root roles: - name: EC2-Default-SSM-AD-Role assumedBy: - principal: ec2.amazonaws.com type: service boundaryPolicy: Default-Boundary-Policy instanceProfile: true policies: awsManaged: - AmazonSSMManagedInstanceCore - AmazonSSMDirectoryServiceAccess - CloudWatchAgentServerPolicy ``` -------------------------------- ### EC2 Firewall Configuration Example for Autoscaling Groups Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_customizations_config.IEc2FirewallConfig This example illustrates the configuration of EC2 firewall instances within an autoscaling group. It includes autoscaling group settings, launch template details, health check configurations, and target group definitions. This setup ensures high availability and scalability for the firewall. ```yaml autoscalingGroups: - name: accelerator-firewall-asg autoscaling: name: firewall-asg maxSize: 4 minSize: 1 desiredSize: 2 launchTemplate: firewall-lt healthCheckGracePeriod: 300 healthCheckType: ELB targetGroups: - firewall-gwlb-tg subnets: - firewall-subnet-a - firewall-subnet-b maxInstanceLifetime: 86400 launchTemplate: name: firewall-lt blockDeviceMappings: - deviceName: /dev/xvda ebs: deleteOnTermination: true encrypted: true volumeSize: 20 enforceImdsv2: true iamInstanceProfile: firewall-profile imageId: ami-123xyz instanceType: c6i.xlarge networkInterfaces: - deleteOnTermination: true description: Primary interface deviceIndex: 0 groups: - firewall-data-sg - deleteOnTermination: true description: Management interface deviceIndex: 1 groups: - firewall-mgmt-sg userData: path/to/userdata.txt vpc: Network-Inspection targetGroups: - name: firewall-gwlb-tg port: 6081 protocol: GENEVE type: instance healthCheck: enabled: true port: 80 protocol: TCP ``` -------------------------------- ### Configure Target Group Attributes (YAML Example) Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_customizations_config.ITargetGroupAttributeTypes Example demonstrating how to configure attributes for a target group in a YAML format. This configuration applies to Application Load Balancers and Network Load Balancers, specifying settings for deregistration delay, stickiness, algorithm, slow start, and client IP preservation. ```yaml attributes: deregistrationDelay: 1200 stickiness: true # applies to application load balancer stickinessType: app_cookie algorithm: round_robin slowStart: 120 appCookieName: chocolate-chip appCookieDuration: 4800 lbCookieDuration: 4800 # applies to network load balancer connectionTermination: true preserveClientIp: true proxyProtocolV2: true # applies to Gateway Load Balancer targetFailover: rebalance ``` -------------------------------- ### Get IdentityProvider Method (TypeScript) Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_constructs_lib_aws_macie_put_export_config_classification_node_modules__smithy_types_dist_types_auth_IdentityProviderConfig.IdentityProviderConfig Illustrates the getIdentityProvider method within the IdentityProviderConfig interface. This method takes a schemeId string as input and returns an IdentityProvider object or undefined if the scheme is not found, facilitating dynamic authentication setup. ```typescript getIdentityProvider(schemeId: string): undefined | IdentityProvider ``` -------------------------------- ### Configure Launch Template for Application (YAML Example) Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_customizations_config.ILaunchTemplateConfig This YAML example demonstrates how to configure a launch template for an application, specifying details such as block device mappings, security groups, key pairs, instance image ID, instance type, and user data. ```yaml launchTemplate: name: appA-lt blockDeviceMappings: - deviceName: /dev/xvda ebs: deleteOnTermination: true encrypted: true # this kms key is in security-config.yaml under keyManagementService kmsKeyId: key1 securityGroups: # security group is from network-config.yaml under the same vpc - SharedServices-Main-Rsyslog-sg # Key pair should exist in that account and region keyName: keyName # this instance profile is in iam-config.yaml under roleSets iamInstanceProfile: EC2-Default-SSM-AD-Role # Local or public SSM parameter store lookup for Image ID imageId: ${ACCEL_LOOKUP::ImageId:/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2} instanceType: t3.xlarge # IMDSv2 is enabled by default. Disable it by setting this to false. enforceImdsv2: true networkInterfaces: - deleteOnTermination: true description: secondary network interface deviceIndex: 1 groups: # security group is from network-config.yaml under the same vpc - SharedServices-Main-Rsyslog-sg networkCardIndex: 1 # subnet is from network-config.yaml under the same vpc subnetId: SharedServices-App-A # this path is relative to the config repository and the content should be in regular text. # Its encoded in base64 before passing in to launch Template userData: appConfigs/appA/launchTemplate/userData.sh ``` -------------------------------- ### LZA Module Integration Testing with Jest Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/developer-guide/module-development/integration-guide Provides an example of integration testing for LZA modules using the Jest testing framework. It includes tests for successful deployment and for handling invalid configurations, asserting expected outcomes and error conditions. ```typescript describe('SetupLandingZoneModule Integration Test', () => { it('should successfully deploy Control Tower Landing Zone', async () => { const params = { // Test configuration }; const result = await setupControlTowerLandingZone(params); expect(result).toBeDefined(); }); it('should handle invalid configurations', async () => { const invalidParams = { // Invalid configuration }; await expect(setupControlTowerLandingZone(invalidParams)) .rejects .toThrow(); }); }); ``` -------------------------------- ### Example Local Gateway Configuration Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_network_config.ILocalGatewayConfig Provides a sample configuration for a local gateway, specifying its name and ID. This example demonstrates how to populate the required fields for referencing an existing local gateway. ```yaml name: accelerator-lgw id: lgw-abcxyz ``` -------------------------------- ### Get Stack ID in AWS CDK Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/classes/___packages__aws_accelerator_accelerator_dist_packages__aws_accelerator_accelerator_lib_stacks_security_resources_stack.SecurityResourcesStack Demonstrates how to obtain the physical stack ID in AWS CDK. The example shows the expected format after resolution, which includes the stack's ARN, region, account, and a unique identifier. ```typescript import * as cdk from 'aws-cdk-lib'; // ... inside a CDK stack definition ... const stack = new cdk.Stack(app, 'MyStack'); const stackId = stack.stackId; console.log(stackId); // Example output: 'arn:aws:cloudformation:us-west-2:123456789012:stack/teststack/51af3dc0-da77-11e4-872e-1234567db123' ``` -------------------------------- ### Identity Center Configuration Example (YAML) Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_iam_config.IIdentityCenterConfig This example demonstrates how to configure AWS Identity Center settings, including delegated administration, permission sets with various policy types, and user/group assignments to specific deployment targets. ```yaml identityCenter: name: identityCenter1 delegatedAdminAccount: Audit identityCenterPermissionSets: - name: PermissionSet1 policies: awsManaged: - arn:aws:iam::aws:policy/AdministratorAccess - PowerUserAccess customerManaged: - ResourceConfigurationCollectorPolicy acceleratorManaged: - AcceleratorManagedPolicy01 - AcceleratorManagedPolicy02 inlinePolicy: iam-policies/sso-permissionSet1-inline-policy.json permissionsBoundary: customerManagedPolicy: name: AcceleratorManagedPolicy path: / awsManagedPolicyName: PowerUserAccess sessionDuration: 60 identityCenterAssignments: - name: Assignment1 permissionSetName: PermissionSet1 principals: - type: USER name: accelerator - type: GROUP name: admin deploymentTargets: accounts: - LogArchive ``` -------------------------------- ### AcceleratorConfigLoader - getAllConfig Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/classes/___packages__aws_accelerator_lza_modules_common_accelerator_config_loader.AcceleratorConfigLoader Fetches all configuration settings for the accelerator, including account and general configurations, based on the provided directory path and partition. ```APIDOC ## Static `getAllConfig` ### Description Retrieves all configuration settings for the accelerator. ### Method `static async` getAllConfig ### Endpoint N/A (Class method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters * `configDirPath` (string) - Required - The directory path containing the configuration files. * `partition` (string) - Required - The AWS partition to use (e.g., 'aws', 'aws-cn', 'aws-us-gov'). ### Request Example ```json { "configDirPath": "/path/to/config", "partition": "aws" } ``` ### Response #### Success Response (Promise) * `configs` (AllConfigType) - An object containing all loaded configuration settings. #### Response Example ```json { "configs": { "accounts": { "all": [ { "id": "111111111111", "name": "PrimaryAccount" } ] }, "organization": { "organizationalUnits": [ { "name": "OU1" } ] } } } ``` ``` -------------------------------- ### Environment Details Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/classes/___packages__aws_accelerator_accelerator_lib_stacks_network_stacks_network_stack.NetworkStack Provides information about the deployment environment, including account and region. ```APIDOC ## Readonly environment ### Description The environment coordinates in which this stack is deployed. In the form `aws://account/region`. ### Type string ### Notes - Use `stack.account` and `stack.region` to obtain specific values. - If `stack.account` or `stack.region` are not concrete values, `unknown-account` and/or `unknown-region` will be used. ``` ```APIDOC ## Readonly region ### Description The AWS region into which this stack will be deployed (e.g. `us-west-2`). ### Type string ### Resolution Rules 1. Value provided to `env.region` when the stack is defined. 2. `Aws.REGION` token. ### Notes - Prefer using the return value as an opaque string. - If the value is an unresolved token, the stack is region-agnostic and the code should handle this accordingly. ``` -------------------------------- ### Deprecated centralizeCdkBuckets Configuration - Example Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_global_config.IGlobalConfig Shows example of the deprecated configuration of CDK buckets. This example enables the centralization of CDK buckets. ```YAML centralizeCdkBuckets: enable: true ``` -------------------------------- ### IS3EncryptionConfig Example Configuration (YAML) Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_global_config.IS3EncryptionConfig An example of how to configure AWS S3 encryption settings using the IS3EncryptionConfig structure. This example enables CMK creation and specifies deployment targets. ```yaml encryption: createCMK: true deploymentTargets: organizationalUnits: - Root ``` -------------------------------- ### Example IMacieManageOrganizationAdminParameter Configuration Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_lza_dist_interfaces_macie_manage_organization_admin.IMacieManageOrganizationAdminParameter Provides an example of the configuration object for the IMacieManageOrganizationAdminParameter interface. This specific example shows how to set up Macie to be disabled for a given account. ```typescript { enable: false, accountId: "11111111111" } ``` -------------------------------- ### Example Application Load Balancer Configuration (YAML) Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_customizations_config.IApplicationLoadBalancerConfig Provides an example of how to define an Application Load Balancer configuration using YAML syntax within the AWS Landing Zone Accelerator. ```yaml applicationLoadBalancer: name: appA-alb-01 scheme: internet-facing subnets: - Public-Subnet-A - Public-Subnet-B securityGroups: - demo-app-sg listeners: - name: appA-listener-2 port: 80 protocol: HTTP targetGroup: appA-alb-tg-1 type: forward ``` -------------------------------- ### Example Usage: IGetOrganizationalUnitsDetailConfiguration (TypeScript) Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_lza_dist_interfaces_aws_organizations_get_organizational_units_detail.IGetOrganizationalUnitsDetailHandlerParameter Provides an example of how to structure the configuration object when calling the handler for organizational unit details. This example specifically shows enabling AWS Control Tower. ```typescript { enableControlTower: true } ``` -------------------------------- ### IAM User Configuration Example (YAML) Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_iam_config.IUserConfig An example illustrating how to configure an IAM user using the IUserConfig structure, specifying username, boundary policy, and group. ```yaml - username: accelerator-user boundaryPolicy: Default-Boundary-Policy group: Admins ``` -------------------------------- ### Import and Deploy Control Tower Landing Zone with LZA Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/developer-guide/module-development/integration-guide Imports the necessary LZA module and demonstrates how to set up a Control Tower landing zone with detailed configuration parameters. Includes basic error handling for the deployment process. ```typescript import { setupControlTowerLandingZone, ISetupLandingZoneHandlerParameter } from '@aws-lza'; async function deployControlTower() { const params: ISetupLandingZoneHandlerParameter = { dryRun: false, partition: 'aws', homeRegion: 'us-east-1', configuration: { version: '3.3', enabledRegions: ['us-east-1', 'us-west-2'], logging: { organizationTrail: true, retention: { loggingBucket: 365, accessLoggingBucket: 365 } }, security: { enableIdentityCenterAccess: true }, sharedAccounts: { management: { name: 'Management', email: 'management@example.com' }, logging: { name: 'LogArchive', email: 'log-archive@example.com' }, audit: { name: 'Audit', email: 'audit@example.com' } } } }; try { const result = await setupControlTowerLandingZone(params); console.log('Status:', result); } catch (error) { console.error('Failure:', error.message); } } ``` -------------------------------- ### Example Configuration for IGetCloudFormationTemplatesConfiguration Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_accelerator_dist_packages__aws_lza_interfaces_aws_cloudformation_get_cloudformation_templates.IGetCloudFormationTemplatesConfiguration An example demonstrating how to structure the configuration object for retrieving CloudFormation templates. It shows the required properties like stackPrefix, directory, roleNameToAssume, centralAccountId, and the list of environments with their respective account IDs and regions. ```json { "stackPrefix": "AWSAccelerator-NetworkVpc", "directory": "./", "roleNameToAssume": "AWSControlTowerExecution", "centralAccountId": "111111111111", "environments": [ { "accountId": "222222222222", "region": "us-east-1" } ... ] } ``` -------------------------------- ### Example INlbListenerConfig Usage Source: https://awslabs.github.io/landing-zone-accelerator-on-aws/v1.13.1/typedocs/interfaces/___packages__aws_accelerator_config_dist_packages__aws_accelerator_config_lib_models_customizations_config.INlbListenerConfig An example demonstrating how to configure a Network Load Balancer listener using the INlbListenerConfig structure. This example sets a listener name, port, protocol, and target group. ```yaml - name: appA-listener-1 port: 80 protocol: TCP targetGroup: appA-nlb-tg-1 ```