awscli_interface#
- ioapps.awscli_interface.exist_awspath(aws_path, resource='s3', profile=None)[source]#
DESCRIPTION:
This function queries the respective Amazon Web Services (AWS) resource bucket and object path to, using the command line interface (CLI), in order to determine whether a file/path exists; a boolean value indicating the status is returned.
- Parameters:
- aws_path: str
A Python string specifying the AWS resource bucket and object path within which to collect the respective contents.
- Returns:
- exist: bool
A Python boolean valued variable specifying whether the AWS path provided upon entry exists.
- Return type:
bool
- ioapps.awscli_interface.list_awspath(aws_path, resource='s3', profile=None)[source]#
DESCRIPTION:
This function provides an interface to the Amazon Web Services (AWS) command line interface (CLI) application to list the specified resource bucket contents.
- Parameters:
- aws_path: str
A Python string specifying the AWS resource bucket and object path within which to collect the respective contents.
- Returns:
- awspath_list: List
A Python list containing the contents of the specified AWS resource bucket and object path.
- Raises:
- AWSCLIInterfaceError:
raised if an exception is encountered while creating the list of files within the specified AWS resource bucket and object path.
- Return type:
List
- ioapps.awscli_interface.put_awsfile(aws_path, path, is_dir=False, is_wildcards=False, aws_exclude=None, aws_include=None, resource='s3', profile=None, errlog=None, outlog=None)[source]#
DESCRIPTION:
This function provides an interface to the Amazon Web Services (AWS) command line interface (CLI) application to stage local files within specified AWS resource bucket and object paths.
- Parameters:
- aws_path: str
A Python string specifying the AWS resource bucket and object path for the staged file.
- path: str
A Python string specifying the path for the local file to be staged within the specified AWS resource bucket and object path (see aws_path above).
- Raises:
- AWSCLIInterfaceError:
raised if the parameter values specified upon entry are non-compliant with the wildcards attribute.
raised if an exception is countered for the AWS CLI application.
- Return type:
None