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?

profile picture
질문됨 7달 전116회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠