def writeToS3Bucket()

in container-code/src/rdslogsshipper.py [0:0]


def writeToS3Bucket(region, s3Client, bucketName, fileNameKey, data):
    print ("Will write logfile data to S3 bucket {}".format(bucketName))

    try:
        s3Client.put_object(Bucket=bucketName, Key=fileNameKey, Body=str(data))
    except ClientError as FileWriteError:
        print ("Error writing logdata to the bucket " + FileWriteError['Error']['Message'])