In [this PR](https://github.com/localstack/localstack/pull/1200/files) we introduced a new way of starting S3 in a separate process.

In the meantime, the service startup has been significantly reworked, and it seems that we can integrate the S3 starter into the [`multiserver.py`](https://github.com/localstack/localstack/blob/master/localstack/utils/server/multiserver.py) based loading approach that loads multiple APIs in a single process, for performance reasons. We should look into that.
""" Some resources require minor fixes in their CF resource definition
            before we can pass them on to deployment. """
        props = resource_json['Properties'] = resource_json.get('Properties') or {}
        if isinstance(resource, sfn_models.StateMachine) and not props.get('StateMachineName'):
            props['StateMachineName'] = resource.name
    def update_resource_id(resource, new_id, props, region_name):
        """ Update and fix the ID(s) of the given resource. """
        
        
        
        
        
        
        
        
        
        
        backend = apigw_models.apigateway_backends[region_name]
        if isinstance(resource, apigw_models.RestAPI):
            backend.apis.pop(resource.id, None)
            backend.apis[new_id] = resource
            
            
            client = aws_stack.connect_to_service('apigateway')