windmill-labs/windmill · error · Exception
Could not generate Boto3 S3 connection settings from the pro
Error message
Could not generate Boto3 S3 connection settings from the provided resource
What it means
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.
Source
Thrown at python-client/wmill/wmill/client.py:911
def get_boto3_connection_settings(
self,
s3_resource_path: str = "",
) -> Boto3ConnectionSettings:
"""
Convenient helpers that takes an S3 resource as input and returns the settings necessary to
initiate an S3 connection using boto3
"""
s3_resource_path = parse_resource_syntax(s3_resource_path) or s3_resource_path
try:
s3_resource = self.post(
f"/w/{self.workspace}/job_helpers/v2/s3_resource_info",
json={}
if s3_resource_path == ""
else {"s3_resource_path": s3_resource_path},
).json()
return self.__boto3_connection_settings(s3_resource)
except JSONDecodeError as e:
raise Exception(
"Could not generate Boto3 S3 connection settings from the provided resource"
) from e
def load_s3_file(self, s3object: S3Object | str, s3_resource_path: str | None) -> bytes:
"""
Load a file from the workspace s3 bucket and returns its content as bytes.
'''python
from wmill import S3Object
s3_obj = S3Object(s3="/path/to/my_file.txt")
my_obj_content = client.load_s3_file(s3_obj)
file_content = my_obj_content.decode("utf-8")
'''
"""
s3object = parse_s3_object(s3object)
with self.load_s3_file_reader(s3object, s3_resource_path) as file_reader:
return file_reader.read()View on GitHub (pinned to e474e8803c)
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.
Example fix
// before settings = client.get_boto3_connection_settings(s3_resource_path='old/path') // after settings = client.get_boto3_connection_settings(s3_resource_path='') # workspace default S3 resource
Defensive patterns
Strategy: validation
Validate before calling
def s3_resource_exists(client, path):
if not path:
return True
resources = client.get(f'/w/{client.workspace}/resources/list').json()
return any(r['path'] == path and r['resource_type'] == 's3' for r in resources) Try / catch
try:
settings = client.get_boto3_connection_settings(s3_resource_path=path)
except Exception as e:
if 'Boto3 S3 connection settings' in str(e):
raise RuntimeError(f'S3 resource {path!r} invalid or missing; check workspace resources') from e
raise Prevention
- 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.
When it happens
Trigger: 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.
Common situations: Resource deleted or renamed; calling against a workspace without S3 configured; server version lacking the endpoint; invalid credentials on the S3 resource.
Related errors
- Could not generate DuckDB S3 connection settings from the pr
- Could not generate Polars S3 connection settings from the pr
- Type of file_content not supported
- Invalid s3 object URI {s3_object!r}: expected s3://<storage>
- Invalid s3 object {s3_object!r}: expected an s3://<storage>/
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/75d5d0ed0cc6cd32.
Report an issue: GitHub.