Skip to content

Commit

Permalink
Merge branch 'awslabs:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
macohen committed Jun 11, 2024
2 parents 983a8ef + 2eb357e commit 8734eef
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 41 deletions.
2 changes: 1 addition & 1 deletion athena-dynamodb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>2.25.60</version>
<version>2.25.69</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion athena-elasticsearch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-client</artifactId>
<version>8.13.4</version>
<version>8.14.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.elasticsearch.client/elasticsearch-rest-high-level-client -->
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion athena-gcs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
<version>2.39.0</version>
<version>2.40.0</version>
</dependency>
<!-- Test Dependencies -->
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions athena-google-bigquery/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-api</artifactId>
<version>1.63.0</version>
<version>1.64.0</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-resourcemanager</artifactId>
<version>1.46.0</version>
<version>1.47.0</version>
</dependency>
<dependency>
<groupId>nl.jqno.equalsverifier</groupId>
Expand Down
89 changes: 63 additions & 26 deletions athena-oracle/athena-oracle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ Parameters:
Description: 'Lambda memory in MB (min 128 - 3008 max).'
Default: 3008
Type: Number
LambdaRoleARN:
Description: "(Optional) A custom role to be used by the Connector lambda"
Type: String
Default: ""
DisableSpillEncryption:
Description: 'If set to ''false'' data spilled to S3 is encrypted with AES GCM'
Default: 'false'
Expand All @@ -63,6 +67,7 @@ Parameters:
Type: String
Conditions:
HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ]
NotHasLambdaRole: !Equals [!Ref LambdaRoleARN, ""]
HasSecurityGroups: !Not [ !Equals [ !Join ["", !Ref SecurityGroupIds], "" ] ]
HasSubnets: !Not [ !Equals [ !Join ["", !Ref SubnetIds], "" ] ]
Resources:
Expand All @@ -84,39 +89,71 @@ Resources:
Timeout: !Ref LambdaTimeout
MemorySize: !Ref LambdaMemory
PermissionsBoundary: !If [ HasPermissionsBoundary, !Ref PermissionsBoundaryARN, !Ref "AWS::NoValue" ]
Policies:
- Statement:
- Action:
- secretsmanager:GetSecretValue
Effect: Allow
Resource: !Sub 'arn:${AWS::Partition}:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:${SecretNamePrefix}*'
Version: '2012-10-17'
- Statement:
- Action:
- logs:CreateLogGroup
Effect: Allow
Resource: !Sub 'arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:*'
Version: '2012-10-17'
- Statement:
Role: !If [NotHasLambdaRole, !GetAtt FunctionRole.Arn, !Ref LambdaRoleARN]
VpcConfig:
SecurityGroupIds: !If [ HasSecurityGroups, !Ref SecurityGroupIds, !Ref "AWS::NoValue" ]
SubnetIds: !If [ HasSubnets, !Ref SubnetIds, !Ref "AWS::NoValue" ]

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:${SecretNamePrefix}*'
- 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}:*'
Version: '2012-10-17'
- Statement:
- Action:
- athena:GetQueryExecution
- s3:ListAllMyBuckets
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.
- S3CrudPolicy:
BucketName: !Ref SpillBucket
#VPCAccessPolicy allows our connector to run in a VPC so that it can access your data source.
- VPCAccessPolicy: {}
VpcConfig:
SecurityGroupIds: !If [ HasSecurityGroups, !Ref SecurityGroupIds, !Ref "AWS::NoValue" ]
SubnetIds: !If [ HasSubnets, !Ref SubnetIds, !Ref "AWS::NoValue" ]
- 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
2 changes: 1 addition & 1 deletion athena-redshift/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<dependency>
<groupId>com.amazon.redshift</groupId>
<artifactId>redshift-jdbc42</artifactId>
<version>2.1.0.28</version>
<version>2.1.0.29</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
Expand Down
2 changes: 1 addition & 1 deletion athena-snowflake/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<dependency>
<groupId>net.snowflake</groupId>
<artifactId>snowflake-jdbc</artifactId>
<version>3.16.0</version>
<version>3.16.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-rds -->
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion athena-synapse/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>msal4j</artifactId>
<version>1.15.0</version>
<version>1.15.1</version>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.datatype</groupId>
Expand Down
14 changes: 7 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.plugin.version>3.13.0</maven.compiler.plugin.version>
<!--- to meet engine version 1.12.533-->
<aws-sdk.version>1.12.730</aws-sdk.version>
<aws-sdk.version>1.12.739</aws-sdk.version>
<aws.lambda-java-core.version>1.2.2</aws.lambda-java-core.version>
<aws.lambda-java-log4j2.version>1.6.0</aws.lambda-java-log4j2.version>
<aws-cdk.version>1.204.0</aws-cdk.version>
<jsii.version>1.98.0</jsii.version>
<jsii.version>1.99.0</jsii.version>
<!--- to meet engine version 2.0.7-->
<slf4j-log4j.version>2.0.13</slf4j-log4j.version>
<mockito.version>4.11.0</mockito.version>
Expand All @@ -31,7 +31,7 @@
<surefire.failsafe.version>3.2.5</surefire.failsafe.version>
<log4j2Version>2.23.1</log4j2Version>
<apache.arrow.version>13.0.0</apache.arrow.version>
<guava.version>33.2.0-jre</guava.version>
<guava.version>33.2.1-jre</guava.version>
<protobuf3.version>3.25.3</protobuf3.version>
<antlr.st4.version>4.3.4</antlr.st4.version>
<log4j2.cachefile.transformer.version>2.15</log4j2.cachefile.transformer.version>
Expand All @@ -41,10 +41,10 @@
<spark.version>3.2.1</spark.version>
<test.system.rules.version>1.19.0</test.system.rules.version>
<!-- These are mvn on purpose to not conflict with the maven.* namespace -->
<mvn.checkstyle.version>3.3.1</mvn.checkstyle.version>
<mvn.shade.plugin.version>3.5.3</mvn.shade.plugin.version>
<mvn.checkstyle.version>3.4.0</mvn.checkstyle.version>
<mvn.shade.plugin.version>3.6.0</mvn.shade.plugin.version>
<mvn.source.plugin.version>3.3.1</mvn.source.plugin.version>
<mvn.javadoc.plugin.version>3.6.3</mvn.javadoc.plugin.version>
<mvn.javadoc.plugin.version>3.7.0</mvn.javadoc.plugin.version>
<mvn.jar.plugin.version>3.4.1</mvn.jar.plugin.version>
<doclint>none</doclint>
</properties>
Expand Down Expand Up @@ -425,7 +425,7 @@
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<version>1.7.0</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
Expand Down

0 comments on commit 8734eef

Please sign in to comment.