Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panama sdkv2 gdcv2 #2352

Merged
merged 105 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from 95 commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
d7fc060
V2 migration secrets (#2051)
aimethed Jul 22, 2024
6d25424
V2 migration glue (#2052)
aimethed Jul 22, 2024
bc12e0b
V2 migration jmes (#2053)
aimethed Jul 22, 2024
09ea549
v2 migration sts (#2054)
aimethed Jul 22, 2024
40a3a3f
V2 migration athena (#2055)
aimethed Jul 22, 2024
3f2a330
V2 migration KMS (#2107)
aimethed Jul 22, 2024
a60ed61
V2 migration lambda (#2077)
aimethed Jul 24, 2024
2545c7e
V2 migration s3 (#2108)
aimethed Jul 25, 2024
5d3d6f1
merge in master, to be tested
aimethed Aug 22, 2024
ec12d57
fixed SpillLocationVerifier merge errors
aimethed Aug 22, 2024
cfd6f21
Fix return statement in getGlueSchemaType method (#2199)
Jithendar12 Aug 23, 2024
e978122
v2 migration vertica issue fix (#2147)
VenkatasivareddyTR Aug 23, 2024
8277628
update v2-master with msk dependency change (#2208)
ejeffrli Aug 23, 2024
aa13dca
Update v2-master with master
ejeffrli Aug 26, 2024
500861b
Panama phase 1 squashed commit
ejeffrli Aug 26, 2024
fbd97e8
Merge v2-master into Panama project
ejeffrli Aug 27, 2024
b3bd92f
Patch issues from initial merge
ejeffrli Aug 26, 2024
fa64d0b
Add GDCv2 properties to environment
ejeffrli Aug 28, 2024
c3968c5
Migrate Cloudwatch Metrics connector to v2 (#2182)
aimethed Aug 30, 2024
6786fe6
Refactor glue connection logic to be more abstract (#9)
ejeffrli Sep 3, 2024
39551b4
V2 merge jsii (#2240)
aimethed Sep 5, 2024
c207bf9
Split CFN templates into original and glue connections
mschoeni1 Sep 4, 2024
6e8cedc
Add rest of JDBC connectors excluding redshift (#10)
ejeffrli Sep 10, 2024
f1e066d
V2 image deployment (#2253)
aimethed Sep 10, 2024
ef3602c
Migrate Elasticache to AWS SDK v2 (#2238)
Jithendar12 Sep 10, 2024
b7dd988
v2 migration elasticsearch (#2243)
VenkatasivareddyTR Sep 10, 2024
12fede5
V2 master merge 9/10 (#2255)
aimethed Sep 10, 2024
d702d63
Merge pull request #11 from awslabs/v2-master
mschoeni1 Sep 10, 2024
bb0053f
fixing yaml files with correct parameters (#13)
burhan94 Sep 11, 2024
a61f1f3
update connections yaml files to use ecr image
aimethed Sep 11, 2024
a6fc14d
update new uses of semantic version (#2258)
aimethed Sep 12, 2024
b70cbd5
v2 changes for timestream (#2239)
Trianz-Akshay Sep 13, 2024
164ad92
Implement EnvironmentProperties for remaining non-jdbc connectors (#12)
ejeffrli Sep 18, 2024
323dd36
update image uri to not include partition
aimethed Sep 20, 2024
3e7ce1e
missed a Runtime property
aimethed Sep 20, 2024
dc31060
Merge pull request #16 from aimethed/update-connections-yaml
mschoeni1 Sep 20, 2024
e03a108
update all ImageURI to use correct repo name (no prod)
aimethed Sep 23, 2024
86437e2
update connectors with mux handlers to use normal in connections yaml
aimethed Sep 23, 2024
080c7c1
fix mysql connection yaml
aimethed Sep 23, 2024
41deb82
Merge pull request #17 from aimethed/update-connections-yaml
mschoeni1 Sep 24, 2024
ee7804d
v2 sdk changes emr (#2288)
Trianz-Akshay Sep 24, 2024
1e7cd1f
v2 sdk changes redshift (#2289)
Trianz-Akshay Sep 24, 2024
2a0bb49
Add RedshiftCompositeHandler class to populate environment from glue …
ejeffrli Sep 25, 2024
1e685f4
migrate awslogs to cloudwatchlogs (v1 to v2) (#2272)
aimethed Sep 25, 2024
ff290f0
v2 Cloudformation (#2281)
aimethed Sep 25, 2024
945ce6a
v2 DocDB (#2282)
aimethed Sep 25, 2024
057956a
V2 rds (#2273)
aimethed Sep 25, 2024
1cea184
Merge branch 'v2-master'
aimethed Sep 25, 2024
0ab6fa3
fix missed error from merge
aimethed Sep 25, 2024
c0ac9cc
Merge in v2-master 9/25 (#19)
aimethed Sep 25, 2024
ed57195
remove unneeded Ref
aimethed Sep 26, 2024
26585cf
Merge pull request #20 from aimethed/update-connections-yaml
mschoeni1 Sep 26, 2024
ce69cec
SDK V2 ec2 changes (#2293)
Trianz-Akshay Sep 26, 2024
a843fcd
Fix teradata (#2294)
aimethed Sep 26, 2024
0f4beb2
Use prod
ejeffrli Sep 27, 2024
ee408a2
V2 final changes (#2297)
aimethed Sep 27, 2024
fdc9d49
Merge branch 'v2-master' into panama-sdkv2-gdcv2
aimethed Sep 27, 2024
63a6075
fix checkstyle
aimethed Sep 27, 2024
a787426
Fix lambda issues with glue (#2308)
ejeffrli Oct 2, 2024
d42e759
reverting PR #2273 for gbq connector as it's not required for cdk. (#…
VenkatasivareddyTR Oct 4, 2024
6532849
Merge branch 'v2-master'
aimethed Oct 16, 2024
12644d0
Update DDB new errors to v2
aimethed Oct 16, 2024
90af2de
Merge branch 'v2-master' into panama-sdkv2-gdcv2
aimethed Oct 16, 2024
20f7b0f
Merge branch 'master' into panama-sdkv2-gdcv2
aimethed Oct 23, 2024
6b99732
update connections yaml files with new image uri
aimethed Oct 23, 2024
aa3efc1
Use gamma glue endpoint if environment variable specified
ejeffrli Oct 31, 2024
bd915a8
Use glue gamma as default
ejeffrli Nov 1, 2024
483fc3b
Use proper SecretNamePrefix instead of SecretName
ejeffrli Nov 4, 2024
e602b6d
Increase glue connection timeout
ejeffrli Nov 8, 2024
7301f73
add ImageConfig back to postgres connection yaml (#2386)
aimethed Nov 11, 2024
856374e
Snowflake case insensitive match instead of upper case by default (#2…
chngpe Nov 13, 2024
72a5298
Check if auth is not null (#2388)
ejeffrli Nov 14, 2024
c076ed8
add default to oracle connection kmskeyid (#2392)
aimethed Nov 14, 2024
165f6b3
Fix issue with secret being not populated for default EnvironmentProp…
ejeffrli Nov 15, 2024
7f8c53c
Passing snowflake JDBC parameter into parameters fields instead of wi…
chngpe Nov 15, 2024
d162972
Merge branch 'master' into panama-sdkv2-gdcv2
aimethed Nov 15, 2024
2e2ecf2
[panama-sdkv2-gdcv2] Fix Db2 JDBC Connection String (#2395)
Jithendar12 Nov 15, 2024
537fff1
Synapse panama issue fix, updated connection string prefix. (#2394)
VenkatasivareddyTR Nov 15, 2024
220390d
Enable case insensitive username/password in secret and allow secret …
ejeffrli Nov 16, 2024
b3077e8
update to use SSL oracle url (#2400)
aimethed Nov 17, 2024
fdb2f25
add quotes around oracle password (#2399)
aimethed Nov 17, 2024
35e2b6c
[panama-sdkv2-gdcv2] Oracle Panama Testing Fix (#2397)
ritiktrianz Nov 18, 2024
0b81e21
Fix docdb connection string (#2407)
ejeffrli Nov 18, 2024
153b751
fixing to use quoted password (#2413)
aimethed Nov 20, 2024
e4a53aa
glue connection reference fix (#2414)
chngpe Nov 20, 2024
5fe1b3c
Fix secret issue if field is integer (#2412)
ejeffrli Nov 20, 2024
a1c288b
Merge branch 'master' into panama-sdkv2-gdcv2
aimethed Nov 20, 2024
640b3a6
Change default endpoint (#2416)
ejeffrli Nov 22, 2024
85e29d0
oracle casing flag (#2415)
aimethed Nov 22, 2024
aad7feb
Merge branch 'master' into panama-sdkv2-gdcv2
aimethed Nov 22, 2024
65e381b
Changed message to debug (#2422)
AbdulR3hman Nov 23, 2024
ac93ab3
Merge branch 'master' into panama-sdkv2-gdcv2
aimethed Nov 26, 2024
8a43a53
Snowflake case insensitive search improve with ANNOTATION added back …
chngpe Nov 27, 2024
42a65e3
Merge branch 'master' into panama-sdkv2-gdcv2
aimethed Dec 11, 2024
1374709
Merge branch 'master' into panama-sdkv2-gdcv2
aimethed Dec 11, 2024
b54a021
remove dynamodb:ListSchemas
aimethed Dec 11, 2024
0ffb7b8
various cleanup fixes (#2467)
aimethed Dec 11, 2024
c03a2fd
remove Trianz label (#2468)
aimethed Dec 12, 2024
c639820
revert bump (#2469)
aimethed Dec 12, 2024
4a41f7e
check legacy IS_FIPS_ENABLED (#2470)
aimethed Dec 12, 2024
d0376e4
Oracle Data Types Clean up (#2453)
AbdulR3hman Dec 13, 2024
c8371be
Enabled RDS Certs for Oracle DB (#2473)
AbdulR3hman Dec 16, 2024
a12f676
Update neptune documentation (#2472)
ejeffrli Dec 16, 2024
5cf871f
Add SECRET_NAME_PATTERN unit test (#2471)
ejeffrli Dec 16, 2024
66bac00
Support DECIMAL type properly when using DDB type NUMBER in sets (#2483)
ejeffrli Dec 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 142 additions & 0 deletions athena-aws-cmdb/athena-aws-cmdb-connection.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
Transform: 'AWS::Serverless-2016-10-31'
Metadata:
'AWS::ServerlessRepo::Application':
Name: AthenaAwsCmdbConnectorWithGlueConnection
Description: 'This connector enables Amazon Athena to communicate with various AWS Services, making your resource inventories accessible via SQL.'
Author: 'default author'
SpdxLicenseId: Apache-2.0
LicenseUrl: LICENSE.txt
ReadmeUrl: README.md
Labels:
- athena-federation
HomePageUrl: 'https://github.com/awslabs/aws-athena-query-federation'
SemanticVersion: 2022.47.1
SourceCodeUrl: 'https://github.com/awslabs/aws-athena-query-federation'
Parameters:
LambdaFunctionName:
Description: 'This is the name of the lambda function that will be created. This name must satisfy the pattern ^[a-z0-9-_]{1,64}$'
Type: String
AllowedPattern: ^[a-z0-9-_]{1,64}$
SpillBucket:
Description: 'The name of the bucket where this function can spill data.'
Type: String
GlueConnection:
Description: "Name of glue connection storing connection details for Federated Data source."
Type: String
KmsKeyId:
Description: "(Optional) By default any data that is spilled to S3 is encrypted using AES-GCM and a randomly generated key. Setting a KMS Key ID allows your Lambda function to use KMS for key generation for a stronger source of encryption keys."
Type: String
Default: ""
LambdaRoleArn:
Description: "(Optional) A custom role to be used by the Connector lambda"
Type: String
Default: ""

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'
Properties:
Environment:
Variables:
glue_connection: !Ref GlueConnection
FunctionName: !Ref LambdaFunctionName
PackageType: "Image"
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
Role: !If [NotHasLambdaRole, !GetAtt FunctionRole.Arn, !Ref LambdaRoleArn]

FunctionRole:
Condition: NotHasLambdaRole
Type: AWS::IAM::Role
Properties:
ManagedPolicyArns:
- "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Principal:
Service:
- lambda.amazonaws.com
Action:
- "sts:AssumeRole"

FunctionExecutionPolicy:
Condition: NotHasLambdaRole
Type: "AWS::IAM::Policy"
Properties:
PolicyName: FunctionExecutionPolicy
PolicyDocument:
Version: 2012-10-17
Statement:
- Action:
- autoscaling:Describe*
- elasticloadbalancing:Describe*
- ec2:Describe*
- elasticmapreduce:Describe*
- elasticmapreduce:List*
- rds:Describe*
- rds:ListTagsForResource
- athena:GetQueryExecution
- s3:ListBucket
- athena:GetQueryExecution
Effect: Allow
Resource: '*'
- Action:
- s3:GetObject
- s3:ListBucket
- s3:GetBucketLocation
- s3:GetObjectVersion
- s3:PutObject
- s3:PutObjectAcl
- s3:GetLifecycleConfiguration
- s3:PutLifecycleConfiguration
- s3:DeleteObject
Effect: Allow
Resource:
- Fn::Sub:
- arn:${AWS::Partition}:s3:::${bucketName}
- bucketName:
Ref: SpillBucket
- Fn::Sub:
- arn:${AWS::Partition}:s3:::${bucketName}/*
- bucketName:
Ref: SpillBucket
- Action:
- glue:GetConnection
Effect: Allow
Resource:
- !Sub 'arn:${AWS::Partition}:glue:${AWS::Region}:${AWS::AccountId}:connection/${GlueConnection}'
- !Sub 'arn:${AWS::Partition}:glue:${AWS::Region}:${AWS::AccountId}:catalog'
Roles:
- !Ref FunctionRole

FunctionKmsPolicy:
Condition: CreateKmsPolicy
Type: "AWS::IAM::Policy"
Properties:
PolicyName: FunctionKmsPolicy
PolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Action:
- kms:GenerateRandom
Resource: '*'
- Effect: Allow
Action:
- kms:GenerateDataKey
Resource: !Sub "arn:aws:kms:${AWS::Region}:${AWS::AccountId}:key/${KmsKeyId}"
Roles:
- !Ref FunctionRole
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
*/
package com.amazonaws.athena.connectors.aws.cmdb;

import com.amazonaws.athena.connector.lambda.connection.EnvironmentProperties;
import com.amazonaws.athena.connector.lambda.handlers.CompositeHandler;

/**
Expand All @@ -30,6 +31,6 @@ public class AwsCmdbCompositeHandler
{
public AwsCmdbCompositeHandler()
{
super(new AwsCmdbMetadataHandler(System.getenv()), new AwsCmdbRecordHandler(System.getenv()));
super(new AwsCmdbMetadataHandler(new EnvironmentProperties().createEnvironment()), new AwsCmdbRecordHandler(new EnvironmentProperties().createEnvironment()));
}
}
4 changes: 2 additions & 2 deletions athena-cloudera-hive/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ COPY target/athena-cloudera-hive-2022.47.1.jar ${LAMBDA_TASK_ROOT}
# Unpack the jar
RUN jar xf athena-cloudera-hive-2022.47.1.jar

# Set the CMD to your handler (could also be done as a parameter override outside of the Dockerfile)
CMD [ "com.amazonaws.athena.connectors.cloudera.HiveMuxCompositeHandler" ]
# Command can be overwritten by providing a different command in the template directly.
# No need to specify here (already defined in .yaml file because legacy and connections use different)
165 changes: 165 additions & 0 deletions athena-cloudera-hive/athena-cloudera-hive-connection.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
Transform: 'AWS::Serverless-2016-10-31'
Metadata:
'AWS::ServerlessRepo::Application':
Name: AthenaClouderaHiveConnectorWithGlueConnection
Description: 'This connector enables Amazon Athena to communicate with your Cloudera Hive instance(s) using JDBC driver.'
Author: 'default author'
SpdxLicenseId: Apache-2.0
LicenseUrl: LICENSE.txt
ReadmeUrl: README.md
Labels:
- athena-federation
HomePageUrl: 'https://github.com/awslabs/aws-athena-query-federation'
SemanticVersion: 2022.47.1
SourceCodeUrl: 'https://github.com/awslabs/aws-athena-query-federation'
Parameters:
LambdaFunctionName:
Description: 'This is the name of the lambda function that will be created. This name must satisfy the pattern ^[a-z0-9-_]{1,64}$'
Type: String
AllowedPattern: ^[a-z0-9-_]{1,64}$
SecretName:
Description: 'Used to create resource-based authorization policy for "secretsmanager:GetSecretValue" action. E.g. All Athena JDBC Federation secret names can be prefixed with "AthenaJdbcFederation" and authorization policy will allow "arn:${AWS::Partition}:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:AthenaJdbcFederation*". Parameter value in this case should be "AthenaJdbcFederation". If you do not have a prefix, you can manually update the IAM policy to add allow any secret names.'
Type: String
SpillBucket:
Description: 'The name of the bucket where this function can spill data.'
Type: String
GlueConnection:
Description: "Name of glue connection storing connection details for Federated Data source."
Type: String
KmsKeyId:
Description: "(Optional) By default any data that is spilled to S3 is encrypted using AES-GCM and a randomly generated key. Setting a KMS Key ID allows your Lambda function to use KMS for key generation for a stronger source of encryption keys."
Type: String
Default: ""
LambdaRoleArn:
Description: "(Optional) A custom role to be used by the Connector lambda"
Type: String
Default: ""
SecurityGroupIds:
Description: 'One or more SecurityGroup IDs corresponding to the SecurityGroup that should be applied to the Lambda function. (e.g. sg1,sg2,sg3)'
Type: 'List<AWS::EC2::SecurityGroup::Id>'
SubnetIds:
Description: 'One or more Subnet IDs corresponding to the Subnet that the Lambda function can use to access you data source. (e.g. subnet1,subnet2)'
Type: 'List<AWS::EC2::Subnet::Id>'
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'
Properties:
Environment:
Variables:
glue_connection: !Ref GlueConnection
FunctionName: !Ref LambdaFunctionName
PackageType: "Image"
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"
Timeout: 900
MemorySize: 3008
Role: !If [NotHasLambdaRole, !GetAtt FunctionRole.Arn, !Ref LambdaRoleArn]
VpcConfig:
SecurityGroupIds: !Ref SecurityGroupIds
SubnetIds: !Ref SubnetIds

FunctionRole:
Condition: NotHasLambdaRole
Type: AWS::IAM::Role
Properties:
ManagedPolicyArns:
- "arn:aws:iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole"
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Principal:
Service:
- lambda.amazonaws.com
Action:
- "sts:AssumeRole"

FunctionExecutionPolicy:
Condition: NotHasLambdaRole
Type: "AWS::IAM::Policy"
Properties:
Roles:
- !Ref FunctionRole
PolicyName: FunctionExecutionPolicy
PolicyDocument:
Version: 2012-10-17
Statement:
- Action:
- secretsmanager:GetSecretValue
Effect: Allow
Resource: !Sub 'arn:${AWS::Partition}:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:${SecretName}*'
- Action:
- logs:CreateLogGroup
Effect: Allow
Resource: !Sub 'arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:*'
- Action:
- logs:CreateLogStream
- logs:PutLogEvents
Effect: Allow
Resource: !Sub 'arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/${LambdaFunctionName}:*'
- Action:
- athena:GetQueryExecution
Effect: Allow
Resource: '*'
- Action:
- ec2:CreateNetworkInterface
- ec2:DeleteNetworkInterface
- ec2:DescribeNetworkInterfaces
- ec2:DetachNetworkInterface
Effect: Allow
Resource: '*'
- Action:
- s3:GetObject
- s3:ListBucket
- s3:GetBucketLocation
- s3:GetObjectVersion
- s3:PutObject
- s3:PutObjectAcl
- s3:GetLifecycleConfiguration
- s3:PutLifecycleConfiguration
- s3:DeleteObject
Effect: Allow
Resource:
- Fn::Sub:
- arn:${AWS::Partition}:s3:::${bucketName}
- bucketName:
Ref: SpillBucket
- Fn::Sub:
- arn:${AWS::Partition}:s3:::${bucketName}/*
- bucketName:
Ref: SpillBucket
- Action:
- glue:GetConnection
Effect: Allow
Resource:
- !Sub 'arn:${AWS::Partition}:glue:${AWS::Region}:${AWS::AccountId}:connection/${GlueConnection}'
- !Sub 'arn:${AWS::Partition}:glue:${AWS::Region}:${AWS::AccountId}:catalog'

FunctionKmsPolicy:
Condition: CreateKmsPolicy
Type: "AWS::IAM::Policy"
Properties:
PolicyName: FunctionKmsPolicy
PolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Action:
- kms:GenerateRandom
Resource: '*'
- Effect: Allow
Action:
- kms:GenerateDataKey
Resource: !Sub "arn:aws:kms:${AWS::Region}:${AWS::AccountId}:key/${KmsKeyId}"
Roles:
- !Ref FunctionRole
24 changes: 13 additions & 11 deletions athena-cloudera-hive/athena-cloudera-hive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Parameters:
Description: 'The default connection string is used when catalog is "lambda:${LambdaFunctionName}". Catalog specific Connection Strings can be added later. Format: ${DatabaseType}://${NativeJdbcConnectionString}.'
Type: String
SecretNamePrefix:
Description: 'Used to create resource-based authorization policy for "secretsmanager:GetSecretValue" action. E.g. All Athena JDBC Federation secret names can be prefixed with "AthenaJdbcFederation" and authorization policy will allow "arn:${AWS::Partition}:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:AthenaJdbcFederation*". Parameter value in this case should be "AthenaJdbcFederation". If you do not have a prefix, you can manually update the IAM policy to add allow any secret names.'
Type: String
Description: 'Used to create resource-based authorization policy for "secretsmanager:GetSecretValue" action. E.g. All Athena JDBC Federation secret names can be prefixed with "AthenaJdbcFederation" and authorization policy will allow "arn:${AWS::Partition}:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:AthenaJdbcFederation*". Parameter value in this case should be "AthenaJdbcFederation". If you do not have a prefix, you can manually update the IAM policy to add allow any secret names.'
Type: String
SpillBucket:
Description: 'The name of the bucket where this function can spill data.'
Type: String
Expand Down Expand Up @@ -71,6 +71,8 @@ Resources:
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.HiveMuxCompositeHandler" ]
Description: "Enables Amazon Athena to communicate with Coludera Hive using JDBC"
Timeout: !Ref LambdaTimeout
MemorySize: !Ref LambdaMemory
Expand All @@ -89,17 +91,17 @@ Resources:
Resource: !Sub 'arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:*'
Version: '2012-10-17'
- Statement:
- Action:
- logs:CreateLogStream
- logs:PutLogEvents
Effect: Allow
Resource: !Sub 'arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/${LambdaFunctionName}:*'
- Action:
- logs:CreateLogStream
- logs:PutLogEvents
Effect: Allow
Resource: !Sub 'arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/${LambdaFunctionName}:*'
Version: '2012-10-17'
- Statement:
- Action:
- athena:GetQueryExecution
Effect: Allow
Resource: '*'
- Action:
- athena:GetQueryExecution
Effect: Allow
Resource: '*'
Version: '2012-10-17'
#S3CrudPolicy allows our connector to spill large responses to S3. You can optionally replace this pre-made policy
#with one that is more restrictive and can only 'put' but not read,delete, or overwrite files.
Expand Down
Loading
Loading