AWSTemplateFormatVersion: "2010-09-09" Description: This template deploys an environment to run Edico Genome's DRAGEN software using AWS Batch. (qs-1oqea6246) Metadata: cfn-lint: config: ignore_checks: - W9006 # temporary to get rid of warnings - W9002 # temporary to get rid of warnings - W9003 # temporary to get rid of warnings - W9901 # Not passing all the default parameters to reduce verbosity QuickStartDocumentation: EntrypointName: "Parameters for deploying into a new VPC" Order: "1" AWS::CloudFormation::Interface: ParameterGroups: - Label: default: Network Configuration Parameters: - AvailabilityZones - VPCCIDR - PrivateSubnet1CIDR - PrivateSubnet2CIDR - PublicSubnet1CIDR - PublicSubnet2CIDR - Label: default: DRAGEN Quick Start Configuration Parameters: - KeyPairName - InstanceType - BidPercentage - MinvCpus - MaxvCpus - DesiredvCpus - GenomicsS3Bucket - RetryNumber - Label: default: AWS Quick Start Configuration Parameters: - QSS3BucketName - QSS3BucketRegion - QSS3KeyPrefix ParameterLabels: AvailabilityZones: default: Availability Zones KeyPairName: default: Key Pair Name PrivateSubnet1CIDR: default: Private Subnet 1 CIDR PrivateSubnet2CIDR: default: Private Subnet 2 CIDR PublicSubnet1CIDR: default: Public Subnet 1 CIDR PublicSubnet2CIDR: default: Public Subnet 2 CIDR VPCCIDR: default: VPC CIDR QSS3BucketRegion: default: Quick Start S3 bucket region QSS3KeyPrefix: default: Quick Start S3 Key Prefix QSS3BucketName: default: Quick Start S3 Bucket Name InstanceType: default: Instance Type BidPercentage: default: Spot Bid Percentage RetryNumber: default: AWS Batch Retry Number MinvCpus: default: Min vCPUs MaxvCpus: default: Max vCPUs DesiredvCpus: default: Desired vCPUs GenomicsS3Bucket: default: Genomics Data Bucket Parameters: AvailabilityZones: Description: The list of Availability Zones to use for the subnets in the VPC. The Quick Start uses two Availability Zones from your list and preserves the logical order you specify. Type: List InstanceType: AllowedValues: - f1.2xlarge - f1.4xlarge - f1.16xlarge Default: f1.4xlarge Description: Amazon EC2 instance type for DRAGEN in the AWS Batch Compute Environment. Type: String KeyPairName: Description: The name of an existing public/private key pair, which allows you to securely connect to your instance after it launches. Type: AWS::EC2::KeyPair::KeyName PrivateSubnet1CIDR: 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: The CIDR block for the private subnet located in Availability Zone 1. Type: String PrivateSubnet2CIDR: 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: The CIDR block for the private subnet located in Availability Zone 2. 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: The 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: The CIDR block for the public (DMZ) subnet 2 located in Availability Zone 2. 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: The CIDR block for the VPC. Type: String QSS3BucketName: 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 Description: S3 bucket name for the Quick Start assets. Quick Start bucket name can include numbers, lowercase letters, uppercase letters, and hyphens (-). It cannot start or end with a hyphen (-). Type: String 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: AllowedPattern: ^[0-9a-zA-Z-/]*$ ConstraintDescription: Quick Start key prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and a forward slash (/) at the end of the prefix. Description: S3 key prefix for the Quick Start assets. Quick Start key prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and forward slash (/). Default: quickstart-illumina-dragen/ Type: String BidPercentage: AllowedPattern: (?:\b|-)([1-9]{1,2}[0]?|100)\b ConstraintDescription: Spot Bid Percentage should be between 1 and 100, inclusive Description: The bid percentage set for your AWS Batch Managed Compute Environment with Spot Instances. Default: 50 Type: String RetryNumber: AllowedPattern: (?:\b|-)([1-9]|10)\b ConstraintDescription: AWS Batch job retry number should be between 1 and 10 Description: Retry number for an AWS Batch job. Default: 1 Type: String MinvCpus: AllowedPattern: ^(0|[1-9][0-9]{0,2}|1000)$ ConstraintDescription: Valid between 0 and 1000, inclusive Description: Minimum vCPUs for your AWS Batch Compute Environment. Recommend 0. Default: 0 Type: String MaxvCpus: AllowedPattern: ^([1-9][0-9]{0,2}|1000)$ ConstraintDescription: Valid between 1 and 1000, inclusive Description: Maximum vCPUs for your AWS Batch Compute Environment. Type: String DesiredvCpus: AllowedPattern: ^(0|[1-9][0-9]{0,2}|1000)$ ConstraintDescription: Valid between 1 and 1000, inclusive Description: Desired vCPUs for your AWS Batch Compute Environment. Recommend the same number as MinvCpus for cost-optimization. Default: 0 Type: String GenomicsS3Bucket: AllowedPattern: ^[0-9a-zA-Z]+([0-9a-zA-Z-]*[0-9a-zA-Z])*$ ConstraintDescription: S3 genomics bucket name can include numbers, lowercase letters, uppercase letters, and hyphens (-). It cannot start or end with a hyphen (-). Description: S3 bucket name for the bucket to which you'll read and write genomics data. Type: String Rules: DRAGENSupportedRegionRule: Assertions: - Assert: Fn::Contains: - - us-east-1 - us-west-2 - eu-central-1 - eu-west-1 - ap-southeast-2 - !Ref AWS::Region AssertDescription: This Quick Start utilizes DRAGEN Marketplace AMI which is only available in specified AWS Regions. Please launch the stack in one of these regions to continue. Conditions: UsingDefaultBucket: !Equals [!Ref QSS3BucketName, 'aws-quickstart'] Resources: VPCStack: Type: AWS::CloudFormation::Stack Properties: TemplateURL: Fn::Sub: - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}submodules/quickstart-aws-vpc/templates/aws-vpc.template.yaml - S3Region: !If [UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion] S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName] Parameters: AvailabilityZones: Fn::Join: - ',' - !Ref AvailabilityZones NumberOfAZs: '2' PrivateSubnet1ACIDR: !Ref PrivateSubnet1CIDR PrivateSubnet2ACIDR: !Ref PrivateSubnet2CIDR PublicSubnet1CIDR: !Ref PublicSubnet1CIDR PublicSubnet2CIDR: !Ref PublicSubnet2CIDR VPCCIDR: !Ref VPCCIDR DragenStack: Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/dragen.template.yaml - S3Region: !If [UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion] S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName] Parameters: PrivateSubnet1ID: !GetAtt VPCStack.Outputs.PrivateSubnet1AID PrivateSubnet2ID: !GetAtt VPCStack.Outputs.PrivateSubnet2AID VPCID: !GetAtt VPCStack.Outputs.VPCID QSS3BucketName: !Ref QSS3BucketName QSS3BucketRegion: !Ref QSS3BucketRegion QSS3KeyPrefix: !Ref QSS3KeyPrefix KeyPairName: !Ref KeyPairName InstanceType: !Ref InstanceType BidPercentage: !Ref BidPercentage MinvCpus: !Ref MinvCpus MaxvCpus: !Ref MaxvCpus DesiredvCpus: !Ref DesiredvCpus GenomicsS3Bucket: !Ref GenomicsS3Bucket RetryNumber: !Ref RetryNumber Outputs: DragenJobDefinition: Value: !GetAtt DragenStack.Outputs.DragenJobDefinition JobQueue: Value: !GetAtt DragenStack.Outputs.JobQueue DragenComputeEnvironmentSpot: Value: !GetAtt DragenStack.Outputs.DragenComputeEnvironmentSpot DragenComputeEnvironmentOnDemand: Value: !GetAtt DragenStack.Outputs.DragenComputeEnvironmentOnDemand