Why is using Java SDK SecretsManagerClient to connect to SecretsManager having long delays with many "software.amazon.awssdk.core.exception.SdkClientException: Unable to execute HTTP request" retries?

0

Hello, since about September 25th, we have been noticing that our connection attempts to SecretsManager in almost all environments are experiencing long delays.

The errors are almost always this: "software.amazon.awssdk.core.exception.SdkClientException: Unable to execute HTTP request" and they are occurring when we run this code:

    public static String getSecretValue(Logger logger, String secretRegion, String secretName, String secretKey) {

        String result = "";

        Region region = Region.of(secretRegion);

        SecretsManagerClient client = SecretsManagerClient.builder()
                .region(region)
                .build();

        GetSecretValueRequest getSecretValueRequest = GetSecretValueRequest.builder()
                .secretId(secretName)
                .build();
        GetSecretValueResponse getSecretValueResponse = null;

        try {
            getSecretValueResponse = client.getSecretValue(getSecretValueRequest);
        } catch (DecryptionFailureException e) {
            logger.error("getSecretValue DecryptionFailureException: {}", e.getMessage());
            throw e;
        } catch (InternalServiceErrorException e) {
            logger.error("getSecretValue InternalServiceErrorException: {}", e.getMessage());
            throw e;
        } catch (InvalidParameterException e) {
            logger.error("getSecretValue InvalidParameterException: {}", e.getMessage());
            throw e;
        } catch (InvalidRequestException e) {
            logger.error("getSecretValue InvalidRequestException: {}", e.getMessage());
            throw e;
        } catch (ResourceNotFoundException e) {
            logger.error("getSecretValue ResourceNotFoundException: {}", e.getMessage());
            throw e;
        }

        String secret = getSecretValueResponse.secretString();

        try {
            JSONObject jsonObject = new JSONObject(secret);
            result = jsonObject.get(secretKey).toString();
        } catch (JSONException je) {
            logger.error("getSecretValue : {}", je.getMessage());
        }

        return result;
    }

Up until that date, we have had almost no issues with this particular function. Did something happen to SecretsManager? Is there something we can do on our side?

回答なし

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ