diff --git a/moto/ec2_instance_connect/models.py b/moto/ec2_instance_connect/models.py index cc8cc3f3..f3dbbe9f 100644 --- a/moto/ec2_instance_connect/models.py +++ b/moto/ec2_instance_connect/models.py @@ -1,4 +1,4 @@ -import boto +import boto.ec2 from moto.core import BaseBackend diff --git a/moto/rds2/models.py b/moto/rds2/models.py index 722d7d4f..7fa4f331 100644 --- a/moto/rds2/models.py +++ b/moto/rds2/models.py @@ -8,7 +8,6 @@ from collections import defaultdict from boto3 import Session from jinja2 import Template from re import compile as re_compile -from moto.cloudformation.exceptions import UnformattedGetAttTemplateException from moto.compat import OrderedDict from moto.core import BaseBackend, BaseModel from moto.core.utils import get_random_hex @@ -308,6 +307,9 @@ class Database(BaseModel): setattr(self, key, value) def get_cfn_attribute(self, attribute_name): + # Local import to avoid circular dependency with cloudformation.parsing + from moto.cloudformation.exceptions import UnformattedGetAttTemplateException + if attribute_name == "Endpoint.Address": return self.address elif attribute_name == "Endpoint.Port":