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?)
for response_config in response_configs:
            
            client.put_integration_response(
                restApiId=api_id,
                resourceId=resource_id,
                httpMethod=method['httpMethod'],
                statusCode=response_config['code'],
                responseTemplates=response_config['res_templates'],
                selectionPattern=response_config['pattern']
            )
            
            client.put_method_response(
                restApiId=api_id,
                resourceId=resource_id,
                httpMethod=method['httpMethod'],
                statusCode=response_config['code']
            )
def apigateway_invocations_arn(lambda_uri):
    return ('arn:aws:apigateway:%s:lambda:path/2015-03-31/functions/%s/invocations' %
        (get_region(), lambda_uri))
def get_elasticsearch_endpoint(domain=None, region_name=None):
    env = get_environment(region_name=region_name)
    if is_local_env(env):
        return os.environ['TEST_ELASTICSEARCH_URL']
    
    es_client = connect_to_service(service_name='es', region_name=env.region)
    info = es_client.describe_elasticsearch_domain(DomainName=domain)
    endpoint = 'https://%s' % info['DomainStatus']['Endpoint']
    return endpoint
def connect_elasticsearch(endpoint=None, domain=None, region_name=None, env=None):