Normally S3 objects in localstack can be accessed via `http://localhost:4572/bucket/key`.

However, if the object is 7 MBs or larger, attempting to access it via this URL will result in a 403 error. Objects any smaller are retrieved as expected.

(Possibly related: Lambda response size is limited to 6MB. Perhaps that is being used by accident?)
port = port or config.PORT_S3
    backend_port = DEFAULT_PORT_S3_BACKEND
    cmd = '%s "%s" s3 -p %s -H 0.0.0.0' % (sys.executable, __file__, backend_port)
    print('Starting mock S3 (%s port %s)...' % (get_service_protocol(), port))
    start_proxy_for_service('s3', port, backend_port, update_listener)
    env_vars = {'PYTHONPATH': ':'.join(sys.path)}
    return do_run(cmd, asynchronous, env_vars=env_vars)
def apply_patches():
    s3_models.DEFAULT_KEY_BUFFER_SIZE = S3_MAX_FILE_SIZE_MB * 1024 * 1024
    def init(self, name, value, storage='STANDARD', etag=None,
            is_versioned=False, version_id=0, max_buffer_size=None, *args, **kwargs):
        return original_init(self, name, value, storage=storage, etag=etag, is_versioned=is_versioned,
            version_id=version_id, max_buffer_size=s3_models.DEFAULT_KEY_BUFFER_SIZE, *args, **kwargs)
    original_init = s3_models.FakeKey.__init__
    s3_models.FakeKey.__init__ = init
def main():
    setup_logging()
    
    apply_patches()
    
    sys.exit(moto_main())
if __name__ == '__main__':
    main()