<@ULVA73B9P> I get this error when my flow runs ar...
# ask-marvin
g
@Marvin I get this error when my flow runs are trying to publish the results to IBM Cloud Object Storage. Please note that the connection is setup through an "S3 Storage" block with AWS credentials and IBM COS service credential is setup to have HMAC access to it should be AWS compatible. Why do I still get this and how to solve. "Encountered an error while persisting result: An error occurred (InvalidRequest) when calling the PutObject operation: The V4 Content sha256 value is not supported. Execution will continue, but the result has not been persisted" I get this in my worker
m
đź”§ Using:
explore_module_offerings
📊 Tools used: •
explore_module_offerings
(4x)
đź”§ Using:
explore_module_offerings
📊 Tools used: •
explore_module_offerings
(4x) •
read_github_issues
(6x) •
research_prefect_topic
(12x) •
search_prefect_3x_docs
(18x)
g
@Marvin I get this error when my flow runs are trying to publish the results to IBM Cloud Object Storage. Please note that the connection is setup through an "S3 Storage" block with AWS credentials and IBM COS service credential is setup to have HMAC access to it should be AWS compatible. Why do I still get this and how to solve.
Copy code
"Encountered an error while persisting result: An error occurred (InvalidRequest) when calling the PutObject operation: The V4 Content sha256 value is not supported. Execution will continue, but the result has not been persisted"
I get this in my worker
m
❌ Error: No module named 'prefect_aws.s3'
đź”§ Using:
explore_module_offerings
📊 Tools used: •
explore_module_offerings
(5x)
g
@Marvin why do you keep replying with "Error: No module named 'prefect_aws.s3'"?
m
âś… thought for 96.0 seconds
Short answer: because the environment I run checks in doesn’t have the optional AWS plugin installed. When I try to verify examples that import
prefect_aws.s3
, it throws “No module named 'prefect_aws.s3'”. Cheerful, I know. If you’re seeing that error on your side, here’s how to fix it (Prefect 3.x): 1) Install the AWS integration
Copy code
pip install prefect-aws
# or
uv add prefect-aws
# or with conda/mamba
mamba install -c conda-forge prefect-aws
2) Use the correct import path
Copy code
from prefect_aws.s3 import S3Bucket
from prefect_aws.credentials import AwsCredentials
3) Minimal example
Copy code
from prefect_aws.s3 import S3Bucket
from prefect_aws.credentials import AwsCredentials

aws = AwsCredentials()  # or AwsCredentials.load("my-aws-creds")
s3 = S3Bucket(bucket_name="my-bucket", credentials=aws)

# e.g., write a file
s3.write_path("folder/hello.txt", b"hi there")
4) If it only fails in your workers/runners - Process worker: install
prefect-aws
in the same environment as the worker. - Docker/Kubernetes worker: bake
prefect-aws
into the image (e.g., add
pip install prefect-aws
to your Dockerfile) and redeploy. Useful links: - Prefect AWS collection repo: Prefect AWS (GitHub) - API/usage docs: prefect-aws docs - PyPI: prefect-aws on PyPI If you tell me your setup (Prefect version, how you run flows, and where the error appears), I’ll point you to the exact install step you need. And I’ll stop poking
prefect_aws
in my sandbox unless you ask me to.