loris_log.boto3Client
The boto3 client to establish connection to the AWS cloud.
Boto 3 client to communicate to the AWS Cloudwatch.
Boto 3 client default constructor.
Args:
region_name (string): The AWS service region name.
aws_key (string): The AWS service role access key.
aws_secret (string): The AWS service role secret key.
Raises InvalidAttributeException:
If the region_name, aws_key, aws_secret is not of type
string.
Raises InvalidRegionNameException:
If the region_name is a none or empty.
Raises InvalidRoleAccessKeyException:
If the aws_key is a none or empty.
Raises InvalidRoleSecretException:
If the aws_secret is a none or empty.
Get all the log groups available in the AWS cloudwatch.
Returns:
list: A list of log group names.
Get all the log stream inside a log group.
Args:
log_group_name (string): The name of the log group.
Returns:
list: All the log streams' name available in a log group.
Create the log stream if the current log group is present. Otherwise, create a new log group then create the desire the log stream
Args:
log_group_name (string): the log group name.
log_stream_name (string): the log stream name.
Returns:
bool: whether the operation is a success (True) or otherwise (False).
Raises InvalidAttributeException:
If the log_group_name or log_stream_name is not of type string.
Raises EmptyParameterException:
If the log_group_name or log_stream_name is empty.
Allow the application to push the relevant log message to the cloudwatch.
Args:
log_group_name (string): The name of the log group.
log_stream_name (string): The name of the log stream.
log_message (list): A list of application/ service/ api message.
Returns:
response: A list of aws responses.
Raises InvalidAttributeException:
If the log_group_name, log_stream_name, or log_message
is not of type string.
Raises EmptyParameterException:
If the log_group_name, log_stream_name, or log_message
is empty.