AWSTemplateFormatVersion: 2010-09-09 Description: Main template to deploy the AWS Quick Start for the Utility Meter Data Analytics platform in a new VPC. (qs-1r18anaju) Metadata: QuickStartDocumentation: EntrypointName: Parameters for deploying into a new VPC AWS::CloudFormation::Interface: ParameterGroups: - Label: default: Amazon Redshift cluster configuration Parameters: - IncludeRedshift - AdminUsername - AdminUserPassword - ClusterName - DBName - Label: default: Network configuration Parameters: - AvailabilityZones - VPCCIDR - PrivateSubnet1ACIDR - PrivateSubnet2ACIDR - RemoteAccessCIDR - Label: default: AWS Glue configuration Parameters: - LandingzoneTransformer - CreateLandingZoneS3Bucket - LandingZoneS3BucketName - DeploySpecialAdapters - NoOfMeters - IncludeEtlAggregationWfl - Label: default: AWS Quick Start configuration Parameters: - QSS3BucketName - QSS3KeyPrefix - QSS3BucketRegion ParameterLabels: IncludeRedshift: default: Include Redshift cluster resources IncludeEtlAggregationWfl: default: Include ETL aggregation workflow AdminUsername: default: Administrator user name AdminUserPassword: default: Administrator user password ClusterName: default: Amazon Redshift cluster name DBName: default: Amazon Redshift database name PrivateSubnet1ACIDR: default: Private subnet 1A CIDR PrivateSubnet2ACIDR: default: Private subnet 2A CIDR VPCCIDR: default: VPC CIDR RemoteAccessCIDR: default: Remote access CIDR block AvailabilityZones: default: Availability Zones QSS3BucketName: default: Quick Start S3 bucket name QSS3KeyPrefix: default: Quick Start S3 key prefix QSS3BucketRegion: default: Quick Start S3 bucket Region LandingzoneTransformer: default: Transformer that reads the landing-zone data CreateLandingZoneS3Bucket: default: Create landing-zone bucket LandingZoneS3BucketName: default: Landing-zone S3 bucket NoOfMeters: default: Number of meters WithWeather: default: Weather data availability DeploySpecialAdapters: default: Special data adapters for metering conversions Resources: VPC: Type: AWS::CloudFormation::Stack Properties: Parameters: AvailabilityZones: !Join - ',' - !Ref 'AvailabilityZones' PrivateSubnet1ACIDR: !Ref 'PrivateSubnet1ACIDR' PrivateSubnet2ACIDR: !Ref 'PrivateSubnet2ACIDR' VPCCIDR: !Ref VPCCIDR NumberOfAZs: 2 TemplateURL: !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 ] Workload: Type: 'AWS::CloudFormation::Stack' Properties: TemplateURL: !Sub - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/workload.template.yaml - S3Bucket: !If - UsingDefaultBucket - !Sub 'aws-quickstart-${AWS::Region}' - !Ref 'QSS3BucketName' S3Region: !If - UsingDefaultBucket - !Ref 'AWS::Region' - !Ref 'QSS3BucketRegion' Parameters: IncludeRedshift: !Ref IncludeRedshift IncludeEtlAggregationWfl: !Ref IncludeEtlAggregationWfl AdminUsername: !Ref AdminUsername AdminUserPassword: !Ref AdminUserPassword ClusterName: !Ref ClusterName Subnet1ID: Fn::GetAtt: [VPC, Outputs.PrivateSubnet1AID] Subnet2ID: Fn::GetAtt: [VPC, Outputs.PrivateSubnet2AID] VPCID: Fn::GetAtt: [VPC, Outputs.VPCID] RemoteAccessCIDR: !Ref RemoteAccessCIDR LandingzoneTransformer: !Ref LandingzoneTransformer CreateLandingZoneS3Bucket: !Ref CreateLandingZoneS3Bucket LandingZoneS3BucketName: !Ref LandingZoneS3BucketName QSS3BucketName: !Ref QSS3BucketName QSS3KeyPrefix: !Ref QSS3KeyPrefix QSS3BucketRegion: !Ref QSS3BucketRegion DBName: !Ref DBName NoOfMeters: !Ref NoOfMeters WithWeather: !Ref WithWeather DeploySpecialAdapters: !Ref DeploySpecialAdapters GrafanaAthenaWorkgroup: !Ref GrafanaAthenaWorkgroup Conditions: UsingDefaultBucket: !Equals - !Ref QSS3BucketName - 'aws-quickstart' ShouldCreateRedshiftConsumption: !Equals [ 'True', !Ref IncludeRedshift ] Parameters: AdminUsername: Type: String Description: Administrator user name for the Amazon Redshift cluster. The user name must be lowercase, begin with a letter, contain only alphanumeric characters, '_', '+', '.', '@', or '-', and be less than 128 characters. MinLength: '1' MaxLength: '128' AllowedPattern : '([a-z])([a-z]|[0-9]|[_+.@-])*' AdminUserPassword: Type: String Description: Administrator user password for the Amazon Redshift cluster. The password must be 8–64 characters, contain at least one uppercase letter, at least one lowercase letter, and at least one number. It can only contain ASCII characters (ASCII codes 33–126), except ' (single quotation mark), " (double quotation mark), /, \, or @. NoEcho: True MinLength: '8' MaxLength: '64' AllowedPattern: '^(?=.*[A-Z])(?=.*[\W_])(?=.*[0-9])(?=.*[a-z])(?!.*[@"/\\]).{8,64}$' ClusterName: Type: String Default: redshift-cluster-1 Description: Amazon Redshift cluster name. RemoteAccessCIDR: Type: String Default: 0.0.0.0/0 Description: CIDR block from which access to the Amazon Redshift cluster is allowed. LandingzoneTransformer: Type: String Default: london Description: Defines the transformer for the input data in the landing zone. The default is the transformer that works with the London test data set. AllowedValues: - default - london CreateLandingZoneS3Bucket: Type: String Default: 'Yes' Description: Choose `No` only if you have an existing S3 bucket with raw meter data that you want to use. If you choose `No`, you must provide a value for the landing-zone S3 bucket name (`LandingZoneS3BucketName`). AllowedValues: - 'Yes' - 'No' LandingZoneS3BucketName: Type: String Default: "" Description: You must provide a value if you chose `No` for the parameter `CreateLandingZoneS3Bucket`. Otherwise, leave blank. QSS3BucketName: AllowedPattern: '^[0-9a-zA-Z]+([0-9a-zA-Z-]*[0-9a-zA-Z])*$' ConstraintDescription: The 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: Name of the S3 bucket for your copy of the Quick Start assets. Keep the default name unless you are customizing the template. Changing the name updates code references to point to a new Quick Start location. This name can include numbers, lowercase letters, uppercase letters, and hyphens, but do not start or end with a hyphen (-). See https://aws-quickstart.github.io/option1.html. Type: String QSS3KeyPrefix: AllowedPattern: '^[0-9a-zA-Z-/]*$' ConstraintDescription: The Quick Start S3 key prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and forward slashes (/). The prefix should end with a forward slash (/). Default: quickstart-aws-utility-meter-data-analytics-platform/ Description: S3 key prefix that is used to simulate a directory for your copy of the Quick Start assets. Keep the default prefix unless you are customizing the template. Changing this prefix updates code references to point to a new Quick Start location. This prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and forward slashes (/). End with a forward slash. See https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html and https://aws-quickstart.github.io/option1.html. Type: String QSS3BucketRegion: Default: 'us-east-1' Description: 'AWS Region where the Quick Start S3 bucket (QSS3BucketName) is hosted. Keep the default Region unless you are customizing the template. Changing this Region updates code references to point to a new Quick Start location. When using your own bucket, specify the Region. See https://aws-quickstart.github.io/option1.html.' Type: String DBName: Type: String Default: meterdata Description: Name of the Amazon Redshift database. NoOfMeters: Type: String Description: Approximate number of meters in your dataset that need to be processed by the pipeline. This is used to configure the appropriate number of Data Processing Units (DPUs) for the AWS Glue job. The default value works for sample datasets or evaluation purposes. For a production deployment with millions of meters, choose `5Mil-and-more.` AllowedValues: - "1-50K" - "50K-1Mil" - "1Mil-5Mil" - "5Mil-and-more" Default: "1-50K" DeploySpecialAdapters: Type: String Default: None Description: Choose `mrasco` to deploy the MRA Service Company (MRASCo) data adapter. This includes an S3 bucket to store MRASCo data, an AWS Lambda function to transform MRASCo data to MDA format, and an S3 agent to invoke the function. AllowedValues: - None - mrasco IncludeRedshift: Type: String Description: Deploy Amazon Redshift consumption hub. AllowedValues: ['True','False'] Default: 'True' AvailabilityZones: Description: Availability Zones to use for the subnets in the VPC. Type: List 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 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 WithWeather: Type: Number Default: 0 Description: >- Enables or disables the use of weather data. 0 = Weather data won't be used. 1 = Enable use of weather data. IncludeEtlAggregationWfl: Type: String Description: Deploy the ETL aggregation workflow. AllowedValues: [ 'True','False' ] Default: 'True' GrafanaAthenaWorkgroup: Type: String Default: grafana-athena-workgroup Description: Name of the athena workgroup grafana will use to query. Outputs: StackName: Description: 'Stack name' Value: !Sub '${AWS::StackName}' RedshiftClusterEndpoint: Description: Amazon Redshift cluster endpoint address with port Value: !GetAtt Workload.Outputs.RedshiftClusterEndpoint Condition: ShouldCreateRedshiftConsumption RedshiftEndpoint: Description: Amazon Redshift endpoint address Value: !GetAtt Workload.Outputs.RedshiftEndpoint Condition: ShouldCreateRedshiftConsumption GlueWorkflowName: Description: AWS Glue workflow name Value: !GetAtt Workload.Outputs.GlueWorkflowName LandingZoneS3Bucket: Description: Landing zone S3 bucket name Value: !GetAtt Workload.Outputs.LandingZoneS3Bucket CleanZoneS3Bucket: Description: Clean zone S3 bucket name Value: !GetAtt Workload.Outputs.CleanZoneS3Bucket TempWorkflowS3Bucket: Description: Clean zone S3 bucket name Value: !GetAtt Workload.Outputs.TempWorkflowS3Bucket BusinessZoneS3Bucket: Description: Business zone S3 bucket name Value: !GetAtt Workload.Outputs.BusinessZoneS3Bucket Postdeployment: Description: See the deployment guide for postdeployment steps. Value: https://aws.amazon.com/quickstart/?quickstart-all.sort-by=item.additionalFields.sortDate&quickstart-all.sort-order=desc&awsm.page-quickstart-all=5