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?

Aucune réponse

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions