Skip to content

Commit

Permalink
Upgrade to Java 17
Browse files Browse the repository at this point in the history
  • Loading branch information
Jithendar12 committed Oct 30, 2024
1 parent 3a306dd commit 33975a3
Show file tree
Hide file tree
Showing 75 changed files with 539 additions and 38 deletions.
2 changes: 1 addition & 1 deletion athena-aws-cmdb/Dockerfile
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
10 changes: 10 additions & 0 deletions athena-aws-cmdb/athena-aws-cmdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion athena-clickhouse/Dockerfile
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
10 changes: 10 additions & 0 deletions athena-clickhouse/athena-clickhouse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion athena-cloudera-hive/Dockerfile
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
10 changes: 10 additions & 0 deletions athena-cloudera-hive/athena-cloudera-hive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion athena-cloudera-impala/Dockerfile
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
10 changes: 10 additions & 0 deletions athena-cloudera-impala/athena-cloudera-impala.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""
Expand All @@ -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'
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion athena-cloudwatch-metrics/Dockerfile
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
10 changes: 10 additions & 0 deletions athena-cloudwatch-metrics/athena-cloudwatch-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion athena-cloudwatch/Dockerfile
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
10 changes: 10 additions & 0 deletions athena-cloudwatch/athena-cloudwatch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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, ""]]
Expand All @@ -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'
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion athena-datalakegen2/Dockerfile
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
10 changes: 10 additions & 0 deletions athena-datalakegen2/athena-datalakegen2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion athena-db2-as400/Dockerfile
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
10 changes: 10 additions & 0 deletions athena-db2-as400/athena-db2-as400.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion athena-db2/Dockerfile
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
10 changes: 10 additions & 0 deletions athena-db2/athena-db2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion athena-docdb/Dockerfile
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
10 changes: 10 additions & 0 deletions athena-docdb/athena-docdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion athena-dynamodb/Dockerfile
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
10 changes: 10 additions & 0 deletions athena-dynamodb/athena-dynamodb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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, ""]]
Expand All @@ -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'
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion athena-elasticsearch/Dockerfile
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
Loading

0 comments on commit 33975a3

Please sign in to comment.