<filename>AWS/s3/s3-list-objects-bucket-filter-pattern.py
import boto3

# List all object in a bucket base on word patterns in if statement.

#bucket name
bucket_name = 'repository-static'

s3 = boto3.resource('s3')
bucket = s3.Bucket(bucket_name)

# Get all objects recursively
for obj in bucket.objects.all():
    
    obj_name = obj.key
    if "providers" in obj_name:
        print(obj_name)
        
    elif "channels" in obj_name:
        print(obj_name)
