Пример #1
0
def s3_put(opts={}, encrypt=False):
    session = boto3.session.Session(**aws_config())
    s3 = session.client('s3')

    opts.setdefault('GrantRead', 'uri=http://acs.amazonaws.com/groups/global/AllUsers')
    if encrypt:
        opts.setdefault('ServerSideEncryption', 'AES256')
    s3.put_object(**opts)
Пример #2
0
def s3_put(opts={}, encrypt=False):
    session = boto3.session.Session(**aws_config())
    s3 = session.client('s3')

    opts.setdefault('GrantRead',
                    'uri=http://acs.amazonaws.com/groups/global/AllUsers')
    if encrypt:
        opts.setdefault('ServerSideEncryption', 'AES256')
    s3.put_object(**opts)
Пример #3
0
def s3_get(opts={}):
    session = boto3.session.Session(**aws_config())
    s3 = session.client('s3')
    return s3.get_object(**opts)
Пример #4
0
def s3_get(opts={}):
    session = boto3.session.Session(**aws_config())
    s3 = session.client('s3')
    return s3.get_object(**opts)