airflow.providers.amazon.aws.operators.base_aws

Classes

AwsBaseOperator

Base AWS (Amazon) Operator Class to build operators on top of AWS Hooks.

Module Contents

class airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator(*, aws_conn_id='aws_default', region_name=None, verify=None, botocore_config=None, region=NOTSET, **kwargs)[source]

Bases: airflow.models.BaseOperator, airflow.providers.amazon.aws.utils.mixins.AwsBaseHookMixin[airflow.providers.amazon.aws.utils.mixins.AwsHookType]

Base AWS (Amazon) Operator Class to build operators on top of AWS Hooks.

Warning

Only for internal usage, this class might be changed, renamed or removed in the future without any further notice.

Examples:
from airflow.providers.amazon.aws.hooks.foo_bar import FooBarThinHook, FooBarThickHook


class AwsFooBarOperator(AwsBaseOperator[FooBarThinHook]):
    aws_hook_class = FooBarThinHook

    def execute(self, context):
        pass


class AwsFooBarOperator2(AwsBaseOperator[FooBarThickHook]):
    aws_hook_class = FooBarThickHook

    def __init__(self, *, spam: str, **kwargs):
        super().__init__(**kwargs)
        self.spam = spam

    @property
    def _hook_parameters(self):
        return {**super()._hook_parameters, "spam": self.spam}

    def execute(self, context):
        pass
Parameters:
template_fields: collections.abc.Sequence[str][source]
aws_conn_id[source]
region_name[source]
verify[source]
botocore_config[source]

Was this entry helpful?