View a markdown version of this page

Errors that the Parameter Store extension in AWS Systems Manager Cloud Extensions returns - AWS Systems Manager

Errors that the Parameter Store extension in AWS Systems Manager Cloud Extensions returns

The extension returns the errors of Parameter Store in the AWS JSON 1.1 protocol, as Parameter Store does, so an SDK raises them as the same exceptions. The error type is in the X-Amzn-Errortype header and in the __type member of the body. The message is in Message for AccessDeniedException, InternalServerError, ThrottlingException, and ValidationException. For the other errors, the message is in message, as in the responses of Parameter Store.

Both operations return the same errors, except that only GetParameter returns ParameterNotFound and ParameterVersionNotFound. GetParameters lists a name that doesn't exist, or whose version or label doesn't exist, in InvalidParameters instead, with status 200.

The following example shows an error response:

HTTP/1.1 400 Bad Request Content-Type: application/x-amz-json-1.1 X-Amzn-Errortype: ParameterNotFound {"__type":"ParameterNotFound","message":"service returned ParameterNotFound"}

The following table lists the errors and what each error means.

Status Error type Meaning

400

ValidationException

A request that doesn't match the API: a missing or empty Name, a name of more than 2,048 characters, no Names or more than 10 Names, or a WithDecryption value that isn't a boolean. Also an operation that the extension doesn't serve (No operation matches the request), or a name that Parameter Store rejects, such as a name with a space. When Parameter Store sends a ReasonCode, the extension returns it. When the runtime rejects the request, the cloudextensions-error-reason header holds the reason, such as FIELD_VALIDATION_FAILED or UNKNOWN_OPERATION.

400

AccessDeniedException

The runtime refused the request because it isn't signed, or its signature doesn't match the extension key. The cloudextensions-error-reason header holds the reason, such as MISSING_AUTHENTICATION or SIGNATURE_MISMATCH. Or Parameter Store refused the role of the extension. The role lacks ssm:GetParameter or ssm:GetParameters, or kms:Decrypt for a SecureString, or the resource policy of a cross-account parameter doesn't allow the role. Parameter Store also returns this error with status 400.

400

ThrottlingException

Parameter Store throttled the call. Or the runtime throttled the request because too many calls are in flight, or fewer under memory pressure. When Parameter Store sends a QuotaCode and a ServiceCode, the extension returns them. Retry after the time in the Retry-After header when it's present.

400

ParameterNotFound

The parameter doesn't exist in the Region of the runtime or in that account. The message is service returned ParameterNotFound.

400

ParameterVersionNotFound

The parameter exists, but not the :version or :label that you asked for.

400

InvalidKeyId

The AWS Key Management Service (AWS KMS) key of the SecureString is disabled, deleted, or unusable. GetParameters returns this error for the whole request only when Parameter Store can't use AWS KMS at the time. GetParameters lists a SecureString whose key is disabled or deleted in InvalidParameters instead.

400

ExpiredTokenException, UnrecognizedClientException, InvalidSignatureException, IncompleteSignatureException, MissingAuthenticationTokenException

Parameter Store rejected the credentials or the signature of the call that the extension made. These errors don't depend on your request.

500

InternalFailure

The runtime couldn't get the credentials to sign the call, so the extension didn't call Parameter Store. The message is Error connecting to the service. The cause is in the log of the extension.

500

InternalServerError

Parameter Store returned an internal error or an error that the extension doesn't declare, or the extension couldn't complete the call. For example, the call was canceled, the capability isn't approved (unable to call ssm:operation (AwsCallFailed)), or the extension failed during the request.

502

BadGatewayException

The call to Parameter Store, or getting its credentials, timed out. Or the extension couldn't connect to Parameter Store or couldn't read the response, and the cache held no value to serve. The Reason member of the body is EXTENSION_INVALID_RESPONSE. The error is transient, so retry the request.

503

ServiceUnavailable

Parameter Store is unavailable, or the extension is still loading or is being replaced. Retry after the time in the Retry-After header when it's present.

The extension returns the other errors of Parameter Store under their own names, with their original message and status: IncompleteSignature (403), MalformedHttpRequestException (400), NotAuthorized (401), OptInRequired (403), RequestAbortedException (400), RequestEntityTooLargeException (413), RequestTimeoutException (408), UnknownOperationException (404), and ValidationError (400). When Parameter Store sends no message, the message is service returned type.

The runtime logs the cause of a timeout, a connection error, or a credentials failure. The extension doesn't return the cause to the caller. The extension never logs or returns parameter values.

For how each error affects the cache, see How the extension reacts to errors.