ecs_composex.s3 package

Submodules

ecs_composex.s3.s3_bucket module

class ecs_composex.s3.s3_bucket. Bucket ( name , definition , module , settings ) [source]

Bases: ApiXResource

Class for S3 bucket.

handle_x_dependencies ( settings , root_stack ) [source]
Parameters :
Return type :

None

Returns :

init_outputs ( ) [source]

Placeholder method

lookup_resource ( arn_re , native_lookup_function , cfn_resource_type , tagging_api_id , subattribute_key = None , use_arn_for_id = False ) [source]

Method to self-identify properties :return:

native_attributes_mapping_lookup ( account_id , resource_id , function ) [source]
to_ecs ( settings , modules , root_stack = None , targets_overrides = None ) [source]

Handles mapping the S3 bucket to ECS services

ecs_composex.s3.s3_ecs_cluster module

Functions to allow the S3 Bucket to interpolate x-s3 values for ECS Cluster

ecs_composex.s3.s3_ecs_cluster. handle_ecs_cluster ( settings , bucket ) [source]

Entrypoint function to updating the ECS Cluster properties

Parameters :
Return type :

None

ecs_composex.s3.s3_ecs_cluster. interpolate_s3_bucket_name ( log_config , bucket ) [source]

Replaces the value for x-s3::<bucket_name> for the log configuration with the appropriate parameters

Parameters :
Return type :

None

ecs_composex.s3.s3_ecs_cluster. update_cluster_s3_property ( ecs_cluster , bucket ) [source]
Parameters :
Return type :

None

ecs_composex.s3.s3_kinesis_firehose module

Updates x-kinesis_firehose fields and properties, IAM policies for Firehose::DeliveryStream

ecs_composex.s3.s3_kinesis_firehose. s3_to_firehose ( resource , dest_resource , dest_resource_stack , settings ) [source]

Updates :param Bucket resource: :param DeliveryStream dest_resource: :type dest_resource_stack: :param dest_resource_stack: :type settings: ecs_composex.common.settings.ComposeXSettings :param settings: :rtype: None :return:

ecs_composex.s3.s3_module module

ecs_composex.s3.s3_params module

ecs_composex.s3.s3_stack module

Module to control S3 stack

class ecs_composex.s3.s3_stack. XStack ( title , settings , module , ** kwargs ) [source]

Bases: ComposeXStack

Class to handle S3 buckets

do_validation : bool
properties : Dict[str, Any]
propnames : Set[str]
resource : Dict[str, Any]
template : Optional[Template]
title : Optional[str]
ecs_composex.s3.s3_stack. define_bucket_mappings ( lookup_buckets , settings , module ) [source]

Method to define CFN Mappings for the lookup buckets

Parameters :
ecs_composex.s3.s3_stack. get_bucket_config ( bucket , resource_id ) [source]
Parameters :
Return type :

dict

ecs_composex.s3.s3_template module

ecs_composex.s3.s3_template. create_s3_template ( new_buckets , template ) [source]

Function to create the root S3 template.

ecs_composex.s3.s3_template. define_bucket_name ( bucket ) [source]

Function to automatically add Region and Account ID to the bucket name. If set, will use a user-defined separator, else, -

Parameters :

bucket ( Bucket ) –

Returns :

The bucket name

Return type :

str

ecs_composex.s3.s3_template. evaluate_parameters ( bucket , bucket_template ) [source]

Review bucket parameters to configure the bucket and extra properties.

ecs_composex.s3.s3_template. generate_bucket ( bucket ) [source]

Function to generate the S3 bucket object

Parameters :

bucket ( ecs_composex.s3.s3_bucket.Bucket ) –

Return type :

None

ecs_composex.s3.s3_template. handle_predefined_policies ( bucket , param_key , managed_policies_key , statement ) [source]

Function to configure and add statements for bucket policy based on predefined Bucket Policies

Parameters :
Return type :

None

ecs_composex.s3.s3_template. handle_user_defined_policies ( bucket , param_key , user_policies_key , statement ) [source]

Function to add user defined policies

Parameters :
ecs_composex.s3.s3_template. implement_bucket_policy ( bucket , param_key , bucket_template ) [source]

Function to parse the input parameter for the Bucket Policy, and generate the policy accordingly

Module contents