LambdaValidator

class aws_cdk.aws_appconfig.LambdaValidator

Bases: object

Defines an AWS Lambda validator.

ExampleMetadata:

infused

Example:

# application: appconfig.Application
# fn: lambda.Function


appconfig.HostedConfiguration(self, "MyHostedConfiguration",
    application=application,
    content=appconfig.ConfigurationContent.from_inline_text("This is my configuration content."),
    validators=[
        appconfig.JsonSchemaValidator.from_file("schema.json"),
        appconfig.LambdaValidator.from_function(fn)
    ]
)

Attributes

content

The content of the validator.

type

The type of validator.

Static Methods

classmethod from_function(func)

Defines an AWS Lambda validator from a Lambda function.

This will call addPermission to your function to grant AWS AppConfig permissions.

Parameters:

func (Function) – The function that defines the validator.

Return type:

LambdaValidator