### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

Creation is failing with the following error:

```
2023-07-19T16:07:09.048 DEBUG --- [ncthread1573] l.s.c.e.template_deployer  : Dependencies for "webapiservicelocalServiceE1D64CEE" not yet satisfied, retrying in next loop: Unable to resolve attribute ref AWS::URLSuffix
2023-07-19T16:07:09.048 DEBUG --- [ncthread1573] l.s.c.e.template_deployer  : Error applying changes for CloudFormation stack "web-api-service-local": Resource deployment loop completed, pending resource changes: [{'Type': 'Resource', 'ResourceChange': {'Action': 'Modify', 'LogicalResourceId': 'webapiservicedefinitionlocal14C74776', 'PhysicalResourceId': None, 'ResourceType': 'AWS::ECS::TaskDefinition', 'Scope': [], 'Details': [], 'Replacement': 'False'}}, {'Type': 'Resource', 'ResourceChange': {'Action': 'Modify', 'LogicalResourceId': 'webapiservicelocalServiceE1D64CEE', 'PhysicalResourceId': None, 'ResourceType': 'AWS::ECS::Service', 'Scope': [], 'Details': [], 'Replacement': 'False'}}] Traceback (most recent call last):
  File "/opt/code/localstack/.venv/lib/python3.10/site-packages/localstack/services/cloudformation/engine/template_deployer.py", line 1265, in _run
    self.do_apply_changes_in_loop(changes, stack)
  File "/opt/code/localstack/.venv/lib/python3.10/site-packages/localstack/services/cloudformation/engine/template_deployer.py", line 1373, in do_apply_changes_in_loop
    raise Exception(
Exception: Resource deployment loop completed, pending resource changes: [{'Type': 'Resource', 'ResourceChange': {'Action': 'Modify', 'LogicalResourceId': 'webapiservicedefinitionlocal14C74776', 'PhysicalResourceId': None, 'ResourceType': 'AWS::ECS::TaskDefinition', 'Scope': [], 'Details': [], 'Replacement': 'False'}}, {'Type': 'Resource', 'ResourceChange': {'Action': 'Modify', 'LogicalResourceId': 'webapiservicelocalServiceE1D64CEE', 'PhysicalResourceId': None, 'ResourceType': 'AWS::ECS::Service', 'Scope': [], 'Details': [], 'Replacement': 'False'}}]
```

### Expected Behavior

It should create the stack

### How are you starting LocalStack?

With the `localstack` script

### Steps To Reproduce

#### How are you starting localstack (e.g., `bin/localstack` command, arguments, or `docker-compose.yml`)

    localstack start -d

#### Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)

    cdklocal deploy "web-api-service-local" --require-approval never


### Environment

```markdown
- OS: macOS Ventura 13.4.1 
- LocalStack: 2.1.1.dev
```


### Anything else?

<img width="918" alt="image" src="https://github.com/localstack/localstack/assets/8528636/237cf6a3-40bc-4185-b1b1-125875d760f1">


Full debug:
```
2023-07-19T17:47:09.112 DEBUG --- [uncthread416] l.s.c.resource_provider    : Running action "Add" for resource type "AWS::EC2::SecurityGroup" id "webapiservicesglocal8D976441"
2023-07-19T17:47:09.112 DEBUG --- [uncthread416] l.s.c.resource_provider    : Request for resource type "AWS::EC2::SecurityGroup" in region us-east-2: create_security_group {'GroupName': 'web-api-service-sg-local', 'VpcId': 'vpc-e53097e6', 'Description': 'web-api service security group'}
2023-07-19T17:47:09.114 DEBUG --- [   asgi_gw_1] l.aws.serving.wsgi         : POST localhost:4566/
2023-07-19T17:47:09.117 DEBUG --- [   asgi_gw_1] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-www-form-urlencoded; charset=utf-8) as preferred response Content-Type.
2023-07-19T17:47:09.117  INFO --- [   asgi_gw_1] l.request.internal.aws     : AWS ec2.CreateSecurityGroup => 200
2023-07-19T17:47:09.118 DEBUG --- [uncthread416] l.s.c.resource_provider    : Executing callback method for AWS::EC2::SecurityGroup:webapiservicesglocal8D976441
2023-07-19T17:47:09.120 DEBUG --- [   asgi_gw_2] l.aws.serving.wsgi         : POST localhost:4566/
2023-07-19T17:47:09.132 DEBUG --- [   asgi_gw_2] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-www-form-urlencoded; charset=utf-8) as preferred response Content-Type.
2023-07-19T17:47:09.132  INFO --- [   asgi_gw_2] l.request.internal.aws     : AWS ec2.DescribeSecurityGroups => 200
2023-07-19T17:47:09.146 DEBUG --- [uncthread416] l.s.c.e.template_deployer  : Handling "Add" for resource "webapiservicetaskrolelocal9C66C398" (1/11) type "AWS::IAM::Role" in loop iteration 1 (should_deploy=True)
2023-07-19T17:47:09.146 DEBUG --- [uncthread416] l.s.c.resource_provider    : Running action "Add" for resource type "AWS::IAM::Role" id "webapiservicetaskrolelocal9C66C398"
2023-07-19T17:47:09.146 DEBUG --- [uncthread416] l.s.c.resource_provider    : Request for resource type "AWS::IAM::Role" in region us-east-2: create_role {'AssumeRolePolicyDocument': '{"Statement": [{"Action": "sts:AssumeRole", "Effect": "Allow", "Principal": {"Service": "ecs-tasks.amazonaws.com"}}], "Version": "2012-10-17"}', 'Description': 'web-api task role', 'RoleName': 'web-api-service-task-role-local'}
2023-07-19T17:47:09.148 DEBUG --- [   asgi_gw_3] l.aws.serving.wsgi         : POST localhost:4566/
2023-07-19T17:47:09.151 DEBUG --- [   asgi_gw_3] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-www-form-urlencoded; charset=utf-8) as preferred response Content-Type.
2023-07-19T17:47:09.151  INFO --- [   asgi_gw_3] l.request.internal.aws     : AWS iam.CreateRole => 200
2023-07-19T17:47:09.152 DEBUG --- [uncthread416] l.s.c.resource_provider    : Executing callback method for AWS::IAM::Role:webapiservicetaskrolelocal9C66C398
2023-07-19T17:47:09.154 DEBUG --- [   asgi_gw_0] l.aws.serving.wsgi         : POST localhost:4566/
2023-07-19T17:47:09.157 DEBUG --- [   asgi_gw_0] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-www-form-urlencoded; charset=utf-8) as preferred response Content-Type.
2023-07-19T17:47:09.158  INFO --- [   asgi_gw_0] l.request.internal.aws     : AWS iam.GetRole => 200
2023-07-19T17:47:09.172 DEBUG --- [uncthread416] l.s.c.e.template_deployer  : Handling "Add" for resource "webapiserviceexecutionrolelocal0990C0B7" (1/10) type "AWS::IAM::Role" in loop iteration 1 (should_deploy=True)
2023-07-19T17:47:09.172 DEBUG --- [uncthread416] l.s.c.resource_provider    : Running action "Add" for resource type "AWS::IAM::Role" id "webapiserviceexecutionrolelocal0990C0B7"
2023-07-19T17:47:09.172 DEBUG --- [uncthread416] l.s.c.resource_provider    : Request for resource type "AWS::IAM::Role" in region us-east-2: create_role {'AssumeRolePolicyDocument': '{"Statement": [{"Action": "sts:AssumeRole", "Effect": "Allow", "Principal": {"Service": "ecs-tasks.amazonaws.com"}}], "Version": "2012-10-17"}', 'Description': 'web-api task execution role', 'RoleName': 'web-api-service-execution-role-local'}
2023-07-19T17:47:09.174 DEBUG --- [   asgi_gw_1] l.aws.serving.wsgi         : POST localhost:4566/
2023-07-19T17:47:09.178 DEBUG --- [   asgi_gw_1] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-www-form-urlencoded; charset=utf-8) as preferred response Content-Type.
2023-07-19T17:47:09.178  INFO --- [   asgi_gw_1] l.request.internal.aws     : AWS iam.CreateRole => 200
2023-07-19T17:47:09.180 DEBUG --- [uncthread416] l.s.c.resource_provider    : Executing callback method for AWS::IAM::Role:webapiserviceexecutionrolelocal0990C0B7
2023-07-19T17:47:09.181 DEBUG --- [   asgi_gw_2] l.aws.serving.wsgi         : POST localhost:4566/
2023-07-19T17:47:09.184 DEBUG --- [   asgi_gw_2] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-www-form-urlencoded; charset=utf-8) as preferred response Content-Type.
2023-07-19T17:47:09.185  INFO --- [   asgi_gw_2] l.request.internal.aws     : AWS iam.GetRole => 200
2023-07-19T17:47:09.227 DEBUG --- [uncthread416] l.s.c.e.template_deployer  : Dependencies for "webapiserviceexecutionrolelocalDefaultPolicy32C4E3A4" not yet satisfied, retrying in next loop: Unresolved dependencies: webapiservicedefinitionlocallogrouterlocalLogGroupB9AFBB1D
2023-07-19T17:47:09.295 DEBUG --- [uncthread416] l.s.c.e.template_deployer  : Dependencies for "webapiservicedefinitionlocal14C74776" not yet satisfied, retrying in next loop: Unable to resolve attribute ref AWS::URLSuffix
2023-07-19T17:47:09.301 DEBUG --- [uncthread416] l.s.c.e.template_deployer  : Handling "Add" for resource "webapiservicedefinitionlocallogrouterlocalLogGroupB9AFBB1D" (3/9) type "AWS::Logs::LogGroup" in loop iteration 1 (should_deploy=True)
2023-07-19T17:47:09.301 DEBUG --- [uncthread416] l.s.c.resource_provider    : Running action "Add" for resource type "AWS::Logs::LogGroup" id "webapiservicedefinitionlocallogrouterlocalLogGroupB9AFBB1D"
2023-07-19T17:47:09.301 DEBUG --- [uncthread416] l.s.c.resource_provider    : Request for resource type "AWS::Logs::LogGroup" in region us-east-2: create_log_group {'logGroupName': 'web-api-service-local-webapiservicedefinitionl-d5314ae7'}
2023-07-19T17:47:09.303 DEBUG --- [   asgi_gw_3] l.aws.serving.wsgi         : POST localhost:4566/
2023-07-19T17:47:09.305 DEBUG --- [   asgi_gw_3] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-amz-json-1.1) as preferred response Content-Type.
2023-07-19T17:47:09.305  INFO --- [   asgi_gw_3] l.request.internal.aws     : AWS logs.CreateLogGroup => 200
2023-07-19T17:47:09.306 DEBUG --- [uncthread416] l.s.c.resource_provider    : Executing callback method for AWS::Logs::LogGroup:webapiservicedefinitionlocallogrouterlocalLogGroupB9AFBB1D
2023-07-19T17:47:09.308 DEBUG --- [   asgi_gw_0] l.aws.serving.wsgi         : POST localhost:4566/
2023-07-19T17:47:09.309 DEBUG --- [   asgi_gw_0] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-amz-json-1.1) as preferred response Content-Type.
2023-07-19T17:47:09.309  INFO --- [   asgi_gw_0] l.request.internal.aws     : AWS logs.DescribeLogGroups => 200
2023-07-19T17:47:09.315 DEBUG --- [uncthread416] l.s.c.e.template_deployer  : Handling "Add" for resource "webapiservicedefinitionlocaldatadogagentlocalLogGroup9254022F" (3/8) type "AWS::Logs::LogGroup" in loop iteration 1 (should_deploy=True)
2023-07-19T17:47:09.316 DEBUG --- [uncthread416] l.s.c.resource_provider    : Running action "Add" for resource type "AWS::Logs::LogGroup" id "webapiservicedefinitionlocaldatadogagentlocalLogGroup9254022F"
2023-07-19T17:47:09.316 DEBUG --- [uncthread416] l.s.c.resource_provider    : Request for resource type "AWS::Logs::LogGroup" in region us-east-2: create_log_group {'logGroupName': 'web-api-service-local-webapiservicedefinitionl-80306def'}
2023-07-19T17:47:09.317 DEBUG --- [   asgi_gw_1] l.aws.serving.wsgi         : POST localhost:4566/
2023-07-19T17:47:09.318 DEBUG --- [   asgi_gw_1] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-amz-json-1.1) as preferred response Content-Type.
2023-07-19T17:47:09.319  INFO --- [   asgi_gw_1] l.request.internal.aws     : AWS logs.CreateLogGroup => 200
2023-07-19T17:47:09.320 DEBUG --- [uncthread416] l.s.c.resource_provider    : Executing callback method for AWS::Logs::LogGroup:webapiservicedefinitionlocaldatadogagentlocalLogGroup9254022F
2023-07-19T17:47:09.321 DEBUG --- [   asgi_gw_2] l.aws.serving.wsgi         : POST localhost:4566/
2023-07-19T17:47:09.322 DEBUG --- [   asgi_gw_2] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-amz-json-1.1) as preferred response Content-Type.
2023-07-19T17:47:09.322  INFO --- [   asgi_gw_2] l.request.internal.aws     : AWS logs.DescribeLogGroups => 200
2023-07-19T17:47:09.335 DEBUG --- [uncthread416] l.s.c.e.template_deployer  : Handling "Add" for resource "webapialbsglocal889691B7" (3/7) type "AWS::EC2::SecurityGroup" in loop iteration 1 (should_deploy=True)
2023-07-19T17:47:09.335 DEBUG --- [uncthread416] l.s.c.resource_provider    : Running action "Add" for resource type "AWS::EC2::SecurityGroup" id "webapialbsglocal889691B7"
2023-07-19T17:47:09.335 DEBUG --- [uncthread416] l.s.c.resource_provider    : Request for resource type "AWS::EC2::SecurityGroup" in region us-east-2: create_security_group {'GroupName': 'web-api-alb-sg-local', 'VpcId': 'vpc-e53097e6', 'Description': 'web-api alb security group'}
2023-07-19T17:47:09.337 DEBUG --- [   asgi_gw_3] l.aws.serving.wsgi         : POST localhost:4566/
2023-07-19T17:47:09.339 DEBUG --- [   asgi_gw_3] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-www-form-urlencoded; charset=utf-8) as preferred response Content-Type.
2023-07-19T17:47:09.340  INFO --- [   asgi_gw_3] l.request.internal.aws     : AWS ec2.CreateSecurityGroup => 200
2023-07-19T17:47:09.341 DEBUG --- [uncthread416] l.s.c.resource_provider    : Executing callback method for AWS::EC2::SecurityGroup:webapialbsglocal889691B7
2023-07-19T17:47:09.343 DEBUG --- [   asgi_gw_0] l.aws.serving.wsgi         : POST localhost:4566/
2023-07-19T17:47:09.345 DEBUG --- [   asgi_gw_0] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-www-form-urlencoded; charset=utf-8) as preferred response Content-Type.
2023-07-19T17:47:09.345  INFO --- [   asgi_gw_0] l.request.internal.aws     : AWS ec2.DescribeSecurityGroups => 200
2023-07-19T17:47:09.365 DEBUG --- [uncthread416] l.s.c.e.template_deployer  : Handling "Add" for resource "webapialblocal21F5B8E9" (3/6) type "AWS::ElasticLoadBalancingV2::LoadBalancer" in loop iteration 1 (should_deploy=True)
2023-07-19T17:47:09.367 DEBUG --- [   asgi_gw_1] l.aws.serving.wsgi         : POST localhost:4566/
2023-07-19T17:47:09.369 DEBUG --- [   asgi_gw_1] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-www-form-urlencoded; charset=utf-8) as preferred response Content-Type.
2023-07-19T17:47:09.370  INFO --- [   asgi_gw_1] l.request.internal.aws     : AWS ec2.DescribeSecurityGroups => 200
2023-07-19T17:47:09.373 DEBUG --- [uncthread416] l.s.c.resource_provider    : Running action "Add" for resource type "AWS::ElasticLoadBalancingV2::LoadBalancer" id "webapialblocal21F5B8E9"
2023-07-19T17:47:09.377 DEBUG --- [uncthread416] l.s.c.resource_provider    : Request for resource type "AWS::ElasticLoadBalancingV2::LoadBalancer" in region us-east-2: create_load_balancer {'IpAddressType': 'ipv4', 'Name': 'web-api-alb-local', 'Scheme': 'internal', 'SecurityGroups': ['sg-fba3caa9bdd0e9961'], 'Subnets': ['subnet-f82d4b94', 'subnet-bb3c12db', 'subnet-73415794'], 'Type': 'application'}
2023-07-19T17:47:09.380 DEBUG --- [   asgi_gw_2] l.aws.serving.wsgi         : POST localhost:4566/
2023-07-19T17:47:09.429 DEBUG --- [   asgi_gw_2] l.services.plugins         : checking service health elbv2:4566
2023-07-19T17:47:09.473 DEBUG --- [   asgi_gw_2] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-www-form-urlencoded; charset=utf-8) as preferred response Content-Type.
2023-07-19T17:47:09.474  INFO --- [   asgi_gw_2] l.request.internal.aws     : AWS elbv2.CreateLoadBalancer => 200
2023-07-19T17:47:09.476 DEBUG --- [uncthread416] l.s.c.resource_provider    : Executing callback method for AWS::ElasticLoadBalancingV2::LoadBalancer:webapialblocal21F5B8E9
2023-07-19T17:47:09.478 DEBUG --- [   asgi_gw_3] l.aws.serving.wsgi         : POST localhost:4566/
2023-07-19T17:47:09.485 DEBUG --- [   asgi_gw_3] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-www-form-urlencoded; charset=utf-8) as preferred response Content-Type.
2023-07-19T17:47:09.485  INFO --- [   asgi_gw_3] l.request.internal.aws     : AWS elbv2.DescribeLoadBalancers => 200
2023-07-19T17:47:09.487 DEBUG --- [uncthread416] l.s.c.resource_provider    : Request for resource type "AWS::ElasticLoadBalancingV2::LoadBalancer" in region us-east-2: modify_load_balancer_attributes {'LoadBalancerArn': 'arn:aws:elasticloadbalancing:us-east-2:000000000000:loadbalancer/app/web-api-alb-local/8c0d0004', 'Attributes': [{'Key': 'deletion_protection.enabled', 'Value': 'false'}]}
2023-07-19T17:47:09.489 DEBUG --- [   asgi_gw_0] l.aws.serving.wsgi         : POST localhost:4566/
2023-07-19T17:47:09.492 DEBUG --- [   asgi_gw_0] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-www-form-urlencoded; charset=utf-8) as preferred response Content-Type.
2023-07-19T17:47:09.492  INFO --- [   asgi_gw_0] l.request.internal.aws     : AWS elbv2.ModifyLoadBalancerAttributes => 200
2023-07-19T17:47:09.495 DEBUG --- [   asgi_gw_1] l.aws.serving.wsgi         : POST localhost:4566/
2023-07-19T17:47:09.496 DEBUG --- [   asgi_gw_1] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-www-form-urlencoded; charset=utf-8) as preferred response Content-Type.
2023-07-19T17:47:09.497  INFO --- [   asgi_gw_1] l.request.internal.aws     : AWS elbv2.DescribeLoadBalancers => 200
2023-07-19T17:47:09.520 DEBUG --- [uncthread416] l.s.c.e.template_deployer  : Dependencies for "webapiservicelocalServiceE1D64CEE" not yet satisfied, retrying in next loop: Unresolved dependencies: webapiservicelocalSecurityGroupA3650945
2023-07-19T17:47:09.532 DEBUG --- [uncthread416] l.s.c.e.template_deployer  : Handling "Add" for resource "webapiservicelocalSecurityGroupA3650945" (4/5) type "AWS::EC2::SecurityGroup" in loop iteration 1 (should_deploy=True)
2023-07-19T17:47:09.534 DEBUG --- [   asgi_gw_2] l.aws.serving.wsgi         : POST localhost:4566/
2023-07-19T17:47:09.538 DEBUG --- [   asgi_gw_2] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-www-form-urlencoded; charset=utf-8) as preferred response Content-Type.
2023-07-19T17:47:09.538  INFO --- [   asgi_gw_2] l.request.internal.aws     : AWS iam.GetRole => 200
2023-07-19T17:47:09.540 DEBUG --- [uncthread416] l.s.c.resource_provider    : Running action "Add" for resource type "AWS::EC2::SecurityGroup" id "webapiservicelocalSecurityGroupA3650945"
2023-07-19T17:47:09.540 DEBUG --- [uncthread416] l.s.c.resource_provider    : Request for resource type "AWS::EC2::SecurityGroup" in region us-east-2: create_security_group {'GroupName': 'web-api-service-local-webapiservicelocalSecuri-0fe10fc5', 'VpcId': 'vpc-e53097e6', 'Description': 'web-api-service-local/web-api-service-local/SecurityGroup'}
2023-07-19T17:47:09.542 DEBUG --- [   asgi_gw_3] l.aws.serving.wsgi         : POST localhost:4566/
2023-07-19T17:47:09.544 DEBUG --- [   asgi_gw_3] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-www-form-urlencoded; charset=utf-8) as preferred response Content-Type.
2023-07-19T17:47:09.544  INFO --- [   asgi_gw_3] l.request.internal.aws     : AWS ec2.CreateSecurityGroup => 200
2023-07-19T17:47:09.545 DEBUG --- [uncthread416] l.s.c.resource_provider    : Executing callback method for AWS::EC2::SecurityGroup:webapiservicelocalSecurityGroupA3650945
2023-07-19T17:47:09.547 DEBUG --- [   asgi_gw_0] l.aws.serving.wsgi         : POST localhost:4566/
2023-07-19T17:47:09.549 DEBUG --- [   asgi_gw_0] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-www-form-urlencoded; charset=utf-8) as preferred response Content-Type.
2023-07-19T17:47:09.549  INFO --- [   asgi_gw_0] l.request.internal.aws     : AWS ec2.DescribeSecurityGroups => 200
2023-07-19T17:47:09.555  WARN --- [uncthread416] l.s.c.e.template_deployer  : Unable to deploy resource type "AWS::CDK::Metadata": {"Type": "AWS::CDK::Metadata", "Metadata": {"aws:cdk:path": "web-api-service-local/CDKMetadata/Default"}, "LogicalResourceId": "CDKMetadata", "Properties": {"Analytics": "v2:deflate64:H4sIAAAAAAAA/11Qy27CQAz8Fu7LtqJSH0cooqqUAwq9I7OY1M1mHa03tFGUf6+TlL5OO57Z8dhe2Ps7ez2Dd5m7Yzn3dLDdLoErjVL7Dl3cgwgmsWt2JcbnCgpcDoxRzeZYs1Di2K5AUKmF2tE1kVL7FLmpzeMp/CF6Q1DZLmePgza+W/bk2qGcUK+NxHYbiAUkfAEp13iiQIk4DL/+MxwSUMD4i9tQRI9BMi5ybhJGk1FoPrYQoUItxXx132E8k8NpzhH2xnOh8Wr9XuGCdTIPksh5huMBPARHoTjr1su61tFhCM9UW42axo7mn7rvzXg9vXGhTpOjcBOn/AvuzbZNrxyubuyDvZ29CdE8NiFRhTaf3k9t+hbptwEAAA=="}}
2023-07-19T17:47:09.555 DEBUG --- [uncthread416] l.s.c.e.template_deployer  : Handling "Add" for resource "CDKMetadata" (4/4) type "AWS::CDK::Metadata" in loop iteration 1 (should_deploy=False)
2023-07-19T17:47:09.568 DEBUG --- [   asgi_gw_1] l.aws.serving.wsgi         : GET localhost:4566/_localstack/health
2023-07-19T17:47:09.660 DEBUG --- [uncthread416] l.s.c.e.template_deployer  : Handling "Add" for resource "webapiserviceexecutionrolelocalDefaultPolicy32C4E3A4" (1/3) type "AWS::IAM::Policy" in loop iteration 2 (should_deploy=True)
2023-07-19T17:47:09.662 DEBUG --- [   asgi_gw_2] l.aws.serving.wsgi         : POST localhost:4566/
2023-07-19T17:47:09.663 DEBUG --- [   asgi_gw_2] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-amz-json-1.1) as preferred response Content-Type.
2023-07-19T17:47:09.663  INFO --- [   asgi_gw_2] l.request.internal.aws     : AWS logs.DescribeLogGroups => 200
2023-07-19T17:47:09.665 DEBUG --- [   asgi_gw_3] l.aws.serving.wsgi         : POST localhost:4566/
2023-07-19T17:47:09.668 DEBUG --- [   asgi_gw_3] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-www-form-urlencoded; charset=utf-8) as preferred response Content-Type.
2023-07-19T17:47:09.669  INFO --- [   asgi_gw_3] l.request.internal.aws     : AWS iam.GetRole => 200
2023-07-19T17:47:09.672 DEBUG --- [   asgi_gw_0] l.aws.serving.wsgi         : POST localhost:4566/
2023-07-19T17:47:09.672 DEBUG --- [   asgi_gw_0] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-amz-json-1.1) as preferred response Content-Type.
2023-07-19T17:47:09.672  INFO --- [   asgi_gw_0] l.request.internal.aws     : AWS logs.DescribeLogGroups => 200
2023-07-19T17:47:09.674 DEBUG --- [uncthread416] l.s.c.resource_provider    : Running action "Add" for resource type "AWS::IAM::Policy" id "webapiserviceexecutionrolelocalDefaultPolicy32C4E3A4"
2023-07-19T17:47:09.675 DEBUG --- [   asgi_gw_1] l.aws.serving.wsgi         : POST localhost:4566/
2023-07-19T17:47:09.676 DEBUG --- [   asgi_gw_1] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-www-form-urlencoded; charset=utf-8) as preferred response Content-Type.
2023-07-19T17:47:09.676  INFO --- [   asgi_gw_1] l.request.internal.aws     : AWS iam.PutRolePolicy => 200
2023-07-19T17:47:09.677 DEBUG --- [uncthread416] l.s.c.resource_provider    : Executing callback method for AWS::IAM::Policy:webapiserviceexecutionrolelocalDefaultPolicy32C4E3A4
2023-07-19T17:47:09.679 DEBUG --- [   asgi_gw_2] l.aws.serving.wsgi         : POST localhost:4566/
2023-07-19T17:47:09.680 DEBUG --- [   asgi_gw_2] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-www-form-urlencoded; charset=utf-8) as preferred response Content-Type.
2023-07-19T17:47:09.680  INFO --- [   asgi_gw_2] l.request.internal.aws     : AWS iam.GetRolePolicy => 200
2023-07-19T17:47:09.746 DEBUG --- [uncthread416] l.s.c.e.template_deployer  : Dependencies for "webapiservicedefinitionlocal14C74776" not yet satisfied, retrying in next loop: Unable to resolve attribute ref AWS::URLSuffix
2023-07-19T17:47:09.877 DEBUG --- [uncthread416] l.s.c.e.template_deployer  : Dependencies for "webapiservicelocalServiceE1D64CEE" not yet satisfied, retrying in next loop: Unable to resolve attribute ref AWS::URLSuffix
2023-07-19T17:47:09.941 DEBUG --- [uncthread416] l.s.c.e.template_deployer  : Dependencies for "webapiservicedefinitionlocal14C74776" not yet satisfied, retrying in next loop: Unable to resolve attribute ref AWS::URLSuffix
2023-07-19T17:47:10.059 DEBUG --- [uncthread416] l.s.c.e.template_deployer  : Dependencies for "webapiservicelocalServiceE1D64CEE" not yet satisfied, retrying in next loop: Unable to resolve attribute ref AWS::URLSuffix
2023-07-19T17:47:10.060 DEBUG --- [uncthread416] l.s.c.e.template_deployer  : Error applying changes for CloudFormation stack "web-api-service-local": Resource deployment loop completed, pending resource changes: [{'Type': 'Resource', 'ResourceChange': {'Action': 'Add', 'LogicalResourceId': 'webapiservicedefinitionlocal14C74776', 'PhysicalResourceId': None, 'ResourceType': 'AWS::ECS::TaskDefinition', 'Scope': [], 'Details': []}}, {'Type': 'Resource', 'ResourceChange': {'Action': 'Add', 'LogicalResourceId': 'webapiservicelocalServiceE1D64CEE', 'PhysicalResourceId': None, 'ResourceType': 'AWS::ECS::Service', 'Scope': [], 'Details': []}}] Traceback (most recent call last):
  File "/opt/code/localstack/.venv/lib/python3.10/site-packages/localstack/services/cloudformation/engine/template_deployer.py", line 1265, in _run
    self.do_apply_changes_in_loop(changes, stack)
  File "/opt/code/localstack/.venv/lib/python3.10/site-packages/localstack/services/cloudformation/engine/template_deployer.py", line 1373, in do_apply_changes_in_loop
    raise Exception(
Exception: Resource deployment loop completed, pending resource changes: [{'Type': 'Resource', 'ResourceChange': {'Action': 'Add', 'LogicalResourceId': 'webapiservicedefinitionlocal14C74776', 'PhysicalResourceId': None, 'ResourceType': 'AWS::ECS::TaskDefinition', 'Scope': [], 'Details': []}}, {'Type': 'Resource', 'ResourceChange': {'Action': 'Add', 'LogicalResourceId': 'webapiservicelocalServiceE1D64CEE', 'PhysicalResourceId': None, 'ResourceType': 'AWS::ECS::Service', 'Scope': [], 'Details': []}}]

2023-07-19T17:47:11.112 DEBUG --- [   asgi_gw_3] l.aws.serving.wsgi         : POST localhost:4566/
2023-07-19T17:47:11.117 DEBUG --- [   asgi_gw_3] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-www-form-urlencoded; charset=utf-8) as preferred response Content-Type.
2023-07-19T17:47:11.122  INFO --- [   asgi_gw_3] localstack.request.aws     : AWS cloudformation.DescribeStackEvents => 200; DescribeStackEventsInput({'StackName': 'web-api-service-local'}, headers={'User-Agent': 'aws-sdk-nodejs/2.1379.0 darwin/v20.4.0 aws-cdk/2.84.0 promise', 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8', 'X-Amz-Content-Sha256': '1c388b1451a93614d904672cdc9a423c7e31e6cc4b34bdc589f1fab27e61e6af', 'Content-Length': '77', 'Host': 'localhost:4566', 'X-Amz-Date': '20230719T174711Z', 'x-amz-security-token': 'FQoGZXIvYXdzEBYaDlIuP538II7wPg2p2ofUKTrA7pBZu5gd8NybfAwW8vShDhilJlJtkNqepbRp+5hkVpkTgl5rbmfgFWfyBxiXjJPo8ykSmDebIiEEc4MpH3mJkH6Szz6RtyQkOFm92GEHLTBLkgl63AB6oNmMveaYhhoOTpL2/l6NIN2snhb288xBo7imTPzjmkQLaSJq2zOW1GoplVRwKUQPTeB5i/laD9nUYBewP/0S+m1Kwy6CD0Ic0xZfzdqv8a4DPAZ1dd3ThwjHOfXoIrtOOl7FjI47BvD53nG5UbSFbejQmX0n+fj4tyfZAYIdDsTi7uJWVLwAuT6ObYSgN0blprotOfw=', 'Authorization': 'AWS4-HMAC-SHA256 Credential=LSIAQAAAAAAAFIQOYFIY/20230719/us-east-2/cloudformation/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token, Signature=f266761a3d896dcaa18274e0af62a75006668fd170cff3520d8d328fc0776e57', 'Connection': 'close', 'x-localstack-tgt-api': 'cloudformation', 'x-moto-account-id': '000000000000'}); DescribeStackEventsOutput({'StackEvents': [{'EventId': 'd5267d7f-1cd7-4016-9f1b-069770992b36', 'Timestamp': '2023-07-19T17:47:10.060Z', 'StackId': 'arn:aws:cloudformation:us-east-2:000000000000:stack/web-api-service-local/e914faaa', 'StackName': 'web-api-service-local', 'LogicalResourceId': 'web-api-service-local', 'PhysicalResourceId': 'arn:aws:cloudformation:us-east-2:000000000000:stack/web-api-service-local/e914faaa', 'ResourceStatus': 'CREATE_FAILED', 'ResourceType': 'AWS::CloudFormation::Stack'}, {'EventId': 'd4f3e9e9-279e-46a3-a4bd-e3aed5292808', 'Timestamp': '2023-07-19T17:47:09.681Z', 'StackId': 'arn:aws:cloudformation:us-east-2:000000000000:stack/web-api-service-local/e914faaa', 'StackName': 'web-api-service-local', 'LogicalResourceId': 'webapiserviceexecutionrolelocalDefaultPolicy32C4E3A4', 'PhysicalResourceId': 'stack--H5QKDLYCG6H69', 'ResourceStatus': 'CREATE_COMPLETE', 'ResourceType': 'AWS::IAM::Policy'}, {'EventId': 'ffdabde3-1d88-449f-b0d8-10e1ec5743d5', 'Timestamp': '2023-07-19T17:47:09.555Z', 'StackId': 'arn:aws:cloudformation:us-east-2:000000000000:stack/web-api-service-local/e914faaa', 'StackName': 'web-api-service-local', 'LogicalResourceId': 'CDKMetadata', 'PhysicalResourceId': 'arn:aws:cloudformation:us-east-2:000000000000:stack/web-api-service-local/e914faaa', 'ResourceStatus': 'CREATE_COMPLETE', 'ResourceType': 'AWS::CDK::Metadata'}, {'EventId': 'd13156bd-d93a-45de-b4b6-1766e37159c2', 'Timestamp': '2023-07-19T17:47:09.551Z', 'StackId': 'arn:aws:cloudformation:us-east-2:000000000000:stack/web-api-service-local/e914faaa', 'StackName': 'web-api-service-local', 'LogicalResourceId': 'webapiservicelocalSecurityGroupA3650945', 'PhysicalResourceId': 'sg-8c42c7e01eb617487', 'ResourceStatus': 'CREATE_COMPLETE', 'ResourceType': 'AWS::EC2::SecurityGroup'}, {'EventId': '6fd46fe5-7229-40a9-b4a6-94f9b9df78cc', 'Timestamp': '2023-07-19T17:47:09.498Z', 'StackId': 'arn:aws:cloudformation:us-east-2:000000000000:stack/web-api-service-local/e914faaa', 'StackName': 'web-api-service-local', 'LogicalResourceId': 'webapialblocal21F5B8E9', 'PhysicalResourceId': 'arn:aws:elasticloadbalancing:us-east-2:000000000000:loadbalancer/app/web-api-alb-local/8c0d0004', 'ResourceStatus': 'CREATE_COMPLETE', 'ResourceType': 'AWS::ElasticLoadBalancingV2::LoadBalancer'}, {'EventId': '3575872b-ee88-4efe-ae5c-2aff4d2e6252', 'Timestamp': '2023-07-19T17:47:09.347Z', 'StackId': 'arn:aws:cloudformation:us-east-2:000000000000:stack/web-api-service-local/e914faaa', 'StackName': 'web-api-service-local', 'LogicalResourceId': 'webapialbsglocal889691B7', 'PhysicalResourceId': 'sg-fba3caa9bdd0e9961', 'ResourceStatus': 'CREATE_COMPLETE', 'ResourceType': 'AWS::EC2::SecurityGroup'}, {'EventId': '1d8fe726-dd86-4f12-ab71-5aeb230f9e28', 'Timestamp': '2023-07-19T17:47:09.323Z', 'StackId': 'arn:aws:cloudformation:us-east-2:000000000000:stack/web-api-service-local/e914faaa', 'StackName': 'web-api-service-local', 'LogicalResourceId': 'webapiservicedefinitionlocaldatadogagentlocalLogGroup9254022F', 'PhysicalResourceId': 'web-api-service-local-webapiservicedefinitionl-80306def', 'ResourceStatus': 'CREATE_COMPLETE', 'ResourceType': 'AWS::Logs::LogGroup'}, {'EventId': 'b4a4d034-4cd7-493f-87c4-0287da4ca413', 'Timestamp': '2023-07-19T17:47:09.310Z', 'StackId': 'arn:aws:cloudformation:us-east-2:000000000000:stack/web-api-service-local/e914faaa', 'StackName': 'web-api-service-local', 'LogicalResourceId': 'webapiservicedefinitionlocallogrouterlocalLogGroupB9AFBB1D', 'PhysicalResourceId': 'web-api-service-local-webapiservicedefinitionl-d5314ae7', 'ResourceStatus': 'CREATE_COMPLETE', 'ResourceType': 'AWS::Logs::LogGroup'}, {'EventId': 'f97fdb83-7cd6-400b-9b2d-e9b59963b953', 'Timestamp': '2023-07-19T17:47:09.186Z', 'StackId': 'arn:aws:cloudformation:us-east-2:000000000000:stack/web-api-service-local/e914faaa', 'StackName': 'web-api-service-local', 'LogicalResourceId': 'webapiserviceexecutionrolelocal0990C0B7', 'PhysicalResourceId': 'web-api-service-execution-role-local', 'ResourceStatus': 'CREATE_COMPLETE', 'ResourceType': 'AWS::IAM::Role'}, {'EventId': '7f646050-aadf-4123-ac83-d132016e9aaa', 'Timestamp': '2023-07-19T17:47:09.159Z', 'StackId': 'arn:aws:cloudformation:us-east-2:000000000000:stack/web-api-service-local/e914faaa', 'StackName': 'web-api-service-local', 'LogicalResourceId': 'webapiservicetaskrolelocal9C66C398', 'PhysicalResourceId': 'web-api-service-task-role-local', 'ResourceStatus': 'CREATE_COMPLETE', 'ResourceType': 'AWS::IAM::Role'}, {'EventId': 'b00499a1-6330-4e1a-92c9-fb0ffab10409', 'Timestamp': '2023-07-19T17:47:09.134Z', 'StackId': 'arn:aws:cloudformation:us-east-2:000000000000:stack/web-api-service-local/e914faaa', 'StackName': 'web-api-service-local', 'LogicalResourceId': 'webapiservicesglocal8D976441', 'PhysicalResourceId': 'sg-02bed20acb1b5bf4f', 'ResourceStatus': 'CREATE_COMPLETE', 'ResourceType': 'AWS::EC2::SecurityGroup'}, {'EventId': 'b1aeaaa6-13cc-4865-93e9-d7365dbfdd2e', 'Timestamp': '2023-07-19T17:47:09.086Z', 'StackId': 'arn:aws:cloudformation:us-east-2:000000000000:stack/web-api-service-local/e914faaa', 'StackName': 'web-api-service-local', 'LogicalResourceId': 'web-api-service-local', 'PhysicalResourceId': 'arn:aws:cloudformation:us-east-2:000000000000:stack/web-api-service-local/e914faaa', 'ResourceStatus': 'CREATE_IN_PROGRESS', 'ResourceType': 'AWS::CloudFormation::Stack'}, {'EventId': 'bc0edd23-7511-4bea-b4c9-dc28bc2422d0', 'Timestamp': '2023-07-19T17:47:09.037Z', 'StackId': 'arn:aws:cloudformation:us-east-2:000000000000:stack/web-api-service-local/e914faaa', 'StackName': 'web-api-service-local', 'LogicalResourceId': 'web-api-service-local', 'PhysicalResourceId': 'arn:aws:cloudformation:us-east-2:000000000000:stack/web-api-service-local/e914faaa', 'ResourceStatus': 'REVIEW_IN_PROGRESS', 'ResourceType': 'AWS::CloudFormation::Stack'}]}, headers={'Content-Type': 'text/xml', 'Content-Length': '7251', 'Connection': 'close', 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': 'HEAD,GET,PUT,POST,DELETE,OPTIONS,PATCH', 'Access-Control-Allow-Headers': 'authorization,cache-control,content-length,content-md5,content-type,etag,location,x-amz-acl,x-amz-content-sha256,x-amz-date,x-amz-request-id,x-amz-security-token,x-amz-tagging,x-amz-target,x-amz-user-agent,x-amz-version-id,x-amzn-requestid,x-localstack-target,amz-sdk-invocation-id,amz-sdk-request', 'Access-Control-Expose-Headers': 'etag,x-amz-version-id'})
```
ref = resolve_ref(
                account_id, region_name, stack_name, s, s, value["Ref"]
            )
            if ref is None:
                msg = 'Unable to resolve Ref for  "%s" (yet)' % value["Ref"]
                LOG.debug("%s - %s", msg, s.get(value["Ref"]) or set(s.keys()))
                raise DependencyNotYetSatisfied(_ids=value["Ref"], message=msg)
            ref = resolve_refs_recursively(
                account_id,
                region_name,
                stack_name,
                s,
                mappings,
                conditions,
                s,
                ref,
            )
            return ref
        if stripped_fn_lower == "getatt":
            attr_ref = value[keys_list[0]]
            attr_ref = attr_ref.split(".") if isinstance(attr_ref, str) else attr_ref
            _logical_id = attr_ref[0]
            attribute_name = attr_ref[1]
            # 
            attribute_name = resolve_refs_recursively(
                account_id,
                region_name,
                stack_name,
                s,
                mappings,