diff --git a/athena-aws-cmdb/athena-aws-cmdb.yaml b/athena-aws-cmdb/athena-aws-cmdb.yaml index 4365e6781..8ead0e1db 100644 --- a/athena-aws-cmdb/athena-aws-cmdb.yaml +++ b/athena-aws-cmdb/athena-aws-cmdb.yaml @@ -42,6 +42,8 @@ Parameters: Type: String Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] + 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: spill_prefix: !Ref SpillPrefix FunctionName: !Ref AthenaCatalogName 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: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-clickhouse/athena-clickhouse.yaml b/athena-clickhouse/athena-clickhouse.yaml index 259aae719..8f65ef101 100644 --- a/athena-clickhouse/athena-clickhouse.yaml +++ b/athena-clickhouse/athena-clickhouse.yaml @@ -59,6 +59,8 @@ Parameters: Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] NotHasLambdaRole: !Equals [!Ref LambdaRoleARN, ""] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -71,7 +73,9 @@ Resources: default: !Ref DefaultConnectionString FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-clickhouse:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-clickhouse:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] Description: "Enables Amazon Athena to communicate with ClickHouse using JDBC" Timeout: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-cloudera-hive/athena-cloudera-hive.yaml b/athena-cloudera-hive/athena-cloudera-hive.yaml index 70f2775b1..bc9da142a 100644 --- a/athena-cloudera-hive/athena-cloudera-hive.yaml +++ b/athena-cloudera-hive/athena-cloudera-hive.yaml @@ -54,6 +54,8 @@ Parameters: Type: String Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -66,7 +68,9 @@ Resources: default: !Ref DefaultConnectionString 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]] Description: "Enables Amazon Athena to communicate with Coludera Hive using JDBC" Timeout: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-cloudera-impala/athena-cloudera-impala.yaml b/athena-cloudera-impala/athena-cloudera-impala.yaml index 60dc37ed9..adf96ece5 100644 --- a/athena-cloudera-impala/athena-cloudera-impala.yaml +++ b/athena-cloudera-impala/athena-cloudera-impala.yaml @@ -59,6 +59,8 @@ Parameters: Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] HasLambdaEncryptionKmsKeyARN: !Not [ !Equals [ !Ref LambdaEncryptionKmsKeyARN, "" ] ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -71,7 +73,9 @@ Resources: default: !Ref DefaultConnectionString 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]] Description: "Enables Amazon Athena to communicate with Cloudera Impala using JDBC" Timeout: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-cloudwatch-metrics/athena-cloudwatch-metrics.yaml b/athena-cloudwatch-metrics/athena-cloudwatch-metrics.yaml index 974b979e3..5f4ce7585 100644 --- a/athena-cloudwatch-metrics/athena-cloudwatch-metrics.yaml +++ b/athena-cloudwatch-metrics/athena-cloudwatch-metrics.yaml @@ -42,6 +42,8 @@ Parameters: Type: String Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] + 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: spill_prefix: !Ref SpillPrefix FunctionName: !Ref AthenaCatalogName 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: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-cloudwatch/athena-cloudwatch.yaml b/athena-cloudwatch/athena-cloudwatch.yaml index 2e301dc88..67e286740 100644 --- a/athena-cloudwatch/athena-cloudwatch.yaml +++ b/athena-cloudwatch/athena-cloudwatch.yaml @@ -54,7 +54,8 @@ Conditions: NotHasLambdaRole: !Equals [!Ref LambdaRole, ""] HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] 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' @@ -67,7 +68,9 @@ Resources: kms_key_id: !If [HasKMSKeyId, !Ref KMSKeyId, !Ref "AWS::NoValue"] FunctionName: !Ref AthenaCatalogName 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: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-datalakegen2/athena-datalakegen2.yaml b/athena-datalakegen2/athena-datalakegen2.yaml index 589040251..96750e019 100644 --- a/athena-datalakegen2/athena-datalakegen2.yaml +++ b/athena-datalakegen2/athena-datalakegen2.yaml @@ -60,6 +60,8 @@ Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] HasSecurityGroups: !Not [ !Equals [ !Join ["", !Ref SecurityGroupIds], "" ] ] HasSubnets: !Not [ !Equals [ !Join ["", !Ref SubnetIds], "" ] ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -72,7 +74,9 @@ Resources: default: !Ref DefaultConnectionString 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]] Description: "Enables Amazon Athena to communicate with DataLake Gen2 using JDBC" Timeout: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-db2-as400/athena-db2-as400.yaml b/athena-db2-as400/athena-db2-as400.yaml index ea0a33105..1b6cf39bf 100644 --- a/athena-db2-as400/athena-db2-as400.yaml +++ b/athena-db2-as400/athena-db2-as400.yaml @@ -61,6 +61,8 @@ Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] HasSecurityGroups: !Not [ !Equals [ !Join ["", !Ref SecurityGroupIds], "" ] ] HasSubnets: !Not [ !Equals [ !Join ["", !Ref SubnetIds], "" ] ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -73,7 +75,9 @@ Resources: default: !Ref DefaultConnectionString 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]] Description: "Enables Amazon Athena to communicate with DB2 on iSeries (AS400) using JDBC" Timeout: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-db2/athena-db2.yaml b/athena-db2/athena-db2.yaml index 7508f1671..d82d9585f 100644 --- a/athena-db2/athena-db2.yaml +++ b/athena-db2/athena-db2.yaml @@ -61,6 +61,8 @@ Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] HasSecurityGroups: !Not [ !Equals [ !Join ["", !Ref SecurityGroupIds], "" ] ] HasSubnets: !Not [ !Equals [ !Join ["", !Ref SubnetIds], "" ] ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -73,7 +75,9 @@ Resources: default: !Ref DefaultConnectionString 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]] Description: "Enables Amazon Athena to communicate with DB2 using JDBC" Timeout: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-docdb/athena-docdb.yaml b/athena-docdb/athena-docdb.yaml index 588b05f52..5b8a91261 100644 --- a/athena-docdb/athena-docdb.yaml +++ b/athena-docdb/athena-docdb.yaml @@ -55,6 +55,8 @@ Parameters: Type: String Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: ConnectorConfig: Type: 'AWS::Serverless::Function' @@ -67,7 +69,9 @@ Resources: default_docdb: !Ref DocDBConnectionString FunctionName: !Ref AthenaCatalogName 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: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-dynamodb/athena-dynamodb.yaml b/athena-dynamodb/athena-dynamodb.yaml index f44ac8966..7793c452b 100644 --- a/athena-dynamodb/athena-dynamodb.yaml +++ b/athena-dynamodb/athena-dynamodb.yaml @@ -54,7 +54,8 @@ Conditions: NotHasLambdaRole: !Equals [!Ref LambdaRole, ""] HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] 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' @@ -67,7 +68,9 @@ Resources: kms_key_id: !If [HasKMSKeyId, !Ref KMSKeyId, !Ref "AWS::NoValue"] FunctionName: !Ref AthenaCatalogName 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: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-elasticsearch/athena-elasticsearch.yaml b/athena-elasticsearch/athena-elasticsearch.yaml index c2e6603bf..7a57683d0 100644 --- a/athena-elasticsearch/athena-elasticsearch.yaml +++ b/athena-elasticsearch/athena-elasticsearch.yaml @@ -86,7 +86,8 @@ Parameters: Conditions: IsVPCAccessSelected: !Equals [!Ref IsVPCAccess, true] HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] - + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: ConnectorConfig: Type: 'AWS::Serverless::Function' @@ -103,7 +104,9 @@ Resources: query_scroll_timeout: !Ref QueryScrollTimeout FunctionName: !Sub "${AthenaCatalogName}" 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: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-example/athena-example.yaml b/athena-example/athena-example.yaml index 8f019191e..19230b92a 100644 --- a/athena-example/athena-example.yaml +++ b/athena-example/athena-example.yaml @@ -42,7 +42,6 @@ Parameters: Description: "WARNING: If set to 'true' encryption for spilled data is disabled." Default: "false" Type: String - Resources: ConnectorConfig: Type: 'AWS::Serverless::Function' diff --git a/athena-gcs/athena-gcs.yaml b/athena-gcs/athena-gcs.yaml index fa97bc7f8..80ce5a6cb 100644 --- a/athena-gcs/athena-gcs.yaml +++ b/athena-gcs/athena-gcs.yaml @@ -47,7 +47,8 @@ Parameters: Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] - + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: AthenaGCSConnector: Type: 'AWS::Serverless::Function' @@ -60,7 +61,9 @@ Resources: secret_manager_gcp_creds_name: !Ref GCSSecretName 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: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-google-bigquery/athena-google-bigquery.yaml b/athena-google-bigquery/athena-google-bigquery.yaml index 6cdf0cb29..42acf445f 100644 --- a/athena-google-bigquery/athena-google-bigquery.yaml +++ b/athena-google-bigquery/athena-google-bigquery.yaml @@ -65,6 +65,8 @@ Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] HasSecurityGroups: !Not [ !Equals [ !Join ["", !Ref SecurityGroupIds], "" ] ] HasSubnets: !Not [ !Equals [ !Join ["", !Ref SubnetIds], "" ] ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: AthenaBigQueryConnector: Type: 'AWS::Serverless::Function' @@ -80,7 +82,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: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-hbase/athena-hbase.yaml b/athena-hbase/athena-hbase.yaml index c9d70a24e..ba51dfd82 100644 --- a/athena-hbase/athena-hbase.yaml +++ b/athena-hbase/athena-hbase.yaml @@ -70,6 +70,8 @@ Parameters: Type: String Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: ConnectorConfig: Type: 'AWS::Serverless::Function' @@ -86,7 +88,9 @@ Resources: hbase_rpc_protection: !Ref HbaseRpcProtection FunctionName: !Ref AthenaCatalogName 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: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-hortonworks-hive/athena-hortonworks-hive.yaml b/athena-hortonworks-hive/athena-hortonworks-hive.yaml index 8f941be49..8c1ac3a17 100644 --- a/athena-hortonworks-hive/athena-hortonworks-hive.yaml +++ b/athena-hortonworks-hive/athena-hortonworks-hive.yaml @@ -58,6 +58,8 @@ Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] HasSecurityGroups: !Not [ !Equals [ !Join ["", !Ref SecurityGroupIds], "" ] ] HasSubnets: !Not [ !Equals [ !Join ["", !Ref SubnetIds], "" ] ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -70,7 +72,9 @@ Resources: default: !Ref DefaultConnectionString 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]] Description: "Enables Amazon Athena to communicate with Hortonworks Hive using JDBC" Timeout: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-kafka/athena-kafka.yaml b/athena-kafka/athena-kafka.yaml index 27fd31b9c..9606527e6 100644 --- a/athena-kafka/athena-kafka.yaml +++ b/athena-kafka/athena-kafka.yaml @@ -85,7 +85,8 @@ Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] HasSecurityGroups: !Not [ !Equals [ !Join ["", !Ref SecurityGroupIds], "" ] ] HasSubnets: !Not [ !Equals [ !Join ["", !Ref SubnetIds], "" ] ] - + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: AthenaKafkaConnector: Type: 'AWS::Serverless::Function' @@ -102,7 +103,9 @@ Resources: auth_type: !Ref AuthType FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-kafka:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-kafka:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] Description: "Enables Amazon Athena to communicate with Kafka clusters" Timeout: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-msk/athena-msk.yaml b/athena-msk/athena-msk.yaml index 4921ad4d0..ab06956c0 100644 --- a/athena-msk/athena-msk.yaml +++ b/athena-msk/athena-msk.yaml @@ -81,7 +81,8 @@ Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] HasSecurityGroups: !Not [ !Equals [ !Join ["", !Ref SecurityGroupIds], "" ] ] HasSubnets: !Not [ !Equals [ !Join ["", !Ref SubnetIds], "" ] ] - + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: AthenaMSKConnector: Type: 'AWS::Serverless::Function' @@ -97,7 +98,9 @@ Resources: auth_type: !Ref AuthType 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: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-mysql/athena-mysql.yaml b/athena-mysql/athena-mysql.yaml index 145745b88..2b0d305c3 100644 --- a/athena-mysql/athena-mysql.yaml +++ b/athena-mysql/athena-mysql.yaml @@ -59,6 +59,8 @@ Parameters: Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] NotHasLambdaRole: !Equals [!Ref LambdaRoleARN, ""] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -71,7 +73,9 @@ Resources: default: !Ref DefaultConnectionString 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]] Description: "Enables Amazon Athena to communicate with MySQL using JDBC" Timeout: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-neptune/athena-neptune.yaml b/athena-neptune/athena-neptune.yaml index 114314291..a468eeffb 100644 --- a/athena-neptune/athena-neptune.yaml +++ b/athena-neptune/athena-neptune.yaml @@ -77,7 +77,8 @@ Parameters: Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] - + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: ConnectorConfig: Type: 'AWS::Serverless::Function' @@ -97,7 +98,9 @@ Resources: enable_caseinsensitivematch: !Ref EnableCaseInsensitiveMatch FunctionName: !Ref AthenaCatalogName 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: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-oracle/athena-oracle.yaml b/athena-oracle/athena-oracle.yaml index e086cf82c..58d8329dc 100644 --- a/athena-oracle/athena-oracle.yaml +++ b/athena-oracle/athena-oracle.yaml @@ -70,6 +70,8 @@ Conditions: NotHasLambdaRole: !Equals [!Ref LambdaRoleARN, ""] HasSecurityGroups: !Not [ !Equals [ !Join ["", !Ref SecurityGroupIds], "" ] ] HasSubnets: !Not [ !Equals [ !Join ["", !Ref SubnetIds], "" ] ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -83,7 +85,9 @@ Resources: is_FIPS_Enabled: !Ref IsFIPSEnabled 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]] Description: "Enables Amazon Athena to communicate with ORACLE using JDBC" Timeout: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-postgresql/athena-postgresql.yaml b/athena-postgresql/athena-postgresql.yaml index 30553623e..1752d485e 100644 --- a/athena-postgresql/athena-postgresql.yaml +++ b/athena-postgresql/athena-postgresql.yaml @@ -69,6 +69,8 @@ Parameters: Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] NotHasLambdaRole: !Equals [!Ref LambdaRoleARN, ""] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -82,7 +84,9 @@ Resources: default_scale: !Ref DefaultScale 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]] ImageConfig: Command: [ !Sub "com.amazonaws.athena.connectors.postgresql.${CompositeHandler}" ] Description: "Enables Amazon Athena to communicate with PostgreSQL using JDBC" diff --git a/athena-redis/athena-redis.yaml b/athena-redis/athena-redis.yaml index c3bc54175..5d18c7ced 100644 --- a/athena-redis/athena-redis.yaml +++ b/athena-redis/athena-redis.yaml @@ -67,6 +67,8 @@ Parameters: Type: Number Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: ConnectorConfig: Type: 'AWS::Serverless::Function' @@ -82,7 +84,9 @@ Resources: qpt_db_number: !Ref QPTConnectionDBNumber FunctionName: !Ref AthenaCatalogName 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: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-redshift/athena-redshift.yaml b/athena-redshift/athena-redshift.yaml index 47cd238f8..58686808d 100644 --- a/athena-redshift/athena-redshift.yaml +++ b/athena-redshift/athena-redshift.yaml @@ -67,6 +67,8 @@ Conditions: - !Condition NotHasLambdaRole - !Condition HasKMSKeyId HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -80,7 +82,9 @@ Resources: kms_key_id: !If [HasKMSKeyId, !Ref KMSKeyId, !Ref "AWS::NoValue"] 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]] Description: "Enables Amazon Athena to communicate with Redshift using JDBC" Timeout: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-saphana/athena-saphana.yaml b/athena-saphana/athena-saphana.yaml index 5a1d89593..201816368 100644 --- a/athena-saphana/athena-saphana.yaml +++ b/athena-saphana/athena-saphana.yaml @@ -58,6 +58,8 @@ Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] HasSecurityGroups: !Not [ !Equals [ !Join ["", !Ref SecurityGroupIds], "" ] ] HasSubnets: !Not [ !Equals [ !Join ["", !Ref SubnetIds], "" ] ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -70,7 +72,9 @@ Resources: default: !Ref DefaultConnectionString 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]] Description: "Enables Amazon Athena to communicate with Teradata using JDBC" Timeout: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-snowflake/athena-snowflake.yaml b/athena-snowflake/athena-snowflake.yaml index 67bac6e7a..0646c8a5e 100644 --- a/athena-snowflake/athena-snowflake.yaml +++ b/athena-snowflake/athena-snowflake.yaml @@ -58,6 +58,8 @@ Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] HasSecurityGroups: !Not [ !Equals [ !Join ["", !Ref SecurityGroupIds], "" ] ] HasSubnets: !Not [ !Equals [ !Join ["", !Ref SubnetIds], "" ] ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -70,7 +72,9 @@ Resources: default: !Ref DefaultConnectionString 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]] Description: "Enables Amazon Athena to communicate with Snowflake using JDBC" Timeout: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-sqlserver/athena-sqlserver.yaml b/athena-sqlserver/athena-sqlserver.yaml index 9f09edfc8..8edbf4e08 100644 --- a/athena-sqlserver/athena-sqlserver.yaml +++ b/athena-sqlserver/athena-sqlserver.yaml @@ -65,6 +65,8 @@ Conditions: NotHasLambdaRole: !Equals [!Ref LambdaRoleARN, ""] HasSecurityGroups: !Not [ !Equals [ !Join ["", !Ref SecurityGroupIds], "" ] ] HasSubnets: !Not [ !Equals [ !Join ["", !Ref SubnetIds], "" ] ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -77,7 +79,9 @@ Resources: default: !Ref DefaultConnectionString 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]] Description: "Enables Amazon Athena to communicate with SQLSERVER using JDBC" Timeout: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-synapse/athena-synapse.yaml b/athena-synapse/athena-synapse.yaml index 1aa43f00b..50f1092c7 100644 --- a/athena-synapse/athena-synapse.yaml +++ b/athena-synapse/athena-synapse.yaml @@ -66,7 +66,8 @@ Conditions: HasPermissionsBoundary: !Not [!Equals [!Ref PermissionsBoundaryARN, ""]] HasSecurityGroups: !Not [ !Equals [ !Join ["", !Ref SecurityGroupIds], "" ] ] HasSubnets: !Not [ !Equals [ !Join ["", !Ref SubnetIds], "" ] ] - + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -79,7 +80,9 @@ Resources: default: !Ref DefaultConnectionString 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]] Description: "Enables Amazon Athena to communicate with SYNPASE using JDBC" Timeout: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-teradata/athena-teradata.yaml b/athena-teradata/athena-teradata.yaml index 01ee09c1d..14177fa63 100644 --- a/athena-teradata/athena-teradata.yaml +++ b/athena-teradata/athena-teradata.yaml @@ -62,6 +62,8 @@ Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] HasSecurityGroups: !Not [ !Equals [ !Join ["", !Ref SecurityGroupIds], "" ] ] HasSubnets: !Not [ !Equals [ !Join ["", !Ref SubnetIds], "" ] ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -75,7 +77,9 @@ Resources: partitioncount: !Ref PartitionCount 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]] Description: "Enables Amazon Athena to communicate with Teradata using JDBC" Timeout: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-timestream/athena-timestream.yaml b/athena-timestream/athena-timestream.yaml index 1850ffbec..2e0387ce5 100644 --- a/athena-timestream/athena-timestream.yaml +++ b/athena-timestream/athena-timestream.yaml @@ -42,6 +42,8 @@ Parameters: Type: String Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] + 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: spill_prefix: !Ref SpillPrefix FunctionName: !Ref AthenaCatalogName 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: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-tpcds/athena-tpcds.yaml b/athena-tpcds/athena-tpcds.yaml index 4086565f7..ed88425b1 100644 --- a/athena-tpcds/athena-tpcds.yaml +++ b/athena-tpcds/athena-tpcds.yaml @@ -42,6 +42,8 @@ Parameters: Type: String Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] + 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: spill_prefix: !Ref SpillPrefix FunctionName: !Ref AthenaCatalogName 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: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-udfs/athena-udfs.yaml b/athena-udfs/athena-udfs.yaml index a6f04ad18..facaba9bc 100644 --- a/athena-udfs/athena-udfs.yaml +++ b/athena-udfs/athena-udfs.yaml @@ -34,13 +34,17 @@ Parameters: Type: String Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: ConnectorConfig: Type: 'AWS::Serverless::Function' Properties: FunctionName: !Ref LambdaFunctionName PackageType: "Image" - ImageUri: !Sub '292517598671.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-udfs:2022.47.1' + ImageUri: !Sub + - '${Account}.dkr.ecr.${AWS::Region}.amazonaws.com/athena-federation-repository-udfs:2022.47.1' + - Account: !If [IsRegionBAH, 084828588479, !If [IsRegionHKG, 183295418215, 292517598671]] Description: "This connector enables Amazon Athena to leverage common UDFs made available via Lambda." Timeout: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory diff --git a/athena-vertica/athena-vertica.yaml b/athena-vertica/athena-vertica.yaml index a0fed75e0..60775db04 100644 --- a/athena-vertica/athena-vertica.yaml +++ b/athena-vertica/athena-vertica.yaml @@ -63,7 +63,8 @@ Parameters: Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] - + IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] + IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] Resources: LambdaSecurityGroup: Type: 'AWS::EC2::SecurityGroup' @@ -83,7 +84,9 @@ Resources: FunctionName: !Sub "${AthenaCatalogName}" 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: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory