AWSTemplateFormatVersion: '2010-09-09' Description: This CloudFormation template creates a new VPC in your AWS account and deploys the Axomo infrastructure in the new VPC. Authored by Mactores.(qs-1q18ntcti) Metadata: AWS::CloudFormation::Interface: ParameterGroups: - Label: default: Availability Zone configuration Parameters: - AvailabilityZones - NumberOfAZs - Label: default: Network configuration Parameters: - VPCCIDR - PublicSubnet1CIDR - PublicSubnet2CIDR - PublicSubnetTag1 - PublicSubnetTag2 - PublicSubnetTag3 - CreatePrivateSubnets - PrivateSubnet1ACIDR - PrivateSubnet2ACIDR - PrivateSubnetATag1 - PrivateSubnetATag2 - PrivateSubnetATag3 - VPCTenancy - Label: default: Amazon SageMaker configuration Parameters: - SagemakerEndpointConfigInstanceType - SagemakerModelName - Label: default: AWS Glue configuration Parameters: - CrawlerDBname - Label: default: Amazon Athena configuration Parameters: - AthenaDBname - Label: default: DMS instance configuration Parameters: - DmsInstanceClass - CreateDMSRoles - Label: default: Amazon S3 configuration Parameters: - S3BucketName - Label: default: Components tag details Parameters: - ProjectTag - EnvTag - Label: default: AWS Quick Start configuration Parameters: - QSS3BucketName - QSS3BucketRegion - QSS3KeyPrefix ParameterLabels: AvailabilityZones: default: Availability Zones CreatePrivateSubnets: default: Create private subnets NumberOfAZs: default: Number of Availability Zones PrivateSubnet1ACIDR: default: Private subnet 1A CIDR PrivateSubnet2ACIDR: default: Private subnet 2A CIDR PrivateSubnetATag1: default: Tag for private A subnets PrivateSubnetATag2: default: Tag for private A subnets PrivateSubnetATag3: default: Tag for private A subnets PublicSubnet1CIDR: default: Public subnet 1 CIDR PublicSubnet2CIDR: default: Public subnet 2 CIDR PublicSubnetTag1: default: Tag for public subnets PublicSubnetTag2: default: Tag for public sbnets PublicSubnetTag3: default: Tag for public subnets VPCCIDR: default: VPC CIDR VPCTenancy: default: VPC tenancy QSS3BucketName: default: Quick Start S3 bucket name QSS3BucketRegion: default: Quick Start S3 bucket region QSS3KeyPrefix: default: Quick Start S3 key prefix CrawlerDBname: default: DB name for Glue crawler AthenaDBname: default: Athena DB name DmsInstanceClass: default: Instance class for DMS CreateDMSRoles: default: Conditional IAM roles creation for DMS S3BucketName: default: S3 bucket name ProjectTag: default: Value for project tag EnvTag: default: Value for environment tag SagemakerEndpointConfigInstanceType: default: Instance type for SageMaker EndpointConfig SagemakerModelName: default: Model name for SageMaker Parameters: AvailabilityZones: Description: 'List of Availability Zones to use for the subnets in the VPC. Note: The logical order is preserved.' Type: List CreatePrivateSubnets: AllowedValues: - 'true' - 'false' Default: 'true' Description: Set to false to create only public subnets. If false, the CIDR parameters for ALL private subnets will be ignored. Type: String NumberOfAZs: AllowedValues: - '2' Default: '2' Description: Number of Availability Zones to use in the VPC. This must match your selections in the list of Availability Zones parameter. Type: String PrivateSubnet1ACIDR: AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 Default: 10.0.0.0/19 Description: CIDR block for private subnet 1A located in Availability Zone 1 Type: String PrivateSubnet2ACIDR: AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 Default: 10.0.32.0/19 Description: CIDR block for private subnet 2A located in Availability Zone 2 Type: String PrivateSubnetATag1: AllowedPattern: ^([a-zA-Z0-9+\-._:/@]+=[a-zA-Z0-9+\-.,_:/@ *\\"'\[\]\{\}]*)?$ ConstraintDescription: The tags must be in format "Key=Value" keys can only contain [a-zA-Z0-9+\-._:/@], values can contain [a-zA-Z0-9+\-._:/@ *\\"'\[\]\{\}] Default: Network=Private Description: The tag to add to private subnets A, in format Key=Value (Optional) Type: String PrivateSubnetATag2: AllowedPattern: ^([a-zA-Z0-9+\-._:/@]+=[a-zA-Z0-9+\-.,_:/@ *\\"'\[\]\{\}]*)?$ ConstraintDescription: The tags must be in format "Key=Value" keys can only contain [a-zA-Z0-9+\-._:/@], values can contain [a-zA-Z0-9+\-._:/@ *\\"'\[\]\{\}] Default: '' Description: The tag to add to private subnets A, in format Key=Value (Optional) Type: String PrivateSubnetATag3: AllowedPattern: ^([a-zA-Z0-9+\-._:/@]+=[a-zA-Z0-9+\-.,_:/@ *\\"'\[\]\{\}]*)?$ ConstraintDescription: The tags must be in format "Key=Value" keys can only contain [a-zA-Z0-9+\-._:/@], values can contain [a-zA-Z0-9+\-._:/@ *\\"'\[\]\{\}] Default: '' Description: The tag to add to private subnets A, in format Key=Value (Optional) Type: String PublicSubnet1CIDR: AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 Default: 10.0.128.0/20 Description: CIDR block for the public DMZ subnet 1 located in Availability Zone 1 Type: String PublicSubnet2CIDR: AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 Default: 10.0.144.0/20 Description: CIDR block for the public DMZ subnet 2 located in Availability Zone 2 Type: String PublicSubnetTag1: AllowedPattern: ^([a-zA-Z0-9+\-._:/@]+=[a-zA-Z0-9+\-.,_:/@ *\\"'\[\]\{\}]*)?$ ConstraintDescription: Tags must be in format "Key=Value" keys can only contain [a-zA-Z0-9+\-._:/@], values can contain [a-zA-Z0-9+\-._:/@ *\\"'\[\]\{\}] Default: Network=Public Description: Tag to add to public subnets, in format Key=Value (Optional) Type: String PublicSubnetTag2: AllowedPattern: ^([a-zA-Z0-9+\-._:/@]+=[a-zA-Z0-9+\-.,_:/@ *\\"'\[\]\{\}]*)?$ ConstraintDescription: Tags must be in format "Key=Value" keys can only contain [a-zA-Z0-9+\-._:/@], values can contain [a-zA-Z0-9+\-._:/@ *\\"'\[\]\{\}] Default: '' Description: Tag to add to public subnets, in format Key=Value (Optional) Type: String PublicSubnetTag3: AllowedPattern: ^([a-zA-Z0-9+\-._:/@]+=[a-zA-Z0-9+\-.,_:/@ *\\"'\[\]\{\}]*)?$ ConstraintDescription: Tags must be in format "Key=Value" keys can only contain [a-zA-Z0-9+\-._:/@], values can contain [a-zA-Z0-9+\-._:/@ *\\"'\[\]\{\}] Default: '' Description: Tag to add to public subnets, in format Key=Value (Optional) Type: String VPCCIDR: AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 Default: 10.0.0.0/16 Description: CIDR block for the VPC Type: String VPCTenancy: AllowedValues: - default - dedicated Default: default Description: The allowed tenancy of instances launched into the VPC Type: String QSS3BucketName: Description: >- The S3 bucket you created for your copy of Quick Start assets, if you decide to customize or extend the Quick Start for your own use. The bucket name can include numbers, lowercase letters, uppercase letters, and hyphens, but should not start or end with a hyphen. Type: String AllowedPattern: ^[0-9a-zA-Z]+([0-9a-zA-Z-]*[0-9a-zA-Z])*$ ConstraintDescription: Quick Start bucket name can include numbers, lowercase letters, uppercase letters, and hyphens (-). It cannot start or end with a hyphen (-). Default: aws-quickstart QSS3BucketRegion: Default: 'us-east-1' Description: 'The AWS Region where the Quick Start S3 bucket (QSS3BucketName) is hosted. When using your own bucket, you must specify this value.' Type: String QSS3KeyPrefix: Description: >- The S3 key name prefix used to simulate a folder for your copy of Quick Start assets, if you decide to customize or extend the Quick Start for your own use. This prefix can include numbers, lowercase letters, uppercase letters, hyphens, and forward slashes. Type: String AllowedPattern: ^[0-9a-zA-Z-/]*$ ConstraintDescription: Quick Start key prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and forward slash (/). Default: quickstart-mactores-axomo/ S3BucketName: Description: S3 bucket name for the target location for Glue crawlers. Bucket name must contain only lowercase letters, numbers, periods and dashes. Type: String Default: '' ProjectTag: Description: Value for the Project tag to be associated with all the deployed components. Tags make it easier to manage, search for, and filter resources for Billing and tracking purposes. Type: String Default: Axomo EnvTag: Description: >- Value for the Environment tag to be associated with all the deployed components. Tags make it easier to manage, search for, and filter resources for Billing and tracking purposes. Can be Dev, Prd or any custom value Type: String Default: Dev DmsInstanceClass: Description: Instance class for the DMS ReplicationInstance. Type: String AllowedValues: - dms.t2.micro - dms.t2.small - dms.t2.medium - dms.t2.large - dms.c4.large - dms.c4.xlarge - dms.c4.2xlarge - dms.c4.4xlarge ConstraintDescription: 'Valid Values: dms.t2.micro | dms.t2.small | dms.t2.medium | dms.t2.large | dms.c4.large | dms.c4.xlarge | dms.c4.2xlarge | dms.c4.4xlarge' Default: dms.t2.micro CreateDMSRoles: Description: Specify True to create the IAM roles (dms-vpc-role and dms-cloudwatch-logs-role) required for DMS, if non-existent in your AWS account. Else, specify False. Type: String AllowedValues: - 'True' - 'False' ConstraintDescription: 'Valid Values: True | False' AthenaDBname: Description: Database name for the Athena NamedQuery. Type: String Default: el-db CrawlerDBname: Description: The name of the database in which the crawler's output is stored. Type: String Default: el-db-crawler SagemakerEndpointConfigInstanceType: Description: Instance Type for the Sagemaker Endpoint Config. Type: String AllowedValues: - ml.c4.2xlarge - ml.c4.4xlarge - ml.c4.8xlarge - ml.c4.large - ml.c4.xlarge - ml.c5.18xlarge - ml.c5.2xlarge - ml.c5.4xlarge - ml.c5.9xlarge - ml.c5.large - ml.c5.xlarge - ml.m4.10xlarge - ml.m4.16xlarge - ml.m4.2xlarge - ml.m4.4xlarge - ml.m4.xlarge - ml.m5.12xlarge - ml.m5.24xlarge - ml.m5.2xlarge - ml.m5.4xlarge - ml.m5.large - ml.m5.xlarge - ml.p2.16xlarge - ml.p2.8xlarge - ml.p2.xlarge - ml.p3.16xlarge - ml.p3.2xlarge - ml.p3.8xlarge - ml.t2.2xlarge - ml.t2.large - ml.t2.medium - ml.t2.xlarge ConstraintDescription: >- Allowed Values: ml.c4.2xlarge | ml.c4.4xlarge | ml.c4.8xlarge | ml.c4.large | ml.c4.xlarge | ml.c5.18xlarge | ml.c5.2xlarge | ml.c5.4xlarge | ml.c5.9xlarge | ml.c5.large | ml.c5.xlarge | ml.m4.10xlarge | ml.m4.16xlarge | ml.m4.2xlarge | ml.m4.4xlarge | ml.m4.xlarge | ml.m5.12xlarge | ml.m5.24xlarge | ml.m5.2xlarge | ml.m5.4xlarge | ml.m5.large | ml.m5.xlarge | ml.p2.16xlarge | ml.p2.8xlarge | ml.p2.xlarge | ml.p3.16xlarge | ml.p3.2xlarge | ml.p3.8xlarge | ml.t2.2xlarge | ml.t2.large | ml.t2.medium | ml.t2.xlarge Default: ml.m4.xlarge SagemakerModelName: Description: The name of the Amazon Sagemaker model that you want to host. Type: String Default: '' Conditions: UsingDefaultBucket: !Equals [!Ref QSS3BucketName, 'aws-quickstart'] Resources: VPCStack: Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub - 'https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}submodules/quickstart-aws-vpc/templates/aws-vpc.template' - S3Region: !If [UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion] S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName] Parameters: AvailabilityZones: !Join - ',' - !Ref 'AvailabilityZones' CreatePrivateSubnets: !Ref 'CreatePrivateSubnets' NumberOfAZs: !Ref 'NumberOfAZs' PrivateSubnet1ACIDR: !Ref 'PrivateSubnet1ACIDR' PrivateSubnet2ACIDR: !Ref 'PrivateSubnet2ACIDR' PrivateSubnetATag1: !Ref 'PrivateSubnetATag1' PrivateSubnetATag2: !Ref 'PrivateSubnetATag2' PrivateSubnetATag3: !Ref 'PrivateSubnetATag3' PublicSubnet1CIDR: !Ref 'PublicSubnet1CIDR' PublicSubnet2CIDR: !Ref 'PublicSubnet2CIDR' PublicSubnetTag1: !Ref 'PublicSubnetTag1' PublicSubnetTag2: !Ref 'PublicSubnetTag2' PublicSubnetTag3: !Ref 'PublicSubnetTag3' VPCCIDR: !Ref 'VPCCIDR' VPCTenancy: !Ref 'VPCTenancy' WorkloadStack: DependsOn: VPCStack Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub - 'https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/axomo-workload.template.yaml' - S3Region: !If [UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion] S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName] Parameters: QSS3BucketName: !Ref 'QSS3BucketName' QSS3BucketRegion: !Ref 'QSS3BucketRegion' QSS3KeyPrefix: !Ref 'QSS3KeyPrefix' VPCID: !GetAtt 'VPCStack.Outputs.VPCID' PrivateSubnet1AID: !GetAtt 'VPCStack.Outputs.PrivateSubnet1AID' PrivateSubnet2AID: !GetAtt 'VPCStack.Outputs.PrivateSubnet2AID' PublicSubnet1ID: !GetAtt 'VPCStack.Outputs.PublicSubnet1ID' PublicSubnet2ID: !GetAtt 'VPCStack.Outputs.PublicSubnet2ID' S3BucketName: !Ref 'S3BucketName' ProjectTag: !Ref 'ProjectTag' EnvTag: !Ref 'EnvTag' DmsInstanceClass: !Ref 'DmsInstanceClass' CreateDMSRoles: !Ref 'CreateDMSRoles' AthenaDBname: !Ref 'AthenaDBname' CrawlerDBname: !Ref 'CrawlerDBname' SagemakerEndpointConfigInstanceType: !Ref 'SagemakerEndpointConfigInstanceType' SagemakerModelName: !Ref 'SagemakerModelName' Outputs: S3bucketArn: Description: Amazon Resource Name (ARN) of the specified bucket. Value: !GetAtt 'WorkloadStack.Outputs.S3bucketArn' SagemakerEndpointConfigARN: Description: Amazon Resource Name (ARN) of the sagemaker endpoint configuration. Value: !GetAtt 'WorkloadStack.Outputs.SagemakerEndpointConfigARN' SagemakerEndpointARN: Description: Amazon Resource Name (ARN) of the SagemakerEndpoint. Value: !GetAtt 'WorkloadStack.Outputs.SagemakerEndpointARN'