{"record":{"id":"75d5d0ed0cc6cd32","repo":"windmill-labs/windmill","slug":"could-not-generate-boto3-s3-connection-settings-fr","errorCode":null,"errorMessage":"Could not generate Boto3 S3 connection settings from the provided resource","messagePattern":"Could not generate Boto3 S3 connection settings from the provided resource","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"python-client/wmill/wmill/client.py","lineNumber":911,"sourceCode":"    def get_boto3_connection_settings(\n        self,\n        s3_resource_path: str = \"\",\n    ) -> Boto3ConnectionSettings:\n        \"\"\"\n        Convenient helpers that takes an S3 resource as input and returns the settings necessary to\n        initiate an S3 connection using boto3\n        \"\"\"\n        s3_resource_path = parse_resource_syntax(s3_resource_path) or s3_resource_path\n        try:\n            s3_resource = self.post(\n                f\"/w/{self.workspace}/job_helpers/v2/s3_resource_info\",\n                json={}\n                if s3_resource_path == \"\"\n                else {\"s3_resource_path\": s3_resource_path},\n            ).json()\n            return self.__boto3_connection_settings(s3_resource)\n        except JSONDecodeError as e:\n            raise Exception(\n                \"Could not generate Boto3 S3 connection settings from the provided resource\"\n            ) from e\n\n    def load_s3_file(self, s3object: S3Object | str, s3_resource_path: str | None) -> bytes:\n        \"\"\"\n        Load a file from the workspace s3 bucket and returns its content as bytes.\n\n        '''python\n        from wmill import S3Object\n\n        s3_obj = S3Object(s3=\"/path/to/my_file.txt\")\n        my_obj_content = client.load_s3_file(s3_obj)\n        file_content = my_obj_content.decode(\"utf-8\")\n        '''\n        \"\"\"\n        s3object = parse_s3_object(s3object)\n        with self.load_s3_file_reader(s3object, s3_resource_path) as file_reader:\n            return file_reader.read()","sourceCodeStart":893,"sourceCodeEnd":929,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/python-client/wmill/wmill/client.py#L893-L929","documentation":"get_boto3_connection_settings() converts an S3 resource into Boto3 client settings through a server endpoint; if the response cannot be parsed as JSON it raises this wrapped Exception. Same family as the DuckDB/Polars variants: the S3 resource lookup or settings generation failed server-side.","triggerScenarios":"get_boto3_connection_settings(s3_resource_path='...') with a missing/nonexistent resource, wrong resource type, broken workspace S3 setup, or server returning a non-JSON error response.","commonSituations":"Resource deleted or renamed; calling against a workspace without S3 configured; server version lacking the endpoint; invalid credentials on the S3 resource.","solutions":["Verify the s3_resource_path exists and is an s3-typed resource in the workspace.","Pass '' to use the workspace default S3 resource if configured.","Check server logs / retry capturing the raw response to see the real error body.","Recreate or fix the S3 resource and its credentials."],"exampleFix":"// before\nsettings = client.get_boto3_connection_settings(s3_resource_path='old/path')\n// after\nsettings = client.get_boto3_connection_settings(s3_resource_path='')  # workspace default S3 resource","handlingStrategy":"validation","validationCode":"def s3_resource_exists(client, path):\n    if not path:\n        return True\n    resources = client.get(f'/w/{client.workspace}/resources/list').json()\n    return any(r['path'] == path and r['resource_type'] == 's3' for r in resources)","typeGuard":null,"tryCatchPattern":"try:\n    settings = client.get_boto3_connection_settings(s3_resource_path=path)\nexcept Exception as e:\n    if 'Boto3 S3 connection settings' in str(e):\n        raise RuntimeError(f'S3 resource {path!r} invalid or missing; check workspace resources') from e\n    raise","preventionTips":["Verify the S3 resource path/type in the workspace Resources page first.","Reuse one verified resource path constant across DuckDB/Polars/Boto3 calls.","Fall back to the default S3 resource (s3_resource_path='') if the named one is gone."],"tags":["boto3","s3","resources","python"],"backgroundTag":"invalid-resource-configuration","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}