Closed virtlima closed 1 year ago
Okay so I resolved the Docker Permission issues and error by making sure I can run Docker Commands without Sudo but get this now in the log...
[2022-12-27T18:11:38Z] DEBUG - Logging set up successfully
[2022-12-27T18:11:38Z] DEBUG - Running submit: Namespace(version=False, subparser_name='submit', command=<function submit at 0x7fc1e2ee6d40>, verbose=0, dry_run=True, endpoint_url=None, region=None, set_default=False, role_arn=None, use_role=True)
[2022-12-27T18:11:38Z] DEBUG - Root directory: /home/ubuntu/localdev/CloudFormationCLI/myhook
[2022-12-27T18:11:38Z] DEBUG - Loading project file '/home/ubuntu/localdev/CloudFormationCLI/myhook/.rpdk-config'
[2022-12-27T18:11:38Z] INFO - Validating your hook specification...
[2022-12-27T18:11:38Z] DEBUG - Rewriting refs in '
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/core/cli.py", line 100, in main args.command(args) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/core/submit.py", line 15, in submit project.submit( File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/core/project.py", line 634, in submit self._add_hooks_content_to_zip(zip_file, endpoint_url, region_name) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/core/project.py", line 709, in _add_hooks_content_to_zip self._plugin.package(self, zip_file) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/python/codegen.py", line 227, in package self._build(project.root) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/python/codegen.py", line 244, in _build self._docker_build(base_path) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/python/codegen.py", line 325, in _docker_build raise DownstreamError("Error running docker build") from e rpdk.core.exceptions.DownstreamError: Error running docker build
Installed latest version of of the cloudformation-cli-python-plugin found here --> https://github.com/aws-cloudformation/cloudformation-cli-python-plugin
Going through the Hooks Workshop, when I run the cfn submit --dry-run I get the following error:
Starting Docker build. This may take several minutes if the image 'public.ecr.aws/lambda/python:3.6' needs to be pulled first. === Unhandled exception === Please report this issue to the team. Issue tracker: github.com/aws-cloudformation/cloudformation-cli/issues Please include the log file 'rpdk.log'
Below is the rpdk.log contents...
[2022-12-27T16:51:52Z] DEBUG - Logging set up successfully [2022-12-27T16:51:52Z] DEBUG - Running None: Namespace(version=False, subparser_name=None, command=<function init at 0x7ffbdf66f370>, verbose=0, force=False, type_name=None, artifact_type=None, endpoint_url=None, region=None, target_schemas=[]) [2022-12-27T16:51:52Z] DEBUG - Root directory: /home/ubuntu/localdev/CloudFormationCLI/myhook [2022-12-27T16:51:52Z] WARNING - Initializing new project [2022-12-27T16:51:52Z] DEBUG - Loading project file '/home/ubuntu/localdev/CloudFormationCLI/myhook/.rpdk-config' [2022-12-27T16:52:08Z] DEBUG - Hook type identifier: MyCompany::Testing::Hook [2022-12-27T16:52:14Z] DEBUG - Language plugin: python36 [2022-12-27T16:52:14Z] DEBUG - Init started [2022-12-27T16:52:14Z] DEBUG - Writing settings [2022-12-27T16:52:18Z] DEBUG - Making folder '/home/ubuntu/localdev/CloudFormationCLI/myhook/src/mycompany_testing_hook' [2022-12-27T16:52:18Z] DEBUG - Writing '/home/ubuntu/localdev/CloudFormationCLI/myhook/src/mycompany_testing_hook/init.py' [2022-12-27T16:52:18Z] DEBUG - Writing '/home/ubuntu/localdev/CloudFormationCLI/myhook/.gitignore' [2022-12-27T16:52:18Z] DEBUG - Writing '/home/ubuntu/localdev/CloudFormationCLI/myhook/requirements.txt' [2022-12-27T16:52:18Z] DEBUG - Writing '/home/ubuntu/localdev/CloudFormationCLI/myhook/README.md' [2022-12-27T16:52:18Z] DEBUG - Writing '/home/ubuntu/localdev/CloudFormationCLI/myhook/template.yml' [2022-12-27T16:52:18Z] DEBUG - Init complete [2022-12-27T16:52:18Z] DEBUG - Overwriting '/home/ubuntu/localdev/CloudFormationCLI/myhook/.rpdk-config' [2022-12-27T16:52:18Z] DEBUG - Writing Execution Role CloudFormation template: /home/ubuntu/localdev/CloudFormationCLI/myhook/hook-role.yaml [2022-12-27T16:52:18Z] DEBUG - Overwriting '/home/ubuntu/localdev/CloudFormationCLI/myhook/hook-role.yaml' [2022-12-27T16:52:18Z] DEBUG - Hook schema target names: {'AWS::S3::Bucket'} [2022-12-27T16:52:18Z] DEBUG - Resolving the following type names: {'AWS::S3::Bucket'} [2022-12-27T16:52:18Z] DEBUG - Retrieving info for following target names: {'AWS::S3::Bucket'} [2022-12-27T16:52:18Z] DEBUG - Retrieving info for type: AWS::S3::Bucket [2022-12-27T16:52:18Z] DEBUG - Generate started [2022-12-27T16:52:18Z] DEBUG - Writing file: /home/ubuntu/localdev/CloudFormationCLI/myhook/src/mycompany_testing_hook/models.py [2022-12-27T16:52:18Z] DEBUG - Overwriting '/home/ubuntu/localdev/CloudFormationCLI/myhook/src/mycompany_testing_hook/models.py' [2022-12-27T16:52:18Z] DEBUG - Generate complete [2022-12-27T16:52:18Z] WARNING - Could not generate schema docs due to missing type info or schema [2022-12-27T16:52:18Z] WARNING - Initialized a new project in /home/ubuntu/localdev/CloudFormationCLI/myhook [2022-12-27T16:52:18Z] DEBUG - Finished None [2022-12-27T17:30:32Z] DEBUG - Logging set up successfully [2022-12-27T17:30:32Z] DEBUG - Running generate: Namespace(version=False, subparser_name='generate', command=<function generate at 0x7f1ae5c99000>, verbose=0, endpoint_url=None, region=None, local_only=False, target_schemas=[]) [2022-12-27T17:30:32Z] DEBUG - Root directory: /home/ubuntu/localdev/CloudFormationCLI/myhook [2022-12-27T17:30:32Z] DEBUG - Loading project file '/home/ubuntu/localdev/CloudFormationCLI/myhook/.rpdk-config' [2022-12-27T17:30:32Z] INFO - Validating your hook specification... [2022-12-27T17:30:32Z] DEBUG - Rewriting refs in ' ' (file:///home/ubuntu/localdev/CloudFormationCLI/myhook/mycompany-testing-hook.json)
[2022-12-27T17:30:32Z] DEBUG - Writing Execution Role CloudFormation template: /home/ubuntu/localdev/CloudFormationCLI/myhook/hook-role.yaml
[2022-12-27T17:30:32Z] DEBUG - Overwriting '/home/ubuntu/localdev/CloudFormationCLI/myhook/hook-role.yaml'
[2022-12-27T17:30:32Z] DEBUG - Hook schema target names: {'AWS::S3::Bucket', 'AWS::SQS::Queue'}
[2022-12-27T17:30:32Z] DEBUG - Resolving the following type names: {'AWS::S3::Bucket', 'AWS::SQS::Queue'}
[2022-12-27T17:30:32Z] DEBUG - Retrieving info for following target names: {'AWS::S3::Bucket', 'AWS::SQS::Queue'}
[2022-12-27T17:30:32Z] DEBUG - Retrieving info for type: AWS::S3::Bucket
[2022-12-27T17:30:33Z] DEBUG - Retrieving info for type: AWS::SQS::Queue
[2022-12-27T17:30:33Z] DEBUG - Generate started
[2022-12-27T17:30:33Z] DEBUG - Writing type configuration resource specification from resource specification: /home/ubuntu/localdev/CloudFormationCLI/myhook/mycompany-testing-hook-configuration.json
[2022-12-27T17:30:33Z] DEBUG - Overwriting '/home/ubuntu/localdev/CloudFormationCLI/myhook/mycompany-testing-hook-configuration.json'
[2022-12-27T17:30:33Z] DEBUG - Writing file: /home/ubuntu/localdev/CloudFormationCLI/myhook/src/mycompany_testing_hook/models.py
[2022-12-27T17:30:33Z] DEBUG - Overwriting '/home/ubuntu/localdev/CloudFormationCLI/myhook/src/mycompany_testing_hook/models.py'
[2022-12-27T17:30:33Z] DEBUG - Generate complete
[2022-12-27T17:30:33Z] DEBUG - Removing generated docs: /home/ubuntu/localdev/CloudFormationCLI/myhook/docs
[2022-12-27T17:30:33Z] DEBUG - Writing generated docs
[2022-12-27T17:30:33Z] DEBUG - Finished documenting nested properties
[2022-12-27T17:30:33Z] DEBUG - Writing docs README: /home/ubuntu/localdev/CloudFormationCLI/myhook/docs/README.md
[2022-12-27T17:30:33Z] WARNING - Generated files for MyCompany::Testing::Hook
[2022-12-27T17:30:33Z] DEBUG - Finished generate
[2022-12-27T17:32:16Z] DEBUG - Logging set up successfully
[2022-12-27T17:32:16Z] DEBUG - Running submit: Namespace(version=False, subparser_name='submit', command=<function submit at 0x7f7653d72d40>, verbose=0, dry_run=True, endpoint_url=None, region=None, set_default=False, role_arn=None, use_role=True)
[2022-12-27T17:32:16Z] DEBUG - Root directory: /home/ubuntu/localdev/CloudFormationCLI/myhook
[2022-12-27T17:32:16Z] DEBUG - Loading project file '/home/ubuntu/localdev/CloudFormationCLI/myhook/.rpdk-config'
[2022-12-27T17:32:16Z] INFO - Validating your hook specification...
[2022-12-27T17:32:16Z] DEBUG - Rewriting refs in ' ' (file:///home/ubuntu/localdev/CloudFormationCLI/myhook/mycompany-testing-hook.json)
[2022-12-27T17:32:16Z] DEBUG - inputs not found. Not writing to package.
[2022-12-27T17:32:16Z] DEBUG - Hook schema target names: {'AWS::SQS::Queue', 'AWS::S3::Bucket'}
[2022-12-27T17:32:17Z] DEBUG - Resolving the following type names: {'AWS::SQS::Queue', 'AWS::S3::Bucket'}
[2022-12-27T17:32:17Z] DEBUG - Retrieving info for following target names: {'AWS::SQS::Queue', 'AWS::S3::Bucket'}
[2022-12-27T17:32:17Z] DEBUG - Retrieving info for type: AWS::SQS::Queue
[2022-12-27T17:32:17Z] DEBUG - Retrieving info for type: AWS::S3::Bucket
[2022-12-27T17:32:17Z] DEBUG - aws-sqs-queue.json found. Writing to package.
[2022-12-27T17:32:17Z] DEBUG - aws-s3-bucket.json found. Writing to package.
[2022-12-27T17:32:17Z] DEBUG - Package started
[2022-12-27T17:32:17Z] DEBUG - Removing '/home/ubuntu/localdev/CloudFormationCLI/myhook/build' folder.
[2022-12-27T17:32:17Z] DEBUG - Dependencies build started from '/home/ubuntu/localdev/CloudFormationCLI/myhook'
[2022-12-27T17:32:17Z] DEBUG - command is '/bin/bash -c "pip install --no-cache-dir --no-color --disable-pip-version-check --upgrade --requirement /project/requirements.txt --target /project/build"'
[2022-12-27T17:32:17Z] WARNING - Starting Docker build. This may take several minutes if the image 'public.ecr.aws/lambda/python:3.6' needs to be pulled first.
[2022-12-27T17:32:17Z] DEBUG - Trying paths: ['/home/ubuntu/.docker/config.json', '/home/ubuntu/.dockercfg']
[2022-12-27T17:32:17Z] DEBUG - No config file found
[2022-12-27T17:32:17Z] DEBUG - Trying paths: ['/home/ubuntu/.docker/config.json', '/home/ubuntu/.dockercfg']
[2022-12-27T17:32:17Z] DEBUG - No config file found
[2022-12-27T17:32:17Z] DEBUG - Unhandled exception
Traceback (most recent call last):
File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.10/http/client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1328, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1277, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1037, in _send_output
self.send(msg)
File "/usr/lib/python3.10/http/client.py", line 975, in send
self.connect()
File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/transport/unixconn.py", line 30, in connect
sock.connect(self.unix_socket)
FileNotFoundError: [Errno 2] No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/requests/adapters.py", line 489, in send resp = conn.urlopen( File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen retries = retries.increment( File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request conn.request(method, url, **httplib_request_kw) File "/usr/lib/python3.10/http/client.py", line 1282, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/lib/python3.10/http/client.py", line 1328, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.10/http/client.py", line 1277, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.10/http/client.py", line 1037, in _send_output self.send(msg) File "/usr/lib/python3.10/http/client.py", line 975, in send self.connect() File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/transport/unixconn.py", line 30, in connect sock.connect(self.unix_socket) urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/api/client.py", line 214, in _retrieve_server_version return self.version(api_version=False)["ApiVersion"] File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/api/daemon.py", line 181, in version return self._result(self._get(url), json=True) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/utils/decorators.py", line 46, in inner return f(self, *args, kwargs) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/api/client.py", line 237, in _get return self.get(url, self._set_request_timeout(kwargs)) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/requests/sessions.py", line 600, in get return self.request("GET", url, kwargs) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/requests/sessions.py", line 587, in request resp = self.send(prep, send_kwargs) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/requests/sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/requests/adapters.py", line 547, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/core/cli.py", line 100, in main args.command(args) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/core/submit.py", line 15, in submit project.submit( File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/core/project.py", line 634, in submit self._add_hooks_content_to_zip(zip_file, endpoint_url, region_name) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/core/project.py", line 709, in _add_hooks_content_to_zip self._plugin.package(self, zip_file) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/python/codegen.py", line 227, in package self._build(project.root) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/python/codegen.py", line 244, in _build self._docker_build(base_path) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/python/codegen.py", line 304, in _docker_build docker_client = docker.from_env() File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/client.py", line 96, in from_env return cls( File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/client.py", line 45, in init self.api = APIClient(*args, kwargs) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/api/client.py", line 197, in init self._version = self._retrieve_server_version() File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/api/client.py", line 221, in _retrieve_server_version raise DockerException( docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory')) [2022-12-27T17:37:00Z] DEBUG - Logging set up successfully [2022-12-27T17:37:00Z] DEBUG - Running submit: Namespace(version=False, subparser_name='submit', command=<function submit at 0x7f6ba9eb6d40>, verbose=0, dry_run=True, endpoint_url=None, region=None, set_default=False, role_arn=None, use_role=True) [2022-12-27T17:37:00Z] DEBUG - Root directory: /home/ubuntu/localdev/CloudFormationCLI/myhook [2022-12-27T17:37:00Z] DEBUG - Loading project file '/home/ubuntu/localdev/CloudFormationCLI/myhook/.rpdk-config' [2022-12-27T17:37:00Z] INFO - Validating your hook specification... [2022-12-27T17:37:00Z] DEBUG - Rewriting refs in ' ' (file:///home/ubuntu/localdev/CloudFormationCLI/myhook/mycompany-testing-hook.json)
[2022-12-27T17:37:00Z] DEBUG - inputs not found. Not writing to package.
[2022-12-27T17:37:00Z] DEBUG - Hook schema target names: {'AWS::S3::Bucket', 'AWS::SQS::Queue'}
[2022-12-27T17:37:00Z] DEBUG - Resolving the following type names: {'AWS::S3::Bucket', 'AWS::SQS::Queue'}
[2022-12-27T17:37:00Z] DEBUG - Retrieving info for following target names: {'AWS::S3::Bucket', 'AWS::SQS::Queue'}
[2022-12-27T17:37:00Z] DEBUG - Retrieving info for type: AWS::S3::Bucket
[2022-12-27T17:37:00Z] DEBUG - Retrieving info for type: AWS::SQS::Queue
[2022-12-27T17:37:01Z] DEBUG - aws-s3-bucket.json found. Writing to package.
[2022-12-27T17:37:01Z] DEBUG - aws-sqs-queue.json found. Writing to package.
[2022-12-27T17:37:01Z] DEBUG - Package started
[2022-12-27T17:37:01Z] DEBUG - Removing '/home/ubuntu/localdev/CloudFormationCLI/myhook/build' folder.
[2022-12-27T17:37:01Z] DEBUG - Dependencies build started from '/home/ubuntu/localdev/CloudFormationCLI/myhook'
[2022-12-27T17:37:01Z] DEBUG - command is '/bin/bash -c "pip install --no-cache-dir --no-color --disable-pip-version-check --upgrade --requirement /project/requirements.txt --target /project/build"'
[2022-12-27T17:37:01Z] WARNING - Starting Docker build. This may take several minutes if the image 'public.ecr.aws/lambda/python:3.6' needs to be pulled first.
[2022-12-27T17:37:01Z] DEBUG - Trying paths: ['/home/ubuntu/.docker/config.json', '/home/ubuntu/.dockercfg']
[2022-12-27T17:37:01Z] DEBUG - No config file found
[2022-12-27T17:37:01Z] DEBUG - Trying paths: ['/home/ubuntu/.docker/config.json', '/home/ubuntu/.dockercfg']
[2022-12-27T17:37:01Z] DEBUG - No config file found
[2022-12-27T17:37:01Z] DEBUG - Unhandled exception
Traceback (most recent call last):
File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request
conn.request(method, url, httplib_request_kw)
File "/usr/lib/python3.10/http/client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1328, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1277, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1037, in _send_output
self.send(msg)
File "/usr/lib/python3.10/http/client.py", line 975, in send
self.connect()
File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/transport/unixconn.py", line 30, in connect
sock.connect(self.unix_socket)
PermissionError: [Errno 13] Permission denied
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/requests/adapters.py", line 489, in send resp = conn.urlopen( File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen retries = retries.increment( File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request conn.request(method, url, **httplib_request_kw) File "/usr/lib/python3.10/http/client.py", line 1282, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/lib/python3.10/http/client.py", line 1328, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.10/http/client.py", line 1277, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.10/http/client.py", line 1037, in _send_output self.send(msg) File "/usr/lib/python3.10/http/client.py", line 975, in send self.connect() File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/transport/unixconn.py", line 30, in connect sock.connect(self.unix_socket) urllib3.exceptions.ProtocolError: ('Connection aborted.', PermissionError(13, 'Permission denied'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/api/client.py", line 214, in _retrieve_server_version return self.version(api_version=False)["ApiVersion"] File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/api/daemon.py", line 181, in version return self._result(self._get(url), json=True) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/utils/decorators.py", line 46, in inner return f(self, *args, kwargs) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/api/client.py", line 237, in _get return self.get(url, self._set_request_timeout(kwargs)) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/requests/sessions.py", line 600, in get return self.request("GET", url, kwargs) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/requests/sessions.py", line 587, in request resp = self.send(prep, send_kwargs) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/requests/sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/requests/adapters.py", line 547, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', PermissionError(13, 'Permission denied'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/core/cli.py", line 100, in main args.command(args) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/core/submit.py", line 15, in submit project.submit( File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/core/project.py", line 634, in submit self._add_hooks_content_to_zip(zip_file, endpoint_url, region_name) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/core/project.py", line 709, in _add_hooks_content_to_zip self._plugin.package(self, zip_file) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/python/codegen.py", line 227, in package self._build(project.root) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/python/codegen.py", line 244, in _build self._docker_build(base_path) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/python/codegen.py", line 304, in _docker_build docker_client = docker.from_env() File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/client.py", line 96, in from_env return cls( File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/client.py", line 45, in init self.api = APIClient(*args, kwargs) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/api/client.py", line 197, in init self._version = self._retrieve_server_version() File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/api/client.py", line 221, in _retrieve_server_version raise DockerException( docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied')) [2022-12-27T17:37:38Z] DEBUG - Logging set up successfully [2022-12-27T17:37:38Z] DEBUG - Running submit: Namespace(version=False, subparser_name='submit', command=<function submit at 0x7fe0d224ed40>, verbose=0, dry_run=True, endpoint_url=None, region=None, set_default=False, role_arn=None, use_role=True) [2022-12-27T17:37:38Z] DEBUG - Root directory: /home/ubuntu/localdev/CloudFormationCLI/myhook [2022-12-27T17:37:38Z] DEBUG - Loading project file '/home/ubuntu/localdev/CloudFormationCLI/myhook/.rpdk-config' [2022-12-27T17:37:38Z] INFO - Validating your hook specification... [2022-12-27T17:37:38Z] DEBUG - Rewriting refs in ' ' (file:///home/ubuntu/localdev/CloudFormationCLI/myhook/mycompany-testing-hook.json)
[2022-12-27T17:37:38Z] DEBUG - inputs not found. Not writing to package.
[2022-12-27T17:37:38Z] DEBUG - Hook schema target names: {'AWS::SQS::Queue', 'AWS::S3::Bucket'}
[2022-12-27T17:37:38Z] DEBUG - Resolving the following type names: {'AWS::SQS::Queue', 'AWS::S3::Bucket'}
[2022-12-27T17:37:38Z] DEBUG - Retrieving info for following target names: {'AWS::SQS::Queue', 'AWS::S3::Bucket'}
[2022-12-27T17:37:38Z] DEBUG - Retrieving info for type: AWS::SQS::Queue
[2022-12-27T17:37:38Z] DEBUG - Retrieving info for type: AWS::S3::Bucket
[2022-12-27T17:37:38Z] DEBUG - aws-sqs-queue.json found. Writing to package.
[2022-12-27T17:37:38Z] DEBUG - aws-s3-bucket.json found. Writing to package.
[2022-12-27T17:37:38Z] DEBUG - Package started
[2022-12-27T17:37:38Z] DEBUG - Removing '/home/ubuntu/localdev/CloudFormationCLI/myhook/build' folder.
[2022-12-27T17:37:38Z] DEBUG - Dependencies build started from '/home/ubuntu/localdev/CloudFormationCLI/myhook'
[2022-12-27T17:37:38Z] DEBUG - command is '/bin/bash -c "pip install --no-cache-dir --no-color --disable-pip-version-check --upgrade --requirement /project/requirements.txt --target /project/build"'
[2022-12-27T17:37:38Z] WARNING - Starting Docker build. This may take several minutes if the image 'public.ecr.aws/lambda/python:3.6' needs to be pulled first.
[2022-12-27T17:37:38Z] DEBUG - Trying paths: ['/home/ubuntu/.docker/config.json', '/home/ubuntu/.dockercfg']
[2022-12-27T17:37:38Z] DEBUG - No config file found
[2022-12-27T17:37:38Z] DEBUG - Trying paths: ['/home/ubuntu/.docker/config.json', '/home/ubuntu/.dockercfg']
[2022-12-27T17:37:38Z] DEBUG - No config file found
[2022-12-27T17:37:38Z] DEBUG - Unhandled exception
Traceback (most recent call last):
File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request
conn.request(method, url, httplib_request_kw)
File "/usr/lib/python3.10/http/client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1328, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1277, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1037, in _send_output
self.send(msg)
File "/usr/lib/python3.10/http/client.py", line 975, in send
self.connect()
File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/transport/unixconn.py", line 30, in connect
sock.connect(self.unix_socket)
PermissionError: [Errno 13] Permission denied
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/requests/adapters.py", line 489, in send resp = conn.urlopen( File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen retries = retries.increment( File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request conn.request(method, url, **httplib_request_kw) File "/usr/lib/python3.10/http/client.py", line 1282, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/lib/python3.10/http/client.py", line 1328, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.10/http/client.py", line 1277, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.10/http/client.py", line 1037, in _send_output self.send(msg) File "/usr/lib/python3.10/http/client.py", line 975, in send self.connect() File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/transport/unixconn.py", line 30, in connect sock.connect(self.unix_socket) urllib3.exceptions.ProtocolError: ('Connection aborted.', PermissionError(13, 'Permission denied'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/api/client.py", line 214, in _retrieve_server_version return self.version(api_version=False)["ApiVersion"] File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/api/daemon.py", line 181, in version return self._result(self._get(url), json=True) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/utils/decorators.py", line 46, in inner return f(self, *args, kwargs) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/api/client.py", line 237, in _get return self.get(url, self._set_request_timeout(kwargs)) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/requests/sessions.py", line 600, in get return self.request("GET", url, kwargs) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/requests/sessions.py", line 587, in request resp = self.send(prep, send_kwargs) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/requests/sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/requests/adapters.py", line 547, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', PermissionError(13, 'Permission denied'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/core/cli.py", line 100, in main args.command(args) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/core/submit.py", line 15, in submit project.submit( File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/core/project.py", line 634, in submit self._add_hooks_content_to_zip(zip_file, endpoint_url, region_name) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/core/project.py", line 709, in _add_hooks_content_to_zip self._plugin.package(self, zip_file) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/python/codegen.py", line 227, in package self._build(project.root) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/python/codegen.py", line 244, in _build self._docker_build(base_path) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/rpdk/python/codegen.py", line 304, in _docker_build docker_client = docker.from_env() File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/client.py", line 96, in from_env return cls( File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/client.py", line 45, in init self.api = APIClient(*args, **kwargs) File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/api/client.py", line 197, in init self._version = self._retrieve_server_version() File "/home/ubuntu/localdev/CloudFormationCLI/env/lib/python3.10/site-packages/docker/api/client.py", line 221, in _retrieve_server_version raise DockerException( docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))