From fa32de8f04852060f4eb2ba6dc3693a58cd1cd04 Mon Sep 17 00:00:00 2001 From: Veetaha Date: Fri, 27 Feb 2026 14:51:23 +0000 Subject: [PATCH] Bump lambdas nodejs runtime to 24 --- .../cloudformation.yaml | 2 +- .../cleanup-elastio-ebs-vols.yaml | 42 +++++++++---------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/cleanup-imported-ebs-snapshots/cloudformation.yaml b/cleanup-imported-ebs-snapshots/cloudformation.yaml index 166922f..deb26e3 100644 --- a/cleanup-imported-ebs-snapshots/cloudformation.yaml +++ b/cleanup-imported-ebs-snapshots/cloudformation.yaml @@ -62,7 +62,7 @@ Resources: Properties: FunctionName: elastio-cleanup-imported-ebs-snapshots Description: "A Lambda function to delete EBS snapshots tagged with elastio:imported-to-rp" - Runtime: nodejs20.x + Runtime: nodejs24.x Handler: index.handler Role: !GetAtt LambdaExecutionRole.Arn Events: diff --git a/cleanup-leftover-ebs-volumes/cleanup-elastio-ebs-vols.yaml b/cleanup-leftover-ebs-volumes/cleanup-elastio-ebs-vols.yaml index 3ca4da1..c03d8a2 100644 --- a/cleanup-leftover-ebs-volumes/cleanup-elastio-ebs-vols.yaml +++ b/cleanup-leftover-ebs-volumes/cleanup-elastio-ebs-vols.yaml @@ -1,12 +1,12 @@ -AWSTemplateFormatVersion: '2010-09-09' -Transform: 'AWS::Serverless-2016-10-31' +AWSTemplateFormatVersion: "2010-09-09" +Transform: "AWS::Serverless-2016-10-31" Resources: EBSVolumeCleanupFunction: - Type: 'AWS::Serverless::Function' + Type: "AWS::Serverless::Function" Properties: FunctionName: EBSVolumeCleanupFunction - Description: 'A Lambda function to delete un-attached EBS volumes older than 24 hours with the elastio:resource tag' - Runtime: nodejs20.x + Description: "A Lambda function to delete un-attached EBS volumes older than 24 hours with the elastio:resource tag" + Runtime: nodejs24.x Handler: index.handler Role: !GetAtt LambdaExecutionRole.Arn InlineCode: |- @@ -68,44 +68,44 @@ Resources: Schedule1: Type: Schedule Properties: - Schedule: 'rate(1 hour)' + Schedule: "rate(1 hour)" LambdaExecutionRole: - Type: 'AWS::IAM::Role' + Type: "AWS::IAM::Role" Properties: RoleName: LambdaExecutionRole AssumeRolePolicyDocument: - Version: '2012-10-17' + Version: "2012-10-17" Statement: - Effect: Allow Principal: Service: - lambda.amazonaws.com Action: - - 'sts:AssumeRole' + - "sts:AssumeRole" Policies: - PolicyName: EC2EBSVolumePolicy PolicyDocument: - Version: '2012-10-17' + Version: "2012-10-17" Statement: - Effect: Allow Action: - - 'ec2:DescribeVolumes' - Resource: '*' + - "ec2:DescribeVolumes" + Resource: "*" - Effect: Allow Action: - - 'ec2:DeleteVolume' - Resource: '*' + - "ec2:DeleteVolume" + Resource: "*" Condition: StringLike: - 'aws:ResourceTag/elastio:resource': '*' + "aws:ResourceTag/elastio:resource": "*" - Effect: Allow Action: - - 'logs:CreateLogGroup' - - 'logs:CreateLogStream' - - 'logs:PutLogEvents' - Resource: 'arn:aws:logs:*:*:*' + - "logs:CreateLogGroup" + - "logs:CreateLogStream" + - "logs:PutLogEvents" + Resource: "arn:aws:logs:*:*:*" EBSVolumeCleanupLogGroup: - Type: 'AWS::Logs::LogGroup' + Type: "AWS::Logs::LogGroup" Properties: - LogGroupName: '/aws/lambda/EBSVolumeCleanupFunction' + LogGroupName: "/aws/lambda/EBSVolumeCleanupFunction" RetentionInDays: 7