Repository: localstack/localstack

Issue:
Firehose Update Destination Kwarg Mismatch
## Description
In an attempt to update Destinations for Kinesis Firehose, the update failed due to an internal error. After some inspection it seems to be a simple kwarg mismatch? (see below)

## Related Issues
I am using terraform to deploy resources, and everything deploys fine. But I am experiencing similar issues as @taylorperkins [496](https://github.com/localstack/localstack/issues/496). These failures led me to discovering this bug.

## Problematic LOC
localstack/services/firehose/firehose_api.py:275
```
update_destination(stream_name=stream_name, destination_id=destination_id,
                           es_update=es_update, version_id=version_id)
```

AND 

localstack/services/firehose/firehose_api.py:128
```
def update_destination(stream_name, destination_id,
                       s3_update=None, elasticsearch_update=None, version_id=None):
```
Note that `update_destination` references kwarg `es_update` which doesn't exist (should be `elasticsearch_update`?)

## Stack Trace
```
2020-02-05T17:05:30:ERROR:flask.app: Exception on / [POST]                                                                                                                                    
Traceback (most recent call last):                                                                                                                                                            
  File "/opt/code/localstack/.venv/lib/python3.7/site-packages/flask/app.py", line 2292, in wsgi_app                                                                                          
    response = self.full_dispatch_request()                                                                                                                                                   
  File "/opt/code/localstack/.venv/lib/python3.7/site-packages/flask/app.py", line 1815, in full_dispatch_request                                                                             
    rv = self.handle_user_exception(e)                                                                                                                                                        
  File "/opt/code/localstack/.venv/lib/python3.7/site-packages/flask_cors/extension.py", line 161, in wrapped_function                                                                        
    return cors_after_request(app.make_response(f(*args, **kwargs)))                                                                                                                          
  File "/opt/code/localstack/.venv/lib/python3.7/site-packages/flask/app.py", line 1718, in handle_user_exception                                                                             
    reraise(exc_type, exc_value, tb)                                                                                                                                                          
  File "/opt/code/localstack/.venv/lib/python3.7/site-packages/flask/_compat.py", line 35, in reraise                                                                                         
    raise value                                                                                                                                                                               
  File "/opt/code/localstack/.venv/lib/python3.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/opt/code/localstack/.venv/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/opt/code/localstack/localstack/services/firehose/firehose_api.py", line 276, in post_request
    es_update=es_update, version_id=version_id)
TypeError: update_destination() got an unexpected keyword argument 'es_update'

```


Discussion:

Resolving patch:
diff --git a/localstack/services/cloudformation/cloudformation_starter.py b/localstack/services/cloudformation/cloudformation_starter.py
--- a/localstack/services/cloudformation/cloudformation_starter.py
+++ b/localstack/services/cloudformation/cloudformation_starter.py
@@ -710,6 +710,7 @@ def run_loop(*args):
             #   does not consider resource dependencies (e.g., if a "DependsOn" resource property
             #   is defined). This loop allows us to incrementally resolve such dependencies.
             resource_map = self.resource_map
+            unresolved = {}
             for i in range(MAX_DEPENDENCY_DEPTH):
                 unresolved = getattr(resource_map, '_unresolved_resources', {})
                 if not unresolved:
@@ -725,7 +726,7 @@ def run_loop(*args):
                     break
             set_status('CREATE_FAILED')
             raise Exception('Unable to resolve all CloudFormation resources after traversing ' +
-                'dependency tree (maximum depth %s reached)' % MAX_DEPENDENCY_DEPTH)
+                'dependency tree (maximum depth %s reached): %s' % (MAX_DEPENDENCY_DEPTH, unresolved.keys()))
 
         # NOTE: We're running the loop in the background, as it might take some time to complete
         FuncThread(run_loop).start()
diff --git a/localstack/services/es/es_api.py b/localstack/services/es/es_api.py
--- a/localstack/services/es/es_api.py
+++ b/localstack/services/es/es_api.py
@@ -2,7 +2,6 @@
 import time
 from random import randint
 from flask import Flask, jsonify, request, make_response
-from localstack.utils import persistence
 from localstack.services import generic_proxy
 from localstack.utils.aws import aws_stack
 from localstack.constants import TEST_AWS_ACCOUNT_ID
@@ -172,8 +171,6 @@ def start_elasticsearch_instance():
     apis = [api_name]
     # ensure that all infra components are up and running
     check_infra(apis=apis, additional_checks=[es_starter.check_elasticsearch])
-    # restore persisted data
-    persistence.restore_persisted_data(apis=apis)
     return t1
 
 
diff --git a/localstack/services/firehose/firehose_api.py b/localstack/services/firehose/firehose_api.py
--- a/localstack/services/firehose/firehose_api.py
+++ b/localstack/services/firehose/firehose_api.py
@@ -162,8 +162,7 @@ def create_stream(stream_name, delivery_stream_type='DirectPut', delivery_stream
     }
     DELIVERY_STREAMS[stream_name] = stream
     if elasticsearch_destination:
-        update_destination(stream_name=stream_name,
-                           destination_id=short_uid(),
+        update_destination(stream_name=stream_name, destination_id=short_uid(),
                            elasticsearch_update=elasticsearch_destination)
     if s3_destination:
         update_destination(stream_name=stream_name, destination_id=short_uid(), s3_update=s3_destination)
@@ -273,7 +272,7 @@ def post_request():
                            s3_update=s3_update, version_id=version_id)
         es_update = data['ESDestinationUpdate'] if 'ESDestinationUpdate' in data else None
         update_destination(stream_name=stream_name, destination_id=destination_id,
-                           es_update=es_update, version_id=version_id)
+                           elasticsearch_update=es_update, version_id=version_id)
         response = {}
     elif action == '%s.ListTagsForDeliveryStream' % ACTION_HEADER_PREFIX:
         response = get_delivery_stream_tags(data['DeliveryStreamName'], data.get('ExclusiveStartTagKey'),


Test patch: