AWS Config

2017/02/16 - AWS Config - 1 updated api methods

Changes  AWS Config now supports a new test mode for the PutEvaluations API. Set the TestMode parameter to true in your custom rule to verify whether your AWS Lambda function will deliver evaluation results to AWS Config. No updates occur to your existing evaluations, and evaluation results are not sent to AWS Config.

PutEvaluations (updated) Link ΒΆ
Changes (request)
{'TestMode': 'boolean'}

Used by an AWS Lambda function to deliver evaluation results to AWS Config. This action is required in every AWS Lambda function that is invoked by an AWS Config rule.

See also: AWS API Documentation

Request Syntax

client.put_evaluations(
    Evaluations=[
        {
            'ComplianceResourceType': 'string',
            'ComplianceResourceId': 'string',
            'ComplianceType': 'COMPLIANT'|'NON_COMPLIANT'|'NOT_APPLICABLE'|'INSUFFICIENT_DATA',
            'Annotation': 'string',
            'OrderingTimestamp': datetime(2015, 1, 1)
        },
    ],
    ResultToken='string',
    TestMode=True|False
)
type Evaluations

list

param Evaluations

The assessments that the AWS Lambda function performs. Each evaluation identifies an AWS resource and indicates whether it complies with the AWS Config rule that invokes the AWS Lambda function.

  • (dict) --

    Identifies an AWS resource and indicates whether it complies with the AWS Config rule that it was evaluated against.

    • ComplianceResourceType (string) -- [REQUIRED]

      The type of AWS resource that was evaluated.

    • ComplianceResourceId (string) -- [REQUIRED]

      The ID of the AWS resource that was evaluated.

    • ComplianceType (string) -- [REQUIRED]

      Indicates whether the AWS resource complies with the AWS Config rule that it was evaluated against.

      For the Evaluation data type, AWS Config supports only the COMPLIANT , NON_COMPLIANT , and NOT_APPLICABLE values. AWS Config does not support the INSUFFICIENT_DATA value for this data type.

      Similarly, AWS Config does not accept INSUFFICIENT_DATA as the value for ComplianceType from a PutEvaluations request. For example, an AWS Lambda function for a custom Config rule cannot pass an INSUFFICIENT_DATA value to AWS Config.

    • Annotation (string) --

      Supplementary information about how the evaluation determined the compliance.

    • OrderingTimestamp (datetime) -- [REQUIRED]

      The time of the event in AWS Config that triggered the evaluation. For event-based evaluations, the time indicates when AWS Config created the configuration item that triggered the evaluation. For periodic evaluations, the time indicates when AWS Config triggered the evaluation at the frequency that you specified (for example, every 24 hours).

type ResultToken

string

param ResultToken

[REQUIRED]

An encrypted token that associates an evaluation with an AWS Config rule. Identifies the rule and the event that triggered the evaluation

type TestMode

boolean

param TestMode

Use this parameter to specify a test run for PutEvaluations . You can verify whether your AWS Lambda function will deliver evaluation results to AWS Config. No updates occur to your existing evaluations, and evaluation results are not sent to AWS Config.

Note

When TestMode is true , PutEvaluations doesn't require a valid value for the ResultToken parameter, but the value cannot be null.

rtype

dict

returns

Response Syntax

{
    'FailedEvaluations': [
        {
            'ComplianceResourceType': 'string',
            'ComplianceResourceId': 'string',
            'ComplianceType': 'COMPLIANT'|'NON_COMPLIANT'|'NOT_APPLICABLE'|'INSUFFICIENT_DATA',
            'Annotation': 'string',
            'OrderingTimestamp': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    • FailedEvaluations (list) --

      Requests that failed because of a client or server error.

      • (dict) --

        Identifies an AWS resource and indicates whether it complies with the AWS Config rule that it was evaluated against.

        • ComplianceResourceType (string) --

          The type of AWS resource that was evaluated.

        • ComplianceResourceId (string) --

          The ID of the AWS resource that was evaluated.

        • ComplianceType (string) --

          Indicates whether the AWS resource complies with the AWS Config rule that it was evaluated against.

          For the Evaluation data type, AWS Config supports only the COMPLIANT , NON_COMPLIANT , and NOT_APPLICABLE values. AWS Config does not support the INSUFFICIENT_DATA value for this data type.

          Similarly, AWS Config does not accept INSUFFICIENT_DATA as the value for ComplianceType from a PutEvaluations request. For example, an AWS Lambda function for a custom Config rule cannot pass an INSUFFICIENT_DATA value to AWS Config.

        • Annotation (string) --

          Supplementary information about how the evaluation determined the compliance.

        • OrderingTimestamp (datetime) --

          The time of the event in AWS Config that triggered the evaluation. For event-based evaluations, the time indicates when AWS Config created the configuration item that triggered the evaluation. For periodic evaluations, the time indicates when AWS Config triggered the evaluation at the frequency that you specified (for example, every 24 hours).