STS / Client / exceptions / InvalidAttestationDocumentException

InvalidAttestationDocumentException

class STS.Client.exceptions.InvalidAttestationDocumentException

Amazon Web Services STS can’t use the attestation document in the request. The reason member says why. Correct the attestation document and then retry the request.

Example

try:
  ...
except client.exceptions.InvalidAttestationDocumentException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'reason': 'providerNotFound'|'cannotParse'|'duplicateKey'|'invalidKey'|'invalidValue'|'tooLarge'|'unexpectedAttestation'|'unresolvedTemplateVariable',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) –

    Amazon Web Services STS can’t use the attestation document in the request. The reason member says why. Correct the attestation document and then retry the request.

    • message (string) –

    • reason (string) –

      Why Amazon Web Services STS can’t use the attestation document. The value is one of the following:

      • providerNotFound – Amazon Web Services STS has no attestation rules for the calling service, so the calling service can’t attest workloads.

      • cannotParse – The document is empty or isn’t a single JSON object.

      • tooLarge – The document is longer than 2,048 characters. This reason is also returned when the context assertion built from the document is too large to pass to AssumeRole.

      • invalidKey – A key isn’t in a valid format.

      • unexpectedAttestation – The document contains a key that the calling service can’t attest.

      • invalidValue – The document has no keys, or a value is empty, isn’t of the type that the key expects, or contains characters that aren’t allowed.

      • duplicateKey – Two keys are the same when you ignore case. This reason is also returned when the document repeats a key that the workload identity template uses.

      • unresolvedTemplateVariable – The workload identity template uses an attested value that the document doesn’t contain.

    • Error (dict) – Normalized access to common exception attributes.

      • Code (string) – An identifier specifying the exception type.

      • Message (string) – A descriptive message explaining why the exception occured.