Skip to content

Commit

Permalink
Opt in imageuri (#2340)
Browse files Browse the repository at this point in the history
  • Loading branch information
aimethed authored Oct 22, 2024
1 parent be0430b commit d31f217
Show file tree
Hide file tree
Showing 34 changed files with 165 additions and 43 deletions.
6 changes: 5 additions & 1 deletion athena-aws-cmdb/athena-aws-cmdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
6 changes: 5 additions & 1 deletion athena-clickhouse/athena-clickhouse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
6 changes: 5 additions & 1 deletion athena-cloudera-hive/athena-cloudera-hive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
6 changes: 5 additions & 1 deletion athena-cloudera-impala/athena-cloudera-impala.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
6 changes: 5 additions & 1 deletion athena-cloudwatch-metrics/athena-cloudwatch-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
7 changes: 5 additions & 2 deletions athena-cloudwatch/athena-cloudwatch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
6 changes: 5 additions & 1 deletion athena-datalakegen2/athena-datalakegen2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
6 changes: 5 additions & 1 deletion athena-db2-as400/athena-db2-as400.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
6 changes: 5 additions & 1 deletion athena-db2/athena-db2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
6 changes: 5 additions & 1 deletion athena-docdb/athena-docdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
7 changes: 5 additions & 2 deletions athena-dynamodb/athena-dynamodb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
7 changes: 5 additions & 2 deletions athena-elasticsearch/athena-elasticsearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion athena-example/athena-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
7 changes: 5 additions & 2 deletions athena-gcs/athena-gcs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
6 changes: 5 additions & 1 deletion athena-google-bigquery/athena-google-bigquery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
6 changes: 5 additions & 1 deletion athena-hbase/athena-hbase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
6 changes: 5 additions & 1 deletion athena-hortonworks-hive/athena-hortonworks-hive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
7 changes: 5 additions & 2 deletions athena-kafka/athena-kafka.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
7 changes: 5 additions & 2 deletions athena-msk/athena-msk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
Loading

0 comments on commit d31f217

Please sign in to comment.