def get_bucket_key(uri):
    """Return bucket name and key from given S3 URI"""
    if uri.startswith('s3://'):
        uri = uri[5:]
    components = uri.split('/')
    bucket = components[0]
    key = ''
    if len(components) > 1:
        key = '/'.join(components[1:])
    return bucket, key
