В настоящее время я работаю с localstack над созданием некоторых интеграционных тестов.
Я хотел бы настроить идентификатор учетной записи на другой идентификатор, отличный от идентификатора по умолчанию.
Код: Выделить всё
000000000000
Код: Выделить всё
TEST_AWS_ACCOUNT_ID
Unfortunately when I set this, and then run the following code in a test
Код: Выделить всё
val stsClient: AWSSecurityTokenService =
AWSSecurityTokenServiceClientBuilder.standard()
.withCredentials(credentialsProviders.v1)
.withEndpointConfiguration(new EndpointConfiguration(localStack.endpointOverride(LocalStackContainer.Service.STS).toString, v1Region.value.getName))
.build()
val thisAccountId = AccountId(stsClient.getCallerIdentity(new GetCallerIdentityRequest()).getAccount)
println(s"ThisAccountID: $thisAccountId")
Код: Выделить всё
ThisAccountID: 000000000000
Источник: https://stackoverflow.com/questions/781 ... 0000000000