localstack / serverless-localstack

⚡ Serverless plugin for running against LocalStack
525 stars 87 forks source link

"sls remove" command failing #91

Closed whummer closed 1 year ago

whummer commented 4 years ago

The sls remove command seems to be failing under certain circumstances - see #33

┆Issue is synchronized with this Jira Task by Unito

yonahforst commented 4 years ago

I'm having this problem as well. Here's the output from localstack:

localstack_abi | 2020-08-03T09:54:58:WARNING:localstack.utils.cloudformation.template_deployer: Action "delete" for resource type S3::BucketPolicy not yet implemented
localstack_abi | 2020-08-03T09:54:58:WARNING:localstack.utils.cloudformation.template_deployer: Error calling <bound method ClientCreator._create_api_method.<locals>._api_call of <botocore.client.IAM object at 0x7f35c4b156a0>> with params: {'RoleName': 'delayedMsg-local-eu-west-1-lambdaRole'} for resource: {'LogicalResourceId': 'IamRoleLambdaExecution', 'PhysicalResourceId': 'delayedMsg-local-eu-west-1-lambdaRole', 'ResourceType': 'AWS::IAM::Role', 'LastUpdatedTimestamp': '2011-06-21 20:15:58+00:00', 'ResourceStatus': 'CREATE_COMPLETE', 'Properties': {'LogicalResourceId': 'IamRoleLambdaExecution', 'PhysicalResourceId': 'delayedMsg-local-eu-west-1-lambdaRole', 'ResourceType': 'AWS::IAM::Role', 'LastUpdatedTimestamp': '2011-06-21 20:15:58+00:00', 'ResourceStatus': 'CREATE_COMPLETE'}}
localstack_abi | 2020-08-03T09:54:58:WARNING:localstack.utils.server.http2_server: Error in proxy handler for request POST http://localhost:4581/: An error occurred (DeleteConflict) when calling the DeleteRole operation: Cannot delete entity, must delete policies first. Traceback (most recent call last):
localstack_abi |   File "/opt/code/localstack/localstack/utils/server/http2_server.py", line 83, in index
localstack_abi |     result = await run_sync(handler, request, data)
localstack_abi |   File "/opt/code/localstack/localstack/utils/async_utils.py", line 50, in run_sync
localstack_abi |     return await loop.run_in_executor(THREAD_POOL, copy_context().run, func, *args)
localstack_abi |   File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
localstack_abi |     result = self.fn(*self.args, **self.kwargs)
localstack_abi |   File "/opt/code/localstack/localstack/services/generic_proxy.py", line 555, in handler
localstack_abi |     response = modify_and_forward(method=method, path=path_with_params, data_bytes=data, headers=headers,
localstack_abi |   File "/opt/code/localstack/localstack/services/generic_proxy.py", line 332, in modify_and_forward
localstack_abi |     listener_result = listener.forward_request(method=method,
localstack_abi |   File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_listener.py", line 198, in forward_request
localstack_abi |     template_deployer.delete_stack(stack_name, stack_resources)
localstack_abi |   File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1243, in delete_stack
localstack_abi |     delete_resource(resource_id, resources, stack_name)
localstack_abi |   File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1093, in delete_resource
localstack_abi |     return execute_resource_action(resource_id, resources, stack_name, ACTION_DELETE)
localstack_abi |   File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1115, in execute_resource_action
localstack_abi |     result = configure_resource_via_sdk(resource_id, resources, resource_type, func, stack_name)
localstack_abi |   File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1192, in configure_resource_via_sdk
localstack_abi |     raise e
localstack_abi |   File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1189, in configure_resource_via_sdk
localstack_abi |     result = function(**params)
localstack_abi |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/botocore/client.py", line 316, in _api_call
localstack_abi |     return self._make_api_call(operation_name, kwargs)
localstack_abi |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/botocore/client.py", line 635, in _make_api_call
localstack_abi |     raise error_class(parsed_response, operation_name)
localstack_abi | botocore.errorfactory.DeleteConflictException: An error occurred (DeleteConflict) when calling the DeleteRole operation: Cannot delete entity, must delete policies first.
localstack_abi | 
localstack_abi | 2020-08-03T09:54:59:WARNING:localstack.utils.cloudformation.template_deployer: Error calling <bound method ClientCreator._create_api_method.<locals>._api_call of <botocore.client.S3 object at 0x7f35c664a130>> with params: {'Bucket': 'delayedmsg-local-serverlessdeploymentbucket-tb54js1m935r'} for resource: {'LogicalResourceId': 'ServerlessDeploymentBucket', 'PhysicalResourceId': 'delayedmsg-local-serverlessdeploymentbucket-tb54js1m935r', 'ResourceType': 'AWS::S3::Bucket', 'LastUpdatedTimestamp': '2011-06-21 20:15:58+00:00', 'ResourceStatus': 'CREATE_COMPLETE', 'Properties': {'LogicalResourceId': 'ServerlessDeploymentBucket', 'PhysicalResourceId': 'delayedmsg-local-serverlessdeploymentbucket-tb54js1m935r', 'ResourceType': 'AWS::S3::Bucket', 'LastUpdatedTimestamp': '2011-06-21 20:15:58+00:00', 'ResourceStatus': 'CREATE_COMPLETE'}}
localstack_abi | 2020-08-03T09:54:59:WARNING:localstack.utils.server.http2_server: Error in proxy handler for request POST http://localhost:4581/: An error occurred (NoSuchBucket) when calling the DeleteBucketPolicy operation: The specified bucket does not exist Traceback (most recent call last):
localstack_abi |   File "/opt/code/localstack/localstack/utils/server/http2_server.py", line 83, in index
localstack_abi |     result = await run_sync(handler, request, data)
localstack_abi |   File "/opt/code/localstack/localstack/utils/async_utils.py", line 50, in run_sync
localstack_abi |     return await loop.run_in_executor(THREAD_POOL, copy_context().run, func, *args)
localstack_abi |   File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
localstack_abi |     result = self.fn(*self.args, **self.kwargs)
localstack_abi |   File "/opt/code/localstack/localstack/services/generic_proxy.py", line 555, in handler
localstack_abi |     response = modify_and_forward(method=method, path=path_with_params, data_bytes=data, headers=headers,
localstack_abi |   File "/opt/code/localstack/localstack/services/generic_proxy.py", line 332, in modify_and_forward
localstack_abi |     listener_result = listener.forward_request(method=method,
localstack_abi |   File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_listener.py", line 198, in forward_request
localstack_abi |     template_deployer.delete_stack(stack_name, stack_resources)
localstack_abi |   File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1243, in delete_stack
localstack_abi |     delete_resource(resource_id, resources, stack_name)
localstack_abi |   File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1093, in delete_resource
localstack_abi |     return execute_resource_action(resource_id, resources, stack_name, ACTION_DELETE)
localstack_abi |   File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1115, in execute_resource_action
localstack_abi |     result = configure_resource_via_sdk(resource_id, resources, resource_type, func, stack_name)
localstack_abi |   File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1192, in configure_resource_via_sdk
localstack_abi |     raise e
localstack_abi |   File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1189, in configure_resource_via_sdk
localstack_abi |     result = function(**params)
localstack_abi |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/botocore/client.py", line 316, in _api_call
localstack_abi |     return self._make_api_call(operation_name, kwargs)
localstack_abi |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/botocore/client.py", line 635, in _make_api_call
localstack_abi |     raise error_class(parsed_response, operation_name)
localstack_abi | botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the DeleteBucketPolicy operation: The specified bucket does not exist
localstack_abi | 
Keisn1 commented 4 years ago

same here, simple sls deploy and then sls remove, arises kind of arbitrary but more often than not

localstack_main | Waiting for all LocalStack services to be ready
localstack_main | 2020-09-25 09:12:51,396 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
localstack_main | 2020-09-25 09:12:51,401 INFO supervisord started with pid 14
localstack_main | 2020-09-25 09:12:52,409 INFO spawned: 'dashboard' with pid 20
localstack_main | 2020-09-25 09:12:52,413 INFO spawned: 'infra' with pid 21
localstack_main | 2020-09-25 09:12:52,419 INFO success: dashboard entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
localstack_main | 2020-09-25 09:12:52,420 INFO exited: dashboard (exit status 0; expected)
localstack_main | (. .venv/bin/activate; exec bin/localstack start --host)
localstack_main | LocalStack version: 0.11.5
localstack_main | Starting local dev environment. CTRL-C to quit.
localstack_main | 2020-09-25 09:12:54,043 INFO success: infra entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
localstack_main | Waiting for all LocalStack services to be ready
localstack_main | 2020-09-25T09:12:58:INFO:localstack.utils.analytics.profiler: Execution of "load_plugin_from_path" took 4705.376863479614ms
localstack_main | 2020-09-25T09:12:58:INFO:localstack.utils.analytics.profiler: Execution of "load_plugins" took 4706.007957458496ms
localstack_main | Starting edge router (https port 4566)...
localstack_main | Starting mock ACM service on http port 4566 ...
localstack_main | Starting mock API Gateway service on http port 4566 ...
localstack_main | Starting mock CloudFormation service on http port 4566 ...
localstack_main | Starting mock CloudWatch service on http port 4566 ...
localstack_main | Starting mock DynamoDB service on http port 4566 ...
localstack_main | Starting mock DynamoDB Streams service on http port 4566 ...
localstack_main | Starting mock EC2 service on http port 4566 ...
localstack_main | Starting mock ES service on http port 4566 ...
localstack_main | Starting mock Firehose service on http port 4566 ...
localstack_main | Starting mock IAM service on http port 4566 ...
localstack_main | Starting mock STS service on http port 4566 ...
localstack_main | Starting mock Kinesis service on http port 4566 ...
localstack_main | Starting mock KMS service on http port 4566 ...
localstack_main | 2020-09-25T09:12:59:INFO:localstack.utils.analytics.profiler: Execution of "prepare_environment" took 1064.1968250274658ms
localstack_main | 2020-09-25T09:12:59:INFO:localstack.multiserver: Starting multi API server process on port 57523
localstack_main | Running on 0.0.0.0:57523 over http (CTRL + C to quit)
localstack_main | Running on 0.0.0.0:4566 over https (CTRL + C to quit)
localstack_main | Starting mock Lambda service on http port 4566 ...
localstack_main | Starting mock CloudWatch Logs service on http port 4566 ...
localstack_main | Starting mock Redshift service on http port 4566 ...
localstack_main | Starting mock Route53 service on http port 4566 ...
localstack_main | Starting mock S3 service on http port 4566 ...
localstack_main | Starting mock Secrets Manager service on http port 4566 ...
localstack_main | Starting mock SES service on http port 4566 ...
localstack_main | Starting mock SNS service on http port 4566 ...
localstack_main | Starting mock SQS service on http port 4566 ...
localstack_main | Starting mock SSM service on http port 4566 ...
localstack_main | Starting mock Cloudwatch Events service on http port 4566 ...
localstack_main | Starting mock StepFunctions service on http port 4566 ...
localstack_main | Waiting for all LocalStack services to be ready
localstack_main | Ready.
localstack_main | 2020-09-25T09:13:11:INFO:localstack.utils.analytics.profiler: Execution of "start_api_services" took 11926.755905151367ms
localstack_main | 2020-09-25T09:14:27:WARNING:localstack.services.cloudformation.cloudformation_starter: Unable to determine physical_resource_id for resource <class 'localstack.services.cloudformation.service_models.S3BucketPolicy'>
localstack_main | 2020-09-25T09:14:33:WARNING:localstack.services.awslambda.lambda_api: Function not found: arn:aws:lambda:us-east-1:000000000000:function:sls-python-local-hello
localstack_main | 2020-09-25T09:14:33:WARNING:localstack.services.awslambda.lambda_api: Function not found: arn:aws:lambda:us-east-1:000000000000:function:sls-python-local-hello
localstack_main | 2020-09-25T09:14:33:WARNING:localstack.utils.cloudformation.template_deployer: Unable to update resource type "S3::Bucket", id "ServerlessDeploymentBucket"
localstack_main | 2020-09-25T09:14:38:WARNING:localstack.services.cloudformation.cloudformation_starter: Unable to resolve "Ref" attribute for: {'Ref': 'HelloLambdaVersion10Sox2EqxiyWkhNp0fHoKJWPqmzrUzcFanwfP5Akpdw'} - HelloLambdaVersion10Sox2EqxiyWkhNp0fHoKJWPqmzrUzcFanwfP5Akpdw - <class 'moto.awslambda.models.LambdaVersion'>
localstack_main | 2020-09-25T09:14:55:WARNING:localstack.utils.cloudformation.template_deployer: Action "delete" for resource type S3::BucketPolicy not yet implemented
localstack_main | 2020-09-25T09:14:55:WARNING:localstack.utils.cloudformation.template_deployer: Error calling <bound method ClientCreator._create_api_method.<locals>._api_call of <botocore.client.CloudWatchLogs object at 0x7ff1d31a4430>> with params: {'logGroupName': ''} for resource: {'LogicalResourceId': 'HelloLogGroup', 'PhysicalResourceId': '', 'ResourceType': 'AWS::Logs::LogGroup', 'LastUpdatedTimestamp': '2011-06-21T20:15:58.000Z', 'ResourceStatus': 'CREATE_COMPLETE', 'Properties': {'LogicalResourceId': 'HelloLogGroup', 'PhysicalResourceId': '', 'ResourceType': 'AWS::Logs::LogGroup', 'LastUpdatedTimestamp': '2011-06-21T20:15:58.000Z', 'ResourceStatus': 'CREATE_COMPLETE'}}
localstack_main | 2020-09-25T09:14:55:WARNING:bootstrap.py: Thread run method <function AdaptiveThreadPool.submit.<locals>._run at 0x7ff1d31a34c0>(None) failed: Parameter validation failed:
localstack_main | Invalid length for parameter logGroupName, value: 0, valid range: 1-inf Traceback (most recent call last):
localstack_main |   File "/opt/code/localstack/localstack/utils/bootstrap.py", line 533, in run
localstack_main |     result = self.func(self.params)
localstack_main |   File "/opt/code/localstack/localstack/utils/async_utils.py", line 28, in _run
localstack_main |     return fn(*args, **kwargs)
localstack_main |   File "/opt/code/localstack/localstack/services/generic_proxy.py", line 557, in handler
localstack_main |     response = modify_and_forward(method=method, path=path_with_params, data_bytes=data, headers=headers,
localstack_main |   File "/opt/code/localstack/localstack/services/generic_proxy.py", line 332, in modify_and_forward
localstack_main |     listener_result = listener.forward_request(method=method,
localstack_main |   File "/opt/code/localstack/localstack/services/edge.py", line 81, in forward_request
localstack_main |     return do_forward_request(api, port, method, path, data, headers)
localstack_main |   File "/opt/code/localstack/localstack/services/edge.py", line 86, in do_forward_request
localstack_main |     result = do_forward_request_inmem(api, port, method, path, data, headers)
localstack_main |   File "/opt/code/localstack/localstack/services/edge.py", line 106, in do_forward_request_inmem
localstack_main |     response = modify_and_forward(method=method, path=path, data_bytes=data, headers=headers,
localstack_main |   File "/opt/code/localstack/localstack/services/generic_proxy.py", line 332, in modify_and_forward
localstack_main |     listener_result = listener.forward_request(method=method,
localstack_main |   File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_listener.py", line 201, in forward_request
localstack_main |     template_deployer.delete_stack(stack_name, stack_resources)
localstack_main |   File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1337, in delete_stack
localstack_main |     delete_resource(resource_id, resources, stack_name)
localstack_main |   File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1156, in delete_resource
localstack_main |     return execute_resource_action(resource_id, resources, stack_name, ACTION_DELETE)
localstack_main |   File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1178, in execute_resource_action
localstack_main |     result = configure_resource_via_sdk(resource_id, resources, resource_type, func, stack_name)
localstack_main |   File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1264, in configure_resource_via_sdk
localstack_main |     raise e
localstack_main |   File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1261, in configure_resource_via_sdk
localstack_main |     result = function(**params)
localstack_main |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/botocore/client.py", line 337, in _api_call
localstack_main |     return self._make_api_call(operation_name, kwargs)
localstack_main |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/botocore/client.py", line 628, in _make_api_call
localstack_main |     request_dict = self._convert_to_request_dict(
localstack_main |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/botocore/client.py", line 676, in _convert_to_request_dict
localstack_main |     request_dict = self._serializer.serialize_to_request(
localstack_main |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/botocore/validate.py", line 297, in serialize_to_request
localstack_main |     raise ParamValidationError(report=report.generate_report())
localstack_main | botocore.exceptions.ParamValidationError: Parameter validation failed:
localstack_main | Invalid length for parameter logGroupName, value: 0, valid range: 1-inf
localstack_main | 
localstack_main | 2020-09-25T09:14:55:WARNING:localstack.utils.server.http2_server: Error in proxy handler for request POST http://localhost:4566/: Parameter validation failed:
localstack_main | Invalid length for parameter logGroupName, value: 0, valid range: 1-inf Traceback (most recent call last):
localstack_main |   File "/opt/code/localstack/localstack/utils/server/http2_server.py", line 94, in index
localstack_main |     raise result
localstack_main |   File "/opt/code/localstack/localstack/utils/bootstrap.py", line 533, in run
localstack_main |     result = self.func(self.params)
localstack_main |   File "/opt/code/localstack/localstack/utils/async_utils.py", line 28, in _run
localstack_main |     return fn(*args, **kwargs)
localstack_main |   File "/opt/code/localstack/localstack/services/generic_proxy.py", line 557, in handler
localstack_main |     response = modify_and_forward(method=method, path=path_with_params, data_bytes=data, headers=headers,
localstack_main |   File "/opt/code/localstack/localstack/services/generic_proxy.py", line 332, in modify_and_forward
localstack_main |     listener_result = listener.forward_request(method=method,
localstack_main |   File "/opt/code/localstack/localstack/services/edge.py", line 81, in forward_request
localstack_main |     return do_forward_request(api, port, method, path, data, headers)
localstack_main |   File "/opt/code/localstack/localstack/services/edge.py", line 86, in do_forward_request
localstack_main |     result = do_forward_request_inmem(api, port, method, path, data, headers)
localstack_main |   File "/opt/code/localstack/localstack/services/edge.py", line 106, in do_forward_request_inmem
localstack_main |     response = modify_and_forward(method=method, path=path, data_bytes=data, headers=headers,
localstack_main |   File "/opt/code/localstack/localstack/services/generic_proxy.py", line 332, in modify_and_forward
localstack_main |     listener_result = listener.forward_request(method=method,
localstack_main |   File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_listener.py", line 201, in forward_request
localstack_main |     template_deployer.delete_stack(stack_name, stack_resources)
localstack_main |   File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1337, in delete_stack
localstack_main |     delete_resource(resource_id, resources, stack_name)
localstack_main |   File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1156, in delete_resource
localstack_main |     return execute_resource_action(resource_id, resources, stack_name, ACTION_DELETE)
localstack_main |   File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1178, in execute_resource_action
localstack_main |     result = configure_resource_via_sdk(resource_id, resources, resource_type, func, stack_name)
localstack_main |   File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1264, in configure_resource_via_sdk
localstack_main |     raise e
localstack_main |   File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1261, in configure_resource_via_sdk
localstack_main |     result = function(**params)
localstack_main |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/botocore/client.py", line 337, in _api_call
localstack_main |     return self._make_api_call(operation_name, kwargs)
localstack_main |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/botocore/client.py", line 628, in _make_api_call
localstack_main |     request_dict = self._convert_to_request_dict(
localstack_main |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/botocore/client.py", line 676, in _convert_to_request_dict
localstack_main |     request_dict = self._serializer.serialize_to_request(
localstack_main |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/botocore/validate.py", line 297, in serialize_to_request
localstack_main |     raise ParamValidationError(report=report.generate_report())
localstack_main | botocore.exceptions.ParamValidationError: Parameter validation failed:
localstack_main | Invalid length for parameter logGroupName, value: 0, valid range: 1-inf
localstack_main | 
localstack_main | 2020-09-25T09:14:55:WARNING:localstack.utils.cloudformation.template_deployer: Error calling <bound method ClientCreator._create_api_method.<locals>._api_call of <botocore.client.S3 object at 0x7ff1d506e9a0>> with params: {'Bucket': 'sls-python-local-serverlessdeploymentbucket-vnj3nprprchy'} for resource: {'LogicalResourceId': 'ServerlessDeploymentBucket', 'PhysicalResourceId': 'sls-python-local-serverlessdeploymentbucket-vnj3nprprchy', 'ResourceType': 'AWS::S3::Bucket', 'LastUpdatedTimestamp': '2011-06-21T20:15:58.000Z', 'ResourceStatus': 'CREATE_COMPLETE', 'Properties': {'LogicalResourceId': 'ServerlessDeploymentBucket', 'PhysicalResourceId': 'sls-python-local-serverlessdeploymentbucket-vnj3nprprchy', 'ResourceType': 'AWS::S3::Bucket', 'LastUpdatedTimestamp': '2011-06-21T20:15:58.000Z', 'ResourceStatus': 'CREATE_COMPLETE'}}
localstack_main | 2020-09-25T09:14:55:WARNING:bootstrap.py: Thread run method <function AdaptiveThreadPool.submit.<locals>._run at 0x7ff1d499dd30>(None) failed: An error occurred (NoSuchBucket) when calling the DeleteBucketPolicy operation: The specified bucket does not exist Traceback (most recent call last):
localstack_main |   File "/opt/code/localstack/localstack/utils/bootstrap.py", line 533, in run
localstack_main |     result = self.func(self.params)
localstack_main |   File "/opt/code/localstack/localstack/utils/async_utils.py", line 28, in _run
localstack_main |     return fn(*args, **kwargs)
localstack_main |   File "/opt/code/localstack/localstack/services/generic_proxy.py", line 557, in handler
localstack_main |     response = modify_and_forward(method=method, path=path_with_params, data_bytes=data, headers=headers,
localstack_main |   File "/opt/code/localstack/localstack/services/generic_proxy.py", line 332, in modify_and_forward
localstack_main |     listener_result = listener.forward_request(method=method,
localstack_main |   File "/opt/code/localstack/localstack/services/edge.py", line 81, in forward_request
localstack_main |     return do_forward_request(api, port, method, path, data, headers)
localstack_main |   File "/opt/code/localstack/localstack/services/edge.py", line 86, in do_forward_request
localstack_main |     result = do_forward_request_inmem(api, port, method, path, data, headers)
localstack_main |   File "/opt/code/localstack/localstack/services/edge.py", line 106, in do_forward_request_inmem
localstack_main |     response = modify_and_forward(method=method, path=path, data_bytes=data, headers=headers,
localstack_main |   File "/opt/code/localstack/localstack/services/generic_proxy.py", line 332, in modify_and_forward
localstack_main |     listener_result = listener.forward_request(method=method,
localstack_main |   File "/opt/code/localstack/localstack/services/cloudformation/cloudformation_listener.py", line 201, in forward_request
localstack_main |     template_deployer.delete_stack(stack_name, stack_resources)
localstack_main |   File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1337, in delete_stack
localstack_main |     delete_resource(resource_id, resources, stack_name)
localstack_main |   File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1156, in delete_resource
localstack_main |     return execute_resource_action(resource_id, resources, stack_name, ACTION_DELETE)
localstack_main |   File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1178, in execute_resource_action
localstack_main |     result = configure_resource_via_sdk(resource_id, resources, resource_type, func, stack_name)
localstack_main |   File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1264, in configure_resource_via_sdk
localstack_main |     raise e
localstack_main |   File "/opt/code/localstack/localstack/utils/cloudformation/template_deployer.py", line 1261, in configure_resource_via_sdk
localstack_main |     result = function(**params)
localstack_main |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/botocore/client.py", line 337, in _api_call
localstack_main |     return self._make_api_call(operation_name, kwargs)
localstack_main |   File "/opt/code/localstack/.venv/lib/python3.8/site-packages/botocore/client.py", line 656, in _make_api_call
localstack_main |     raise error_class(parsed_response, operation_name)
localstack_main | botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the DeleteBucketPolicy operation: The specified bucket does not exist
miho120 commented 3 years ago

I was able to reproduce the issue with the latest Pypi localstack package, but the good news is that there's no such issue with the latest localstack master branch. So, looks like this issue has been solved and waiting for the localstack release. @whummer what do you think?

steffyP commented 1 year ago

Closing due to inactivity. The issue should be resolved in the meantime. Please make sure to use the latest localstack image.