From e187f096aeebb7bf15913497910c832fb69725fb Mon Sep 17 00:00:00 2001 From: "gu-scala-steward-public-repos[bot]" <108136057+gu-scala-steward-public-repos[bot]@users.noreply.github.com> Date: Wed, 31 Jul 2024 10:57:53 +0000 Subject: [PATCH 1/2] Update acm to 2.26.27 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 935f108b..cdeeafd6 100644 --- a/build.sbt +++ b/build.sbt @@ -4,7 +4,7 @@ version := "1.0-SNAPSHOT" ThisBuild / scalaVersion := "2.13.14" -val awsVersion = "2.25.70" +val awsVersion = "2.26.27" val awsVersionOne = "1.12.764" def env(propName: String): String = From e060263e9f942fe56c1a182397dfd3fa99652a13 Mon Sep 17 00:00:00 2001 From: akash1810 Date: Fri, 2 Aug 2024 12:06:49 +0100 Subject: [PATCH 2/2] fix: Switch to `retryStrategy` as `retryPolicy` is deprecated --- app/conf/AWS.scala | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/app/conf/AWS.scala b/app/conf/AWS.scala index cb7a3efc..5504a5e1 100644 --- a/app/conf/AWS.scala +++ b/app/conf/AWS.scala @@ -1,9 +1,8 @@ package conf import java.net.InetAddress - import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration -import software.amazon.awssdk.core.retry.RetryPolicy +import software.amazon.awssdk.core.retry.RetryMode import software.amazon.awssdk.regions.Region import software.amazon.awssdk.regions.internal.util.EC2MetadataUtils import software.amazon.awssdk.services.ec2.Ec2Client @@ -13,7 +12,6 @@ import software.amazon.awssdk.services.ec2.model.{ Filter } import utils.Logging - import scala.collection.MapView import scala.jdk.CollectionConverters._ import scala.util.Try @@ -21,12 +19,7 @@ import scala.util.Try object AWS extends Logging { val clientConfig: ClientOverrideConfiguration = ClientOverrideConfiguration .builder() - .retryPolicy( - RetryPolicy - .builder() - .numRetries(10) - .build() - ) + .retryStrategy(RetryMode.ADAPTIVE_V2) .build() // This is to detect if we are running in AWS or on GC2. The 169.254.169.254