diff --git a/data-prepper-plugins/aws-plugin/src/test/java/org/opensearch/dataprepper/plugins/aws/CredentialsProviderFactoryTest.java b/data-prepper-plugins/aws-plugin/src/test/java/org/opensearch/dataprepper/plugins/aws/CredentialsProviderFactoryTest.java index c2a8e094f6..c2a39e7f9b 100644 --- a/data-prepper-plugins/aws-plugin/src/test/java/org/opensearch/dataprepper/plugins/aws/CredentialsProviderFactoryTest.java +++ b/data-prepper-plugins/aws-plugin/src/test/java/org/opensearch/dataprepper/plugins/aws/CredentialsProviderFactoryTest.java @@ -86,6 +86,8 @@ void providerFromOptions_with_invalid_StsRoleArn_throws(final String stsRoleArn) void providerFromOptions_with_StsRoleArn() { when(awsCredentialsOptions.getStsRoleArn()) .thenReturn(createStsRole()); + when(awsCredentialsOptions.getRegion()) + .thenReturn(Region.US_EAST_1); final AwsCredentialsProvider awsCredentialsProvider = createObjectUnderTest().providerFromOptions(awsCredentialsOptions); assertThat(awsCredentialsProvider, instanceOf(StsAssumeRoleCredentialsProvider.class)); }