Skip to content

Commit e712d3d

Browse files
committed
Fix LocalStack authentication by reading AWS credentials from environment variables
1 parent 7531ee2 commit e712d3d

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎tests/SourceFlow.Cloud.AWS.Tests/TestHelpers/AwsTestConfiguration.cs‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,17 @@ public class AwsTestConfiguration
2929

3030
/// <summary>
3131
/// AWS access key for testing (used with LocalStack)
32+
/// LocalStack accepts any credentials when IAM is not enforced,
33+
/// but 'test' is the standard convention
3234
/// </summary>
33-
public string AccessKey { get; set; } = "test";
35+
public string AccessKey { get; set; } = Environment.GetEnvironmentVariable("AWS_ACCESS_KEY_ID") ?? "test";
3436

3537
/// <summary>
3638
/// AWS secret key for testing (used with LocalStack)
39+
/// LocalStack accepts any credentials when IAM is not enforced,
40+
/// but 'test' is the standard convention
3741
/// </summary>
38-
public string SecretKey { get; set; } = "test";
42+
public string SecretKey { get; set; } = Environment.GetEnvironmentVariable("AWS_SECRET_ACCESS_KEY") ?? "test";
3943

4044
/// <summary>
4145
/// Test queue URLs mapped by command type

0 commit comments

Comments
 (0)