diff --git a/athena-aws-cmdb/Dockerfile b/athena-aws-cmdb/Dockerfile index a599a28963..da890e3d1d 100644 --- a/athena-aws-cmdb/Dockerfile +++ b/athena-aws-cmdb/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-aws-cmdb-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-aws-cmdb/athena-aws-cmdb.yaml b/athena-aws-cmdb/athena-aws-cmdb.yaml index 8ead0e1db0..907e1e722e 100644 --- a/athena-aws-cmdb/athena-aws-cmdb.yaml +++ b/athena-aws-cmdb/athena-aws-cmdb.yaml @@ -40,10 +40,19 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: ConnectorConfig: Type: 'AWS::Serverless::Function' @@ -53,6 +62,7 @@ Resources: disable_spill_encryption: !Ref DisableSpillEncryption spill_bucket: !Ref SpillBucket spill_prefix: !Ref SpillPrefix + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref AthenaCatalogName PackageType: "Image" ImageUri: !Sub diff --git a/athena-clickhouse/Dockerfile b/athena-clickhouse/Dockerfile index a092ba28cb..e9b9bcda40 100644 --- a/athena-clickhouse/Dockerfile +++ b/athena-clickhouse/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-clickhouse-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-clickhouse/athena-clickhouse.yaml b/athena-clickhouse/athena-clickhouse.yaml index 8f65ef1018..f3e9f0203e 100644 --- a/athena-clickhouse/athena-clickhouse.yaml +++ b/athena-clickhouse/athena-clickhouse.yaml @@ -56,11 +56,20 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" 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"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -71,6 +80,7 @@ Resources: spill_bucket: !Ref SpillBucket spill_prefix: !Ref SpillPrefix default: !Ref DefaultConnectionString + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref LambdaFunctionName PackageType: "Image" ImageUri: !Sub diff --git a/athena-cloudera-hive/Dockerfile b/athena-cloudera-hive/Dockerfile index a56019f693..cff4122d0b 100644 --- a/athena-cloudera-hive/Dockerfile +++ b/athena-cloudera-hive/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-cloudera-hive-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-cloudera-hive/athena-cloudera-hive.yaml b/athena-cloudera-hive/athena-cloudera-hive.yaml index bc9da142a9..83c1e8a853 100644 --- a/athena-cloudera-hive/athena-cloudera-hive.yaml +++ b/athena-cloudera-hive/athena-cloudera-hive.yaml @@ -52,10 +52,19 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -66,6 +75,7 @@ Resources: spill_bucket: !Ref SpillBucket spill_prefix: !Ref SpillPrefix default: !Ref DefaultConnectionString + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref LambdaFunctionName PackageType: "Image" ImageUri: !Sub diff --git a/athena-cloudera-impala/Dockerfile b/athena-cloudera-impala/Dockerfile index 2ed43aeaa9..60f1f04654 100644 --- a/athena-cloudera-impala/Dockerfile +++ b/athena-cloudera-impala/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-cloudera-impala-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-cloudera-impala/athena-cloudera-impala.yaml b/athena-cloudera-impala/athena-cloudera-impala.yaml index adf96ece5b..400e65be0b 100644 --- a/athena-cloudera-impala/athena-cloudera-impala.yaml +++ b/athena-cloudera-impala/athena-cloudera-impala.yaml @@ -52,6 +52,14 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" LambdaEncryptionKmsKeyARN: Description: "(Optional) The KMS Key ARN used for encrypting your Lambda environment variables." Default: "" @@ -61,6 +69,7 @@ Conditions: HasLambdaEncryptionKmsKeyARN: !Not [ !Equals [ !Ref LambdaEncryptionKmsKeyARN, "" ] ] IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -71,6 +80,7 @@ Resources: spill_bucket: !Ref SpillBucket spill_prefix: !Ref SpillPrefix default: !Ref DefaultConnectionString + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref LambdaFunctionName PackageType: "Image" ImageUri: !Sub diff --git a/athena-cloudwatch-metrics/Dockerfile b/athena-cloudwatch-metrics/Dockerfile index b3eafc1e38..7ad3128758 100644 --- a/athena-cloudwatch-metrics/Dockerfile +++ b/athena-cloudwatch-metrics/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-cloudwatch-metrics-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-cloudwatch-metrics/athena-cloudwatch-metrics.yaml b/athena-cloudwatch-metrics/athena-cloudwatch-metrics.yaml index 5f4ce7585c..adf89d2df6 100644 --- a/athena-cloudwatch-metrics/athena-cloudwatch-metrics.yaml +++ b/athena-cloudwatch-metrics/athena-cloudwatch-metrics.yaml @@ -40,10 +40,19 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: ConnectorConfig: Type: 'AWS::Serverless::Function' @@ -53,6 +62,7 @@ Resources: disable_spill_encryption: !Ref DisableSpillEncryption spill_bucket: !Ref SpillBucket spill_prefix: !Ref SpillPrefix + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref AthenaCatalogName PackageType: "Image" ImageUri: !Sub diff --git a/athena-cloudwatch/Dockerfile b/athena-cloudwatch/Dockerfile index 9859ff8b4c..dddd041a37 100644 --- a/athena-cloudwatch/Dockerfile +++ b/athena-cloudwatch/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-cloudwatch-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-cloudwatch/athena-cloudwatch.yaml b/athena-cloudwatch/athena-cloudwatch.yaml index 67e286740f..5e66dbc748 100644 --- a/athena-cloudwatch/athena-cloudwatch.yaml +++ b/athena-cloudwatch/athena-cloudwatch.yaml @@ -48,6 +48,14 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" Conditions: HasKMSKeyId: !Not [!Equals [!Ref KMSKeyId, ""]] @@ -56,6 +64,7 @@ Conditions: CreateKMSPolicy: !And [ !Condition HasKMSKeyId, !Condition NotHasLambdaRole ] IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: ConnectorConfig: Type: 'AWS::Serverless::Function' @@ -66,6 +75,7 @@ Resources: spill_bucket: !Ref SpillBucket spill_prefix: !Ref SpillPrefix kms_key_id: !If [HasKMSKeyId, !Ref KMSKeyId, !Ref "AWS::NoValue"] + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref AthenaCatalogName PackageType: "Image" ImageUri: !Sub diff --git a/athena-datalakegen2/Dockerfile b/athena-datalakegen2/Dockerfile index 4e1929f607..7f0d574d33 100644 --- a/athena-datalakegen2/Dockerfile +++ b/athena-datalakegen2/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-datalakegen2-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-datalakegen2/athena-datalakegen2.yaml b/athena-datalakegen2/athena-datalakegen2.yaml index 96750e019c..faad2eed98 100644 --- a/athena-datalakegen2/athena-datalakegen2.yaml +++ b/athena-datalakegen2/athena-datalakegen2.yaml @@ -56,12 +56,21 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" 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"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -72,6 +81,7 @@ Resources: spill_bucket: !Ref SpillBucket spill_prefix: !Ref SpillPrefix default: !Ref DefaultConnectionString + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref LambdaFunctionName PackageType: "Image" ImageUri: !Sub diff --git a/athena-db2-as400/Dockerfile b/athena-db2-as400/Dockerfile index affd37e7bb..247e342220 100644 --- a/athena-db2-as400/Dockerfile +++ b/athena-db2-as400/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-db2-as400-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-db2-as400/athena-db2-as400.yaml b/athena-db2-as400/athena-db2-as400.yaml index 1b6cf39bf1..5fa5f46c3a 100644 --- a/athena-db2-as400/athena-db2-as400.yaml +++ b/athena-db2-as400/athena-db2-as400.yaml @@ -57,12 +57,21 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" 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"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -73,6 +82,7 @@ Resources: spill_bucket: !Ref SpillBucket spill_prefix: !Ref SpillPrefix default: !Ref DefaultConnectionString + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref LambdaFunctionName PackageType: "Image" ImageUri: !Sub diff --git a/athena-db2/Dockerfile b/athena-db2/Dockerfile index 0d8231fa29..68ec86c57d 100644 --- a/athena-db2/Dockerfile +++ b/athena-db2/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-db2-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-db2/athena-db2.yaml b/athena-db2/athena-db2.yaml index d82d9585f4..060447ea29 100644 --- a/athena-db2/athena-db2.yaml +++ b/athena-db2/athena-db2.yaml @@ -57,12 +57,21 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" 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"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -73,6 +82,7 @@ Resources: spill_bucket: !Ref SpillBucket spill_prefix: !Ref SpillPrefix default: !Ref DefaultConnectionString + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref LambdaFunctionName PackageType: "Image" ImageUri: !Sub diff --git a/athena-docdb/Dockerfile b/athena-docdb/Dockerfile index 06e8a5c907..2c0b66e0f1 100644 --- a/athena-docdb/Dockerfile +++ b/athena-docdb/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-docdb-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-docdb/athena-docdb.yaml b/athena-docdb/athena-docdb.yaml index 5b8a91261a..19c7173bb7 100644 --- a/athena-docdb/athena-docdb.yaml +++ b/athena-docdb/athena-docdb.yaml @@ -53,10 +53,19 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: ConnectorConfig: Type: 'AWS::Serverless::Function' @@ -67,6 +76,7 @@ Resources: spill_bucket: !Ref SpillBucket spill_prefix: !Ref SpillPrefix default_docdb: !Ref DocDBConnectionString + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref AthenaCatalogName PackageType: "Image" ImageUri: !Sub diff --git a/athena-dynamodb/Dockerfile b/athena-dynamodb/Dockerfile index 868346d735..b94fa9910e 100644 --- a/athena-dynamodb/Dockerfile +++ b/athena-dynamodb/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-dynamodb-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-dynamodb/athena-dynamodb.yaml b/athena-dynamodb/athena-dynamodb.yaml index 7793c452bd..1dba80527e 100644 --- a/athena-dynamodb/athena-dynamodb.yaml +++ b/athena-dynamodb/athena-dynamodb.yaml @@ -48,6 +48,14 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" Conditions: HasKMSKeyId: !Not [!Equals [!Ref KMSKeyId, ""]] @@ -56,6 +64,7 @@ Conditions: CreateKMSPolicy: !And [!Condition HasKMSKeyId, !Condition NotHasLambdaRole] IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: ConnectorConfig: Type: 'AWS::Serverless::Function' @@ -66,6 +75,7 @@ Resources: spill_bucket: !Ref SpillBucket spill_prefix: !Ref SpillPrefix kms_key_id: !If [HasKMSKeyId, !Ref KMSKeyId, !Ref "AWS::NoValue"] + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref AthenaCatalogName PackageType: "Image" ImageUri: !Sub diff --git a/athena-elasticsearch/Dockerfile b/athena-elasticsearch/Dockerfile index d153e67a95..eb749b16b6 100644 --- a/athena-elasticsearch/Dockerfile +++ b/athena-elasticsearch/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-elasticsearch-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-elasticsearch/athena-elasticsearch.yaml b/athena-elasticsearch/athena-elasticsearch.yaml index 7a57683d0c..622d434df9 100644 --- a/athena-elasticsearch/athena-elasticsearch.yaml +++ b/athena-elasticsearch/athena-elasticsearch.yaml @@ -82,12 +82,21 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" 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"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: ConnectorConfig: Type: 'AWS::Serverless::Function' @@ -102,6 +111,7 @@ Resources: query_timeout_cluster: !Ref QueryTimeoutCluster query_timeout_search: !Ref QueryTimeoutSearch query_scroll_timeout: !Ref QueryScrollTimeout + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Sub "${AthenaCatalogName}" PackageType: "Image" ImageUri: !Sub diff --git a/athena-example/athena-example.yaml b/athena-example/athena-example.yaml index 19230b92a6..ab8d28a9fd 100644 --- a/athena-example/athena-example.yaml +++ b/athena-example/athena-example.yaml @@ -42,6 +42,16 @@ Parameters: Description: "WARNING: If set to 'true' encryption for spilled data is disabled." Default: "false" Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" +Conditions: + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: ConnectorConfig: Type: 'AWS::Serverless::Function' @@ -52,11 +62,12 @@ Resources: spill_bucket: !Ref SpillBucket spill_prefix: !Ref SpillPrefix data_bucket: !Ref DataBucket + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Sub "${AthenaCatalogName}" Handler: "com.amazonaws.athena.connectors.example.ExampleCompositeHandler" CodeUri: "./target/athena-example-2022.47.1.jar" Description: "A guided example for writing and deploying your own federated Amazon Athena connector for a custom source." - Runtime: java11 + Runtime: java17 Timeout: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory Policies: diff --git a/athena-federation-sdk/athena-federation-sdk.yaml b/athena-federation-sdk/athena-federation-sdk.yaml index 559e6830bc..fead11a63e 100644 --- a/athena-federation-sdk/athena-federation-sdk.yaml +++ b/athena-federation-sdk/athena-federation-sdk.yaml @@ -36,6 +36,16 @@ Parameters: Description: "WARNING: If set to 'true' encryption for spilled data is disabled." Default: 'false' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" +Conditions: + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: ConnectorConfig: Type: 'AWS::Serverless::Function' @@ -45,11 +55,12 @@ Resources: disable_spill_encryption: !Ref DisableSpillEncryption spill_bucket: !Ref SpillBucket spill_prefix: !Ref SpillPrefix + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref AthenaCatalogName Handler: "com.amazonaws.athena.connector.lambda.examples.ExampleCompositeHandler" CodeUri: "./target/aws-athena-federation-sdk-2022.47.1-withdep.jar" Description: "This connector enables Amazon Athena to communicate with a randomly generated data source." - Runtime: java11 + Runtime: java17 Timeout: !Ref LambdaTimeout MemorySize: !Ref LambdaMemory Policies: diff --git a/athena-federation-sdk/pom.xml b/athena-federation-sdk/pom.xml index 75269ede6b..409b4deb13 100644 --- a/athena-federation-sdk/pom.xml +++ b/athena-federation-sdk/pom.xml @@ -441,4 +441,26 @@ + + + java17 + + 17 + + + + + maven-surefire-plugin + ${surefire.failsafe.version} + + --add-opens=java.base/java.nio=ALL-UNNAMED + slow + + + + + + + + diff --git a/athena-gcs/Dockerfile b/athena-gcs/Dockerfile index 04614fe43b..59d9584664 100644 --- a/athena-gcs/Dockerfile +++ b/athena-gcs/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-gcs.zip ${LAMBDA_TASK_ROOT} diff --git a/athena-gcs/athena-gcs.yaml b/athena-gcs/athena-gcs.yaml index 80ce5a6cbe..178e5a4cfb 100644 --- a/athena-gcs/athena-gcs.yaml +++ b/athena-gcs/athena-gcs.yaml @@ -44,11 +44,20 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: AthenaGCSConnector: Type: 'AWS::Serverless::Function' @@ -59,6 +68,7 @@ Resources: spill_bucket: !Ref SpillBucket spill_prefix: !Ref SpillPrefix secret_manager_gcp_creds_name: !Ref GCSSecretName + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref LambdaFunctionName PackageType: "Image" ImageUri: !Sub diff --git a/athena-google-bigquery/Dockerfile b/athena-google-bigquery/Dockerfile index b1dbf5ef11..268f44fd45 100644 --- a/athena-google-bigquery/Dockerfile +++ b/athena-google-bigquery/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-google-bigquery-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-google-bigquery/athena-google-bigquery.yaml b/athena-google-bigquery/athena-google-bigquery.yaml index 42acf445f5..2efe1e7b11 100644 --- a/athena-google-bigquery/athena-google-bigquery.yaml +++ b/athena-google-bigquery/athena-google-bigquery.yaml @@ -61,12 +61,21 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" 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"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: AthenaBigQueryConnector: Type: 'AWS::Serverless::Function' @@ -80,6 +89,7 @@ Resources: gcp_project_id: !Ref GCPProjectID big_query_endpoint: !Ref BigQueryEndpoint GOOGLE_APPLICATION_CREDENTIALS: '/tmp/service-account.json' + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref LambdaFunctionName PackageType: "Image" ImageUri: !Sub diff --git a/athena-hbase/Dockerfile b/athena-hbase/Dockerfile index 6772c2c793..69697f84ed 100644 --- a/athena-hbase/Dockerfile +++ b/athena-hbase/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-hbase-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-hbase/athena-hbase.yaml b/athena-hbase/athena-hbase.yaml index ba51dfd827..1d94f226d9 100644 --- a/athena-hbase/athena-hbase.yaml +++ b/athena-hbase/athena-hbase.yaml @@ -52,6 +52,14 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" KerberosAuthEnabled: Description: 'Kerberos authentication enabled or not' Default: "false" @@ -72,6 +80,7 @@ Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: ConnectorConfig: Type: 'AWS::Serverless::Function' @@ -86,6 +95,7 @@ Resources: kerberos_config_files_s3_reference: !Ref KerberosConfigFilesS3Reference principal_name: !Ref PrincipalName hbase_rpc_protection: !Ref HbaseRpcProtection + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref AthenaCatalogName PackageType: "Image" ImageUri: !Sub diff --git a/athena-hbase/pom.xml b/athena-hbase/pom.xml index cda70c9c2f..538ebb83ac 100644 --- a/athena-hbase/pom.xml +++ b/athena-hbase/pom.xml @@ -147,4 +147,27 @@ + + + java17 + + 17 + + + + + org.apache.maven.plugins + maven-surefire-plugin + ${surefire.failsafe.version} + + -Xmx4g --add-opens=java.base/java.nio=ALL-UNNAMED + + *IntegTest + + + + + + + diff --git a/athena-hortonworks-hive/Dockerfile b/athena-hortonworks-hive/Dockerfile index 3a68e6d997..b37db2c258 100644 --- a/athena-hortonworks-hive/Dockerfile +++ b/athena-hortonworks-hive/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-hortonworks-hive-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-hortonworks-hive/athena-hortonworks-hive.yaml b/athena-hortonworks-hive/athena-hortonworks-hive.yaml index 8c1ac3a176..a66cab87da 100644 --- a/athena-hortonworks-hive/athena-hortonworks-hive.yaml +++ b/athena-hortonworks-hive/athena-hortonworks-hive.yaml @@ -54,12 +54,21 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" 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"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -70,6 +79,7 @@ Resources: spill_bucket: !Ref SpillBucket spill_prefix: !Ref SpillPrefix default: !Ref DefaultConnectionString + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref LambdaFunctionName PackageType: "Image" ImageUri: !Sub diff --git a/athena-kafka/Dockerfile b/athena-kafka/Dockerfile index fbab927e79..4e3f7545db 100644 --- a/athena-kafka/Dockerfile +++ b/athena-kafka/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-kafka-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-kafka/athena-kafka.yaml b/athena-kafka/athena-kafka.yaml index 9606527e64..561dfd7005 100644 --- a/athena-kafka/athena-kafka.yaml +++ b/athena-kafka/athena-kafka.yaml @@ -79,6 +79,14 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" Conditions: NotHasLambdaRole: !Equals [!Ref LambdaRoleARN, ""] @@ -87,6 +95,7 @@ Conditions: HasSubnets: !Not [ !Equals [ !Join ["", !Ref SubnetIds], "" ] ] IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: AthenaKafkaConnector: Type: 'AWS::Serverless::Function' @@ -101,6 +110,7 @@ Resources: kafka_endpoint: !Ref KafkaEndpoint schema_registry_url: !Ref SchemaRegistryUrl auth_type: !Ref AuthType + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref LambdaFunctionName PackageType: "Image" ImageUri: !Sub diff --git a/athena-msk/Dockerfile b/athena-msk/Dockerfile index b9cc2149da..b207e7008d 100644 --- a/athena-msk/Dockerfile +++ b/athena-msk/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-msk-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-msk/athena-msk.yaml b/athena-msk/athena-msk.yaml index ab06956c09..8a2cfb09be 100644 --- a/athena-msk/athena-msk.yaml +++ b/athena-msk/athena-msk.yaml @@ -75,6 +75,14 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" Conditions: NotHasLambdaRole: !Equals [!Ref LambdaRoleARN, ""] @@ -83,6 +91,7 @@ Conditions: HasSubnets: !Not [ !Equals [ !Join ["", !Ref SubnetIds], "" ] ] IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: AthenaMSKConnector: Type: 'AWS::Serverless::Function' @@ -96,6 +105,7 @@ Resources: certificates_s3_reference: !Ref CertificatesS3Reference kafka_endpoint: !Ref KafkaEndpoint auth_type: !Ref AuthType + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref LambdaFunctionName PackageType: "Image" ImageUri: !Sub diff --git a/athena-mysql/Dockerfile b/athena-mysql/Dockerfile index 08f27b704d..65bd7e66f5 100644 --- a/athena-mysql/Dockerfile +++ b/athena-mysql/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-mysql-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-mysql/athena-mysql.yaml b/athena-mysql/athena-mysql.yaml index 2b0d305c3e..595bb2751a 100644 --- a/athena-mysql/athena-mysql.yaml +++ b/athena-mysql/athena-mysql.yaml @@ -56,11 +56,20 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" 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"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -71,6 +80,7 @@ Resources: spill_bucket: !Ref SpillBucket spill_prefix: !Ref SpillPrefix default: !Ref DefaultConnectionString + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref LambdaFunctionName PackageType: "Image" ImageUri: !Sub diff --git a/athena-neptune/Dockerfile b/athena-neptune/Dockerfile index c8573d87c1..7e4ff25959 100644 --- a/athena-neptune/Dockerfile +++ b/athena-neptune/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-neptune-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-neptune/athena-neptune.yaml b/athena-neptune/athena-neptune.yaml index a468eeffb3..8e647a9f95 100644 --- a/athena-neptune/athena-neptune.yaml +++ b/athena-neptune/athena-neptune.yaml @@ -74,11 +74,20 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: ConnectorConfig: Type: 'AWS::Serverless::Function' @@ -96,6 +105,7 @@ Resources: neptune_graphtype: !Ref NeptuneGraphType SERVICE_REGION: !Ref AWS::Region enable_caseinsensitivematch: !Ref EnableCaseInsensitiveMatch + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref AthenaCatalogName PackageType: "Image" ImageUri: !Sub diff --git a/athena-neptune/pom.xml b/athena-neptune/pom.xml index e792f13948..7646814ace 100644 --- a/athena-neptune/pom.xml +++ b/athena-neptune/pom.xml @@ -212,4 +212,26 @@ + + + java17 + + 17 + + + + + org.apache.maven.plugins + maven-surefire-plugin + + --add-opens=java.base/java.nio=ALL-UNNAMED + + ${publishing} + + + + + + + diff --git a/athena-oracle/Dockerfile b/athena-oracle/Dockerfile index e85f8c566e..cd507c5ba5 100644 --- a/athena-oracle/Dockerfile +++ b/athena-oracle/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-oracle-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-oracle/athena-oracle.yaml b/athena-oracle/athena-oracle.yaml index 58d8329dc6..a69b5b918f 100644 --- a/athena-oracle/athena-oracle.yaml +++ b/athena-oracle/athena-oracle.yaml @@ -65,6 +65,14 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] NotHasLambdaRole: !Equals [!Ref LambdaRoleARN, ""] @@ -72,6 +80,7 @@ Conditions: HasSubnets: !Not [ !Equals [ !Join ["", !Ref SubnetIds], "" ] ] IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -83,6 +92,7 @@ Resources: spill_prefix: !Ref SpillPrefix default: !Ref DefaultConnectionString is_FIPS_Enabled: !Ref IsFIPSEnabled + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref LambdaFunctionName PackageType: "Image" ImageUri: !Sub diff --git a/athena-postgresql/Dockerfile b/athena-postgresql/Dockerfile index 3376a994dc..2b4138dff6 100644 --- a/athena-postgresql/Dockerfile +++ b/athena-postgresql/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-postgresql-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-postgresql/athena-postgresql.yaml b/athena-postgresql/athena-postgresql.yaml index 1752d485e9..9b7b4a70bd 100644 --- a/athena-postgresql/athena-postgresql.yaml +++ b/athena-postgresql/athena-postgresql.yaml @@ -61,6 +61,14 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" DefaultScale: Description: "(Optional) Default value for scale of type Numeric, representing the decimal digits in the fractional part, to the right of the decimal point." Default: 0 @@ -71,6 +79,7 @@ Conditions: NotHasLambdaRole: !Equals [!Ref LambdaRoleARN, ""] IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -82,6 +91,7 @@ Resources: spill_prefix: !Ref SpillPrefix default: !Ref DefaultConnectionString default_scale: !Ref DefaultScale + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref LambdaFunctionName PackageType: "Image" ImageUri: !Sub diff --git a/athena-redis/Dockerfile b/athena-redis/Dockerfile index 3e9e9888f7..08b2e3b165 100644 --- a/athena-redis/Dockerfile +++ b/athena-redis/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-redis-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-redis/athena-redis.yaml b/athena-redis/athena-redis.yaml index 5d18c7ced1..ac2282be49 100644 --- a/athena-redis/athena-redis.yaml +++ b/athena-redis/athena-redis.yaml @@ -49,6 +49,14 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" QPTConnectionEndpoint: Description: "(Optional) The hostname:port:password of the Redis server that contains data for this table optionally using SecretsManager (e.g. ${secret_name}). Used for Query Pass Through queries only." Default: '' @@ -69,6 +77,7 @@ Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: ConnectorConfig: Type: 'AWS::Serverless::Function' @@ -82,6 +91,7 @@ Resources: qpt_ssl: !Ref QPTConnectionSSL qpt_cluster: !Ref QPTConnectionCluster qpt_db_number: !Ref QPTConnectionDBNumber + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref AthenaCatalogName PackageType: "Image" ImageUri: !Sub diff --git a/athena-redshift/Dockerfile b/athena-redshift/Dockerfile index 0e7d808823..81ab7b616a 100644 --- a/athena-redshift/Dockerfile +++ b/athena-redshift/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-redshift-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-redshift/athena-redshift.yaml b/athena-redshift/athena-redshift.yaml index 58686808d4..1a16bdf9d9 100644 --- a/athena-redshift/athena-redshift.yaml +++ b/athena-redshift/athena-redshift.yaml @@ -60,6 +60,14 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" Conditions: HasKMSKeyId: !Not [!Equals [!Ref KMSKeyId, ""]] NotHasLambdaRole: !Equals [!Ref LambdaRole, ""] @@ -69,6 +77,7 @@ Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -80,6 +89,7 @@ Resources: spill_prefix: !Ref SpillPrefix default: !Ref DefaultConnectionString kms_key_id: !If [HasKMSKeyId, !Ref KMSKeyId, !Ref "AWS::NoValue"] + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref LambdaFunctionName PackageType: "Image" ImageUri: !Sub diff --git a/athena-saphana/Dockerfile b/athena-saphana/Dockerfile index 5e55d28a12..59d78fe43b 100644 --- a/athena-saphana/Dockerfile +++ b/athena-saphana/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-saphana.zip ${LAMBDA_TASK_ROOT} diff --git a/athena-saphana/athena-saphana.yaml b/athena-saphana/athena-saphana.yaml index 201816368e..bc3607e479 100644 --- a/athena-saphana/athena-saphana.yaml +++ b/athena-saphana/athena-saphana.yaml @@ -54,12 +54,21 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" 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"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -70,6 +79,7 @@ Resources: spill_bucket: !Ref SpillBucket spill_prefix: !Ref SpillPrefix default: !Ref DefaultConnectionString + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref LambdaFunctionName PackageType: "Image" ImageUri: !Sub diff --git a/athena-snowflake/Dockerfile b/athena-snowflake/Dockerfile index 8d4d9081a6..8be8478258 100644 --- a/athena-snowflake/Dockerfile +++ b/athena-snowflake/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-snowflake.zip ${LAMBDA_TASK_ROOT} diff --git a/athena-snowflake/athena-snowflake.yaml b/athena-snowflake/athena-snowflake.yaml index 0646c8a5e6..657a339da7 100644 --- a/athena-snowflake/athena-snowflake.yaml +++ b/athena-snowflake/athena-snowflake.yaml @@ -54,12 +54,21 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" 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"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -70,6 +79,7 @@ Resources: spill_bucket: !Ref SpillBucket spill_prefix: !Ref SpillPrefix default: !Ref DefaultConnectionString + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref LambdaFunctionName PackageType: "Image" ImageUri: !Sub diff --git a/athena-sqlserver/Dockerfile b/athena-sqlserver/Dockerfile index e602b9fc50..c8f5a77cea 100644 --- a/athena-sqlserver/Dockerfile +++ b/athena-sqlserver/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-sqlserver-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-sqlserver/athena-sqlserver.yaml b/athena-sqlserver/athena-sqlserver.yaml index 8edbf4e082..c1b529dc8b 100644 --- a/athena-sqlserver/athena-sqlserver.yaml +++ b/athena-sqlserver/athena-sqlserver.yaml @@ -60,6 +60,14 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] NotHasLambdaRole: !Equals [!Ref LambdaRoleARN, ""] @@ -67,6 +75,7 @@ Conditions: HasSubnets: !Not [ !Equals [ !Join ["", !Ref SubnetIds], "" ] ] IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -77,6 +86,7 @@ Resources: spill_bucket: !Ref SpillBucket spill_prefix: !Ref SpillPrefix default: !Ref DefaultConnectionString + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref LambdaFunctionName PackageType: "Image" ImageUri: !Sub diff --git a/athena-synapse/Dockerfile b/athena-synapse/Dockerfile index 2a7a05ec98..d2088c60de 100644 --- a/athena-synapse/Dockerfile +++ b/athena-synapse/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-synapse-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-synapse/athena-synapse.yaml b/athena-synapse/athena-synapse.yaml index 50f1092c7c..771b6500ed 100644 --- a/athena-synapse/athena-synapse.yaml +++ b/athena-synapse/athena-synapse.yaml @@ -48,6 +48,14 @@ Parameters: Description: "(Optional) A custom Permission Boundary to be used by the Connector lambda" Default: "" Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" DisableSpillEncryption: Description: 'If set to ''false'' data spilled to S3 is encrypted with AES GCM' Default: 'false' @@ -68,6 +76,7 @@ Conditions: HasSubnets: !Not [ !Equals [ !Join ["", !Ref SubnetIds], "" ] ] IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -78,6 +87,7 @@ Resources: spill_bucket: !Ref SpillBucket spill_prefix: !Ref SpillPrefix default: !Ref DefaultConnectionString + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref LambdaFunctionName PackageType: "Image" ImageUri: !Sub diff --git a/athena-teradata/Dockerfile b/athena-teradata/Dockerfile index 8f58411065..c848792994 100644 --- a/athena-teradata/Dockerfile +++ b/athena-teradata/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-teradata-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-teradata/athena-teradata.yaml b/athena-teradata/athena-teradata.yaml index 14177fa635..1c22041955 100644 --- a/athena-teradata/athena-teradata.yaml +++ b/athena-teradata/athena-teradata.yaml @@ -58,12 +58,21 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" 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"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: JdbcConnectorConfig: Type: 'AWS::Serverless::Function' @@ -75,6 +84,7 @@ Resources: spill_prefix: !Ref SpillPrefix default: !Ref DefaultConnectionString partitioncount: !Ref PartitionCount + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref LambdaFunctionName PackageType: "Image" ImageUri: !Sub diff --git a/athena-timestream/Dockerfile b/athena-timestream/Dockerfile index 8a0be2c8f9..65c0777226 100644 --- a/athena-timestream/Dockerfile +++ b/athena-timestream/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-timestream-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-timestream/athena-timestream.yaml b/athena-timestream/athena-timestream.yaml index 2e0387ce57..ad24053c2c 100644 --- a/athena-timestream/athena-timestream.yaml +++ b/athena-timestream/athena-timestream.yaml @@ -40,10 +40,19 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: ConnectorConfig: Type: 'AWS::Serverless::Function' @@ -53,6 +62,7 @@ Resources: disable_spill_encryption: !Ref DisableSpillEncryption spill_bucket: !Ref SpillBucket spill_prefix: !Ref SpillPrefix + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref AthenaCatalogName PackageType: "Image" ImageUri: !Sub diff --git a/athena-timestream/pom.xml b/athena-timestream/pom.xml index f00279ec9d..30bbf19ae0 100644 --- a/athena-timestream/pom.xml +++ b/athena-timestream/pom.xml @@ -143,4 +143,26 @@ + + + java17 + + 17 + + + + + org.apache.maven.plugins + maven-surefire-plugin + + --add-opens=java.base/java.nio=ALL-UNNAMED + + ${publishing} + + + + + + + diff --git a/athena-tpcds/Dockerfile b/athena-tpcds/Dockerfile index 7c4d31ffa1..508ccea7f7 100644 --- a/athena-tpcds/Dockerfile +++ b/athena-tpcds/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-tpcds-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-tpcds/athena-tpcds.yaml b/athena-tpcds/athena-tpcds.yaml index ed88425b11..493a610d92 100644 --- a/athena-tpcds/athena-tpcds.yaml +++ b/athena-tpcds/athena-tpcds.yaml @@ -40,10 +40,19 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: ConnectorConfig: Type: 'AWS::Serverless::Function' @@ -53,6 +62,7 @@ Resources: disable_spill_encryption: !Ref DisableSpillEncryption spill_bucket: !Ref SpillBucket spill_prefix: !Ref SpillPrefix + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref AthenaCatalogName PackageType: "Image" ImageUri: !Sub diff --git a/athena-udfs/Dockerfile b/athena-udfs/Dockerfile index d18b85ae78..42ce47cfcb 100644 --- a/athena-udfs/Dockerfile +++ b/athena-udfs/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-udfs-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-udfs/athena-udfs.yaml b/athena-udfs/athena-udfs.yaml index facaba9bcb..dff9f9daf9 100644 --- a/athena-udfs/athena-udfs.yaml +++ b/athena-udfs/athena-udfs.yaml @@ -32,14 +32,26 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: ConnectorConfig: Type: 'AWS::Serverless::Function' Properties: + Environment: + Variables: + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Ref LambdaFunctionName PackageType: "Image" ImageUri: !Sub diff --git a/athena-vertica/Dockerfile b/athena-vertica/Dockerfile index c06ed8b9c2..2273303d1d 100644 --- a/athena-vertica/Dockerfile +++ b/athena-vertica/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/java:11 +FROM public.ecr.aws/lambda/java:17 # Copy function code and runtime dependencies from Maven layout COPY target/athena-vertica-2022.47.1.jar ${LAMBDA_TASK_ROOT} diff --git a/athena-vertica/athena-vertica.yaml b/athena-vertica/athena-vertica.yaml index 60775db042..59edcd9542 100644 --- a/athena-vertica/athena-vertica.yaml +++ b/athena-vertica/athena-vertica.yaml @@ -60,11 +60,20 @@ Parameters: Description: "(Optional) An IAM policy ARN to use as the PermissionsBoundary for the created Lambda function's execution role" Default: '' Type: String + JavaVersion: + Description: "(Optional) Specify the Java version for the Lambda function. Default is '17'; use '11' for Java 11 or '8' for Java 8." + Type: String + AllowedValues: + - "17" + - "11" + - "8" + Default: "17" Conditions: HasPermissionsBoundary: !Not [ !Equals [ !Ref PermissionsBoundaryARN, "" ] ] IsRegionBAH: !Equals [!Ref "AWS::Region", "me-south-1"] IsRegionHKG: !Equals [!Ref "AWS::Region", "ap-east-1"] + IsJava17: !Equals [!Ref JavaVersion, "17"] Resources: LambdaSecurityGroup: Type: 'AWS::EC2::SecurityGroup' @@ -81,6 +90,7 @@ Resources: spill_prefix: !Ref SpillPrefix export_bucket: !Ref VerticaExportBucket default: !Ref VerticaConnectionString + JAVA_TOOL_OPTIONS: !If [IsJava17, "--add-opens=java.base/java.nio=ALL-UNNAMED", !Ref "AWS::NoValue"] FunctionName: !Sub "${AthenaCatalogName}" PackageType: "Image" diff --git a/athena-vertica/pom.xml b/athena-vertica/pom.xml index 4e8543e54c..edfa5b58b0 100644 --- a/athena-vertica/pom.xml +++ b/athena-vertica/pom.xml @@ -140,4 +140,26 @@ + + + java17 + + 17 + + + + + org.apache.maven.plugins + maven-surefire-plugin + + --add-opens=java.base/java.nio=ALL-UNNAMED + + ${publishing} + + + + + + + diff --git a/pom.xml b/pom.xml index 210c00139d..433d1927b2 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,9 @@ - 11 + + + 17 3.13.0 2.28.9 @@ -25,7 +27,7 @@ 4.13.2 1.9.1 3.26.3 - 7.10.2 + 7.5.1 2.18.0 3.5.1 @@ -385,6 +387,40 @@ + + java17 + + 17 + + + + + org.apache.maven.plugins + maven-surefire-plugin + ${surefire.failsafe.version} + + --add-opens=java.base/java.nio=ALL-UNNAMED + + *IntegTest + + + + + org.apache.maven.plugins + maven-failsafe-plugin + ${surefire.failsafe.version} + + --add-opens=java.base/java.nio=ALL-UNNAMED + 3C + false + + *IntegTest + + + + + + release