diff --git a/athena-aws-cmdb/athena-aws-cmdb-connection.yaml b/athena-aws-cmdb/athena-aws-cmdb-connection.yaml index e4ec86f8bc..bea006e174 100644 --- a/athena-aws-cmdb/athena-aws-cmdb-connection.yaml +++ b/athena-aws-cmdb/athena-aws-cmdb-connection.yaml @@ -36,6 +36,8 @@ Conditions: HasKmsKeyId: !Not [ !Equals [ !Ref KmsKeyId, "" ] ] NotHasLambdaRole: !Equals [ !Ref LambdaRoleArn, "" ] CreateKmsPolicy: !And [ !Condition HasKmsKeyId, !Condition NotHasLambdaRole ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: ConnectorConfig: @@ -46,7 +48,9 @@ Resources: glue_connection: !Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-aws-cmdb:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-aws-cmdb:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] Description: "Enables Amazon Athena to communicate with various AWS Services, making your resource inventories accessible via SQL." Timeout: 900 MemorySize: 3008 diff --git a/athena-cloudera-hive/athena-cloudera-hive-connection.yaml b/athena-cloudera-hive/athena-cloudera-hive-connection.yaml index f958e4718c..29fa4f5d2e 100644 --- a/athena-cloudera-hive/athena-cloudera-hive-connection.yaml +++ b/athena-cloudera-hive/athena-cloudera-hive-connection.yaml @@ -44,6 +44,8 @@ Conditions: NotHasLambdaRole: !Equals [ !Ref LambdaRoleArn, "" ] HasKmsKeyId: !Not [ !Equals [ !Ref KmsKeyId, "" ] ] CreateKmsPolicy: !And [!Condition NotHasLambdaRole, !Condition HasKmsKeyId] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -53,7 +55,9 @@ Resources: glue_connection: !Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-cloudera-hive:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-cloudera-hive:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] ImageConfig: Command: [ "com.amazonaws.athena.connectors.cloudera.HiveCompositeHandler" ] Description: "Enables Amazon Athena to communicate with Cloudera Hive using JDBC" diff --git a/athena-cloudera-impala/athena-cloudera-impala-connection.yaml b/athena-cloudera-impala/athena-cloudera-impala-connection.yaml index d3d5c568df..6c40c72087 100644 --- a/athena-cloudera-impala/athena-cloudera-impala-connection.yaml +++ b/athena-cloudera-impala/athena-cloudera-impala-connection.yaml @@ -44,6 +44,8 @@ Conditions: HasKmsKeyId: !Not [ !Equals [ !Ref KmsKeyId, "" ] ] NotHasLambdaRole: !Equals [ !Ref LambdaRoleArn, "" ] CreateKmsPolicy: !And [!Condition NotHasLambdaRole, !Condition HasKmsKeyId] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -53,7 +55,9 @@ Resources: glue_connection: !Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-cloudera-impala:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-cloudera-impala:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] ImageConfig: Command: [ "com.amazonaws.athena.connectors.cloudera.ImpalaCompositeHandler" ] Description: "Enables Amazon Athena to communicate with Cloudera Impala using JDBC" diff --git a/athena-cloudwatch-metrics/athena-cloudwatch-metrics-connection.yaml b/athena-cloudwatch-metrics/athena-cloudwatch-metrics-connection.yaml index c5bae85d66..1cf557a0fa 100644 --- a/athena-cloudwatch-metrics/athena-cloudwatch-metrics-connection.yaml +++ b/athena-cloudwatch-metrics/athena-cloudwatch-metrics-connection.yaml @@ -36,6 +36,8 @@ Conditions: HasKmsKeyId: !Not [ !Equals [ !Ref KmsKeyId, "" ] ] NotHasLambdaRole: !Equals [ !Ref LambdaRoleArn, "" ] CreateKmsPolicy: !And [ !Condition HasKmsKeyId, !Condition NotHasLambdaRole ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: ConnectorConfig: @@ -46,7 +48,9 @@ Resources: glue_connection: !Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-cloudwatch-metrics:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-cloudwatch-metrics:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] Description: "Enables Amazon Athena to communicate with Cloudwatch Metrics, making your metrics data accessible via SQL" Timeout: 900 MemorySize: 3008 diff --git a/athena-cloudwatch/athena-cloudwatch-connection.yaml b/athena-cloudwatch/athena-cloudwatch-connection.yaml index 6be26a2409..b2bab240ef 100644 --- a/athena-cloudwatch/athena-cloudwatch-connection.yaml +++ b/athena-cloudwatch/athena-cloudwatch-connection.yaml @@ -36,6 +36,8 @@ Conditions: HasKmsKeyId: !Not [!Equals [!Ref KmsKeyId, ""]] NotHasLambdaRole: !Equals [!Ref LambdaRole, ""] CreateKmsPolicy: !And [ !Condition HasKmsKeyId, !Condition NotHasLambdaRole ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: ConnectorConfig: @@ -46,7 +48,9 @@ Resources: glue_connection: !Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-cloudwatch:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-cloudwatch:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] Description: "Enables Amazon Athena to communicate with Cloudwatch, making your log accessible via SQL" Timeout: 900 MemorySize: 3008 diff --git a/athena-datalakegen2/athena-datalakegen2-connection.yaml b/athena-datalakegen2/athena-datalakegen2-connection.yaml index 93a01cb338..875093bae6 100644 --- a/athena-datalakegen2/athena-datalakegen2-connection.yaml +++ b/athena-datalakegen2/athena-datalakegen2-connection.yaml @@ -51,6 +51,8 @@ Conditions: HasKmsKeyId: !Not [ !Equals [ !Ref KmsKeyId, "" ] ] NotHasLambdaRole: !Equals [ !Ref LambdaRoleArn, "" ] CreateKmsPolicy: !And [ !Condition HasKmsKeyId, !Condition NotHasLambdaRole ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: @@ -61,7 +63,9 @@ Resources: glue_connection: !Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-datalakegen2:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-datalakegen2:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] ImageConfig: Command: [ "com.amazonaws.athena.connectors.datalakegen2.DataLakeGen2CompositeHandler" ] Description: "Enables Amazon Athena to communicate with DataLake Gen2 using JDBC" diff --git a/athena-db2-as400/athena-db2-as400-connection.yaml b/athena-db2-as400/athena-db2-as400-connection.yaml index a55586143c..1f245c8491 100644 --- a/athena-db2-as400/athena-db2-as400-connection.yaml +++ b/athena-db2-as400/athena-db2-as400-connection.yaml @@ -52,6 +52,8 @@ Conditions: HasKmsKeyId: !Not [!Equals [!Ref KmsKeyId, ""]] NotHasLambdaRole: !Equals [!Ref LambdaRoleArn, ""] CreateKmsPolicy: !And [!Condition HasKmsKeyId, !Condition NotHasLambdaRole] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: @@ -62,7 +64,9 @@ Resources: glue_connection: !Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-db2-as400:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-db2-as400:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] ImageConfig: Command: [ "com.amazonaws.athena.connectors.db2as400.Db2As400CompositeHandler" ] Description: "Enables Amazon Athena to communicate with DB2 on iSeries (AS400) using JDBC" diff --git a/athena-db2/athena-db2-connection.yaml b/athena-db2/athena-db2-connection.yaml index 5d4fa52892..34ad745ff1 100644 --- a/athena-db2/athena-db2-connection.yaml +++ b/athena-db2/athena-db2-connection.yaml @@ -52,6 +52,8 @@ Conditions: HasKmsKeyId: !Not [ !Equals [ !Ref KmsKeyId, "" ] ] NotHasLambdaRole: !Equals [ !Ref LambdaRoleArn, "" ] CreateKmsPolicy: !And [ !Condition HasKmsKeyId, !Condition NotHasLambdaRole ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: @@ -62,7 +64,9 @@ Resources: glue_connection: !Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-db2:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-db2:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] ImageConfig: Command: [ "com.amazonaws.athena.connectors.db2.Db2CompositeHandler" ] Description: "Enables Amazon Athena to communicate with DB2 using JDBC" diff --git a/athena-docdb/athena-docdb-connection.yaml b/athena-docdb/athena-docdb-connection.yaml index 6caa42b15e..1f1d6e0841 100644 --- a/athena-docdb/athena-docdb-connection.yaml +++ b/athena-docdb/athena-docdb-connection.yaml @@ -45,6 +45,8 @@ Conditions: HasKmsKeyId: !Not [!Equals [!Ref KmsKeyId, ""]] NotHasLambdaRole: !Equals [!Ref LambdaRoleArn, ""] CreateKmsPolicy: !And [!Condition HasKmsKeyId, !Condition NotHasLambdaRole] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: ConnectorConfig: @@ -55,7 +57,9 @@ Resources: glue_connection: !Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-docdb:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-docdb:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] Description: "Enables Amazon Athena to communicate with DocumentDB, making your DocumentDB data accessible via SQL." Timeout: 900 MemorySize: 3008 diff --git a/athena-dynamodb/athena-dynamodb-connection.yaml b/athena-dynamodb/athena-dynamodb-connection.yaml index 505d1b1e7f..600bb49697 100644 --- a/athena-dynamodb/athena-dynamodb-connection.yaml +++ b/athena-dynamodb/athena-dynamodb-connection.yaml @@ -36,6 +36,8 @@ Conditions: HasKmsKeyId: !Not [!Equals [!Ref KmsKeyId, ""]] NotHasLambdaRole: !Equals [!Ref LambdaRoleArn, ""] CreateKmsPolicy: !And [!Condition HasKmsKeyId, !Condition NotHasLambdaRole] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: ConnectorConfig: @@ -46,7 +48,9 @@ Resources: glue_connection: !Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-dynamodb:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-dynamodb:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] Description: "Enables Amazon Athena to communicate with DynamoDB, making your tables accessible via SQL" Timeout: 900 MemorySize: 3008 diff --git a/athena-elasticsearch/athena-elasticsearch-connection.yaml b/athena-elasticsearch/athena-elasticsearch-connection.yaml index 6e58f5e8f1..e2c051882f 100644 --- a/athena-elasticsearch/athena-elasticsearch-connection.yaml +++ b/athena-elasticsearch/athena-elasticsearch-connection.yaml @@ -53,6 +53,8 @@ Conditions: HasKmsKeyId: !Not [ !Equals [ !Ref KmsKeyId, "" ] ] NotHasLambdaRole: !Equals [ !Ref LambdaRoleArn, "" ] CreateKmsPolicy: !And [ !Condition HasKmsKeyId, !Condition NotHasLambdaRole ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: ConnectorConfig: @@ -63,7 +65,9 @@ Resources: glue_connection: !Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-elasticsearch:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-elasticsearch:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] Description: "The Elasticsearch Lambda Connector provides Athena users the ability to query data stored on Elasticsearch clusters." Timeout: 900 MemorySize: 3008 diff --git a/athena-gcs/athena-gcs-connection.yaml b/athena-gcs/athena-gcs-connection.yaml index e514c170c0..304e998c88 100644 --- a/athena-gcs/athena-gcs-connection.yaml +++ b/athena-gcs/athena-gcs-connection.yaml @@ -40,6 +40,8 @@ Conditions: HasKmsKeyId: !Not [!Equals [!Ref KmsKeyId, ""]] NotHasLambdaRole: !Equals [!Ref LambdaRoleArn, ""] CreateKmsPolicy: !And [!Condition HasKmsKeyId, !Condition NotHasLambdaRole] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: AthenaGCSConnector: @@ -50,7 +52,9 @@ Resources: glue_connection: !Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-gcs:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-gcs:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] Description: "Amazon Athena GCS Connector" Timeout: 900 MemorySize: 3008 diff --git a/athena-google-bigquery/athena-google-bigquery-connection.yaml b/athena-google-bigquery/athena-google-bigquery-connection.yaml index b06057c3d5..6ed37cde58 100644 --- a/athena-google-bigquery/athena-google-bigquery-connection.yaml +++ b/athena-google-bigquery/athena-google-bigquery-connection.yaml @@ -52,6 +52,8 @@ Conditions: HasKmsKeyId: !Not [ !Equals [ !Ref KmsKeyId, "" ] ] NotHasLambdaRole: !Equals [ !Ref LambdaRoleArn, "" ] CreateKmsPolicy: !And [ !Condition HasKmsKeyId, !Condition NotHasLambdaRole ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: AthenaBigQueryConnector: @@ -63,7 +65,9 @@ Resources: GOOGLE_APPLICATION_CREDENTIALS: '/tmp/service-account.json' FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-google-bigquery:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-google-bigquery:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] Description: "Enables Amazon Athena to communicate with BigQuery using Google SDK" Timeout: 900 MemorySize: 3008 diff --git a/athena-hbase/athena-hbase-connection.yaml b/athena-hbase/athena-hbase-connection.yaml index e8b9e8bd52..e950f7e16d 100644 --- a/athena-hbase/athena-hbase-connection.yaml +++ b/athena-hbase/athena-hbase-connection.yaml @@ -45,6 +45,8 @@ Conditions: HasKmsKeyId: !Not [ !Equals [ !Ref KmsKeyId, "" ] ] NotHasLambdaRole: !Equals [ !Ref LambdaRoleArn, "" ] CreateKmsPolicy: !And [ !Condition HasKmsKeyId, !Condition NotHasLambdaRole ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: ConnectorConfig: @@ -55,7 +57,9 @@ Resources: glue_connection: !Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-hbase:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-hbase:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] Description: "Enables Amazon Athena to communicate with HBase, making your HBase data accessible via SQL" Timeout: 900 MemorySize: 3008 diff --git a/athena-hortonworks-hive/athena-hortonworks-hive-connection.yaml b/athena-hortonworks-hive/athena-hortonworks-hive-connection.yaml index d75c03443b..9c92230e5a 100644 --- a/athena-hortonworks-hive/athena-hortonworks-hive-connection.yaml +++ b/athena-hortonworks-hive/athena-hortonworks-hive-connection.yaml @@ -49,6 +49,8 @@ Conditions: HasKmsKeyId: !Not [ !Equals [ !Ref KmsKeyId, "" ] ] NotHasLambdaRole: !Equals [ !Ref LambdaRoleArn, "" ] CreateKmsPolicy: !And [ !Condition HasKmsKeyId, !Condition NotHasLambdaRole ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: @@ -59,7 +61,9 @@ Resources: glue_connection: !Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-hortonworks-hive:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-hortonworks-hive:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] ImageConfig: Command: [ "com.amazonaws.athena.connectors.hortonworks.HiveCompositeHandler" ] Description: "Enables Amazon Athena to communicate with Hortonworks Hive using JDBC" diff --git a/athena-msk/athena-msk-connection.yaml b/athena-msk/athena-msk-connection.yaml index 491ff8985f..d8649830a0 100644 --- a/athena-msk/athena-msk-connection.yaml +++ b/athena-msk/athena-msk-connection.yaml @@ -51,6 +51,8 @@ Conditions: HasKmsKeyId: !Not [ !Equals [ !Ref KmsKeyId, "" ] ] NotHasLambdaRole: !Equals [ !Ref LambdaRoleArn, "" ] CreateKmsPolicy: !And [ !Condition HasKmsKeyId, !Condition NotHasLambdaRole ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: AthenaMSKConnector: @@ -61,7 +63,9 @@ Resources: glue_connection: !Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-msk:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-msk:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] Description: "Enables Amazon Athena to communicate with MSK clusters" Timeout: 900 MemorySize: 3008 diff --git a/athena-mysql/athena-mysql-connection.yaml b/athena-mysql/athena-mysql-connection.yaml index b5165260d8..68cb803e91 100644 --- a/athena-mysql/athena-mysql-connection.yaml +++ b/athena-mysql/athena-mysql-connection.yaml @@ -45,6 +45,8 @@ Conditions: HasKmsKeyId: !Not [ !Equals [ !Ref KmsKeyId, "" ] ] NotHasLambdaRole: !Equals [ !Ref LambdaRoleArn, "" ] CreateKmsPolicy: !And [ !Condition HasKmsKeyId, !Condition NotHasLambdaRole ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: @@ -55,7 +57,9 @@ Resources: glue_connection: !Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-mysql:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-mysql:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] ImageConfig: Command: [ "com.amazonaws.athena.connectors.mysql.MySqlCompositeHandler" ] Description: "Enables Amazon Athena to communicate with MySQL using JDBC" diff --git a/athena-neptune/athena-neptune-connection.yaml b/athena-neptune/athena-neptune-connection.yaml index 46705c4938..f0d7e098e8 100644 --- a/athena-neptune/athena-neptune-connection.yaml +++ b/athena-neptune/athena-neptune-connection.yaml @@ -47,6 +47,8 @@ Conditions: HasKmsKeyId: !Not [ !Equals [ !Ref KmsKeyId, "" ] ] NotHasLambdaRole: !Equals [ !Ref LambdaRoleArn, "" ] CreateKmsPolicy: !And [ !Condition HasKmsKeyId, !Condition NotHasLambdaRole ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: ConnectorConfig: @@ -58,7 +60,9 @@ Resources: SERVICE_REGION: !Ref AWS::Region FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-neptune:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-neptune:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] Description: "Enables Amazon Athena to communicate with Neptune, making your Neptune graph data accessible via SQL." Timeout: 900 MemorySize: 3008 diff --git a/athena-oracle/athena-oracle-connection.yaml b/athena-oracle/athena-oracle-connection.yaml index abd8648fce..0deb4b184c 100644 --- a/athena-oracle/athena-oracle-connection.yaml +++ b/athena-oracle/athena-oracle-connection.yaml @@ -47,6 +47,8 @@ Conditions: HasKmsKeyId: !Not [ !Equals [ !Ref KmsKeyId, "" ] ] NotHasLambdaRole: !Equals [ !Ref LambdaRoleArn, "" ] CreateKmsPolicy: !And [ !Condition HasKmsKeyId, !Condition NotHasLambdaRole ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -56,7 +58,9 @@ Resources: glue_connection: !Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-oracle:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-oracle:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] ImageConfig: Command: [ "com.amazonaws.athena.connectors.oracle.OracleCompositeHandler" ] Description: "Enables Amazon Athena to communicate with ORACLE using JDBC" diff --git a/athena-postgresql/athena-postgresql-connection.yaml b/athena-postgresql/athena-postgresql-connection.yaml index 26e1c096bb..cebadb96ec 100644 --- a/athena-postgresql/athena-postgresql-connection.yaml +++ b/athena-postgresql/athena-postgresql-connection.yaml @@ -54,6 +54,8 @@ Conditions: HasKmsKeyId: !Not [ !Equals [ !Ref KmsKeyId, "" ] ] NotHasLambdaRole: !Equals [ !Ref LambdaRoleArn, "" ] CreateKmsPolicy: !And [ !Condition HasKmsKeyId, !Condition NotHasLambdaRole ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: @@ -64,7 +66,9 @@ Resources: glue_connection: !Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-postgresql:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-postgresql:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] Description: "Enables Amazon Athena to communicate with PostgreSQL using JDBC" Timeout: 900 MemorySize: 3008 diff --git a/athena-redis/athena-redis-connection.yaml b/athena-redis/athena-redis-connection.yaml index b901cfb39b..adf5552f00 100644 --- a/athena-redis/athena-redis-connection.yaml +++ b/athena-redis/athena-redis-connection.yaml @@ -44,6 +44,8 @@ Conditions: HasKmsKeyId: !Not [ !Equals [ !Ref KmsKeyId, "" ] ] NotHasLambdaRole: !Equals [ !Ref LambdaRoleArn, "" ] CreateKmsPolicy: !And [ !Condition HasKmsKeyId, !Condition NotHasLambdaRole ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: ConnectorConfig: Type: 'AWS::Serverless::Function' @@ -53,7 +55,9 @@ Resources: glue_connection: !Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-redis:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-redis:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] Description: "Enables Amazon Athena to communicate with Redis, making your Redis data accessible via SQL" Timeout: 900 MemorySize: 3008 diff --git a/athena-redshift/athena-redshift-connection.yaml b/athena-redshift/athena-redshift-connection.yaml index 05a4728372..9c63a6ffde 100644 --- a/athena-redshift/athena-redshift-connection.yaml +++ b/athena-redshift/athena-redshift-connection.yaml @@ -44,6 +44,8 @@ Conditions: HasKmsKeyId: !Not [!Equals [!Ref KmsKeyId, ""]] NotHasLambdaRole: !Equals [!Ref LambdaRoleArn, ""] CreateKmsPolicy: !And [!Condition NotHasLambdaRole, !Condition HasKmsKeyId] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -53,7 +55,9 @@ Resources: glue_connection: !Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-redshift:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-redshift:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] ImageConfig: Command: [ "com.amazonaws.athena.connectors.redshift.RedshiftCompositeHandler" ] Description: "Enables Amazon Athena to communicate with Redshift using JDBC" diff --git a/athena-saphana/athena-saphana-connection.yaml b/athena-saphana/athena-saphana-connection.yaml index 656049b169..7a58a1a271 100644 --- a/athena-saphana/athena-saphana-connection.yaml +++ b/athena-saphana/athena-saphana-connection.yaml @@ -49,6 +49,8 @@ Conditions: HasKmsKeyId: !Not [ !Equals [ !Ref KmsKeyId, "" ] ] NotHasLambdaRole: !Equals [ !Ref LambdaRoleArn, "" ] CreateKmsPolicy: !And [ !Condition HasKmsKeyId, !Condition NotHasLambdaRole ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: @@ -59,7 +61,9 @@ Resources: glue_connection: !Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-saphana:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-saphana:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] ImageConfig: Command: [ "com.amazonaws.athena.connectors.saphana.SaphanaCompositeHandler" ] Description: "Enables Amazon Athena to communicate with Teradata using JDBC" diff --git a/athena-snowflake/athena-snowflake-connection.yaml b/athena-snowflake/athena-snowflake-connection.yaml index b1cd847087..af2d35782e 100644 --- a/athena-snowflake/athena-snowflake-connection.yaml +++ b/athena-snowflake/athena-snowflake-connection.yaml @@ -49,6 +49,8 @@ Conditions: HasKmsKeyId: !Not [ !Equals [ !Ref KmsKeyId, "" ] ] NotHasLambdaRole: !Equals [ !Ref LambdaRoleArn, "" ] CreateKmsPolicy: !And [ !Condition HasKmsKeyId, !Condition NotHasLambdaRole ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: @@ -59,7 +61,9 @@ Resources: glue_connection: !Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-snowflake:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-snowflake:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] ImageConfig: Command: [ "com.amazonaws.athena.connectors.snowflake.SnowflakeCompositeHandler" ] Description: "Enables Amazon Athena to communicate with Snowflake using JDBC" diff --git a/athena-sqlserver/athena-sqlserver-connection.yaml b/athena-sqlserver/athena-sqlserver-connection.yaml index 59d952b43a..54ba72b3a8 100644 --- a/athena-sqlserver/athena-sqlserver-connection.yaml +++ b/athena-sqlserver/athena-sqlserver-connection.yaml @@ -50,6 +50,8 @@ Conditions: HasKmsKeyId: !Not [ !Equals [ !Ref KmsKeyId, "" ] ] NotHasLambdaRole: !Equals [ !Ref LambdaRoleArn, "" ] CreateKmsPolicy: !And [ !Condition HasKmsKeyId, !Condition NotHasLambdaRole ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -59,7 +61,9 @@ Resources: glue_connection: !Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-sqlserver:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-sqlserver:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] ImageConfig: Command: [ "com.amazonaws.athena.connectors.sqlserver.SqlServerCompositeHandler" ] Description: "Enables Amazon Athena to communicate with SQLSERVER using JDBC" diff --git a/athena-synapse/athena-synapse-connection.yaml b/athena-synapse/athena-synapse-connection.yaml index bf9d3fd9fe..56645fd176 100644 --- a/athena-synapse/athena-synapse-connection.yaml +++ b/athena-synapse/athena-synapse-connection.yaml @@ -51,6 +51,8 @@ Conditions: HasKmsKeyId: !Not [ !Equals [ !Ref KmsKeyId, "" ] ] NotHasLambdaRole: !Equals [ !Ref LambdaRoleArn, "" ] CreateKmsPolicy: !And [ !Condition HasKmsKeyId, !Condition NotHasLambdaRole ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: @@ -61,7 +63,9 @@ Resources: glue_connection: !Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-synapse:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-synapse:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] ImageConfig: Command: [ "com.amazonaws.athena.connectors.synapse.SynapseCompositeHandler" ] Description: "Enables Amazon Athena to communicate with SYNPASE using JDBC" diff --git a/athena-teradata/athena-teradata-connection.yaml b/athena-teradata/athena-teradata-connection.yaml index 51f1074674..dcdc786e9c 100644 --- a/athena-teradata/athena-teradata-connection.yaml +++ b/athena-teradata/athena-teradata-connection.yaml @@ -48,6 +48,8 @@ Conditions: HasKmsKeyId: !Not [ !Equals [ !Ref KmsKeyId, "" ] ] NotHasLambdaRole: !Equals [ !Ref LambdaRoleArn, "" ] CreateKmsPolicy: !And [ !Condition HasKmsKeyId, !Condition NotHasLambdaRole ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -57,7 +59,9 @@ Resources: glue_connection: !Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-teradata:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-teradata:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] ImageConfig: Command: [ "com.amazonaws.athena.connectors.teradata.TeradataCompositeHandler" ] Description: "Enables Amazon Athena to communicate with Teradata using JDBC" diff --git a/athena-timestream/athena-timestream-connection.yaml b/athena-timestream/athena-timestream-connection.yaml index 5d73156b3c..288cbfea47 100644 --- a/athena-timestream/athena-timestream-connection.yaml +++ b/athena-timestream/athena-timestream-connection.yaml @@ -35,6 +35,8 @@ Conditions: HasKmsKeyId: !Not [ !Equals [ !Ref KmsKeyId, "" ] ] NotHasLambdaRole: !Equals [ !Ref LambdaRoleArn, "" ] CreateKmsPolicy: !And [ !Condition HasKmsKeyId, !Condition NotHasLambdaRole ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: ConnectorConfig: Type: 'AWS::Serverless::Function' @@ -44,7 +46,9 @@ Resources: glue_connection: !Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-timestream:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-timestream:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] Description: "Enables Amazon Athena to communicate with Amazon Timestream, making your time series data accessible from Athena." Timeout: 900 MemorySize: 3008 diff --git a/athena-tpcds/athena-tpcds-connection.yaml b/athena-tpcds/athena-tpcds-connection.yaml index db51aa5664..e5b77b3312 100644 --- a/athena-tpcds/athena-tpcds-connection.yaml +++ b/athena-tpcds/athena-tpcds-connection.yaml @@ -36,6 +36,8 @@ Conditions: HasKmsKeyId: !Not [ !Equals [ !Ref KmsKeyId, "" ] ] NotHasLambdaRole: !Equals [ !Ref LambdaRoleArn, "" ] CreateKmsPolicy: !And [ !Condition HasKmsKeyId, !Condition NotHasLambdaRole ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: ConnectorConfig: @@ -46,7 +48,9 @@ Resources: glue_connection: Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-tpcds:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-tpcds:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] Description: "This connector enables Amazon Athena to communicate with a randomly generated TPC-DS data source." Timeout: 900 MemorySize: 3008 diff --git a/athena-vertica/athena-vertica-connection.yaml b/athena-vertica/athena-vertica-connection.yaml index 778cc7511c..502c3ac451 100644 --- a/athena-vertica/athena-vertica-connection.yaml +++ b/athena-vertica/athena-vertica-connection.yaml @@ -52,6 +52,8 @@ Conditions: HasKmsKeyId: !Not [ !Equals [ !Ref KmsKeyId, "" ] ] NotHasLambdaRole: !Equals [ !Ref LambdaRoleArn, "" ] CreateKmsPolicy: !And [ !Condition HasKmsKeyId, !Condition NotHasLambdaRole ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: ConnectorConfig: @@ -62,7 +64,9 @@ Resources: glue_connection: !Ref GlueConnection FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-vertica:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-vertica:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] Description: "Amazon Athena Vertica Connector" Timeout: 900 MemorySize: 3008