diff --git a/RemoteSigner.Tests/RemoteSigner.Tests.csproj b/RemoteSigner.Tests/RemoteSigner.Tests.csproj
index f92e3c7..35add7d 100644
--- a/RemoteSigner.Tests/RemoteSigner.Tests.csproj
+++ b/RemoteSigner.Tests/RemoteSigner.Tests.csproj
@@ -6,8 +6,8 @@
RemoteSigner.Tests
-
-
+
+
diff --git a/RemoteSigner/Function.cs b/RemoteSigner/Function.cs
index 9b4df92..4a0948e 100644
--- a/RemoteSigner/Function.cs
+++ b/RemoteSigner/Function.cs
@@ -7,7 +7,7 @@
using Amazon.Lambda.APIGatewayEvents;
using Amazon.Lambda.Core;
using Amazon.Lambda.Serialization.SystemTextJson;
-using Amazon.Runtime;
+using Amazon.Runtime.CredentialManagement;
using NBitcoin;
[assembly:
@@ -56,8 +56,10 @@ public async Task FunctionHandler(APIGatewayHt
if (requestBody == null) throw new ArgumentNullException(nameof(requestBody), "Request body not found");
#if DEBUG
- var kmsClient = new AmazonKeyManagementServiceClient(new StoredProfileAWSCredentials("default"),
- RegionEndpoint.EUCentral1);
+ //AWS SDK v4 removed StoredProfileAWSCredentials; resolve the "default" profile explicitly
+ if (!new CredentialProfileStoreChain().TryGetAWSCredentials("default", out var debugCredentials))
+ throw new InvalidOperationException("AWS profile 'default' was not found");
+ var kmsClient = new AmazonKeyManagementServiceClient(debugCredentials, RegionEndpoint.EUCentral1);
#else
var kmsClient = new AmazonKeyManagementServiceClient();
#endif
diff --git a/RemoteSigner/RemoteSigner.csproj b/RemoteSigner/RemoteSigner.csproj
index 2c10db0..e443ca2 100644
--- a/RemoteSigner/RemoteSigner.csproj
+++ b/RemoteSigner/RemoteSigner.csproj
@@ -13,11 +13,11 @@
RemoteSigner
-
-
-
-
-
-
+
+
+
+
+
+
\ No newline at end of file