You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm trying to generate a presigned URL for "select_object_content" ClientMethod. In the docs, it says to pass the Params as normally passed to ClientMethod, but I get a JSONDecodeError: Expecting value: line 1 column 1 (char 0) upon doing so. Here is the code to reproduce:
request_url=s3_client.generate_presigned_url(
ClientMethod="select_object_content",
Params=dict(
Bucket=bucket,
Key=key,
ExpressionType="SQL",
Expression=f"select s.* from S3Object s limit 10",
InputSerialization={"Parquet": {}},
OutputSerialization={"JSON": {}},
),
HttpMethod="GET",
)
If I try to send InputSerialization and OutputSerialization as JSON strings, I get a ParamValidationError: Parameter validation failed: Invalid type for parameter InputSerialization, value: {"Parquet": {}}, type: <class 'str'>, valid types: <class 'dict'> Invalid type for parameter OutputSerialization, value: {"JSON": {}}, type: <class 'str'>, valid types: <class 'dict'>
request_url=s3_client.generate_presigned_url(
ClientMethod="select_object_content",
Params=dict(
Bucket=bucket,
Key=key,
ExpressionType="SQL",
Expression=f"select s.* from S3Object s limit 10",
InputSerialization='{"Parquet": {}}',
OutputSerialization='{"JSON": {}}',
),
HttpMethod="GET",
)
What is the proper way to pass in InputSerialization and OutputSerialization?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I'm trying to generate a presigned URL for "select_object_content"
ClientMethod
. In the docs, it says to pass theParams
as normally passed toClientMethod
, but I get aJSONDecodeError: Expecting value: line 1 column 1 (char 0)
upon doing so. Here is the code to reproduce:If I try to send InputSerialization and OutputSerialization as JSON strings, I get a
ParamValidationError: Parameter validation failed: Invalid type for parameter InputSerialization, value: {"Parquet": {}}, type: <class 'str'>, valid types: <class 'dict'> Invalid type for parameter OutputSerialization, value: {"JSON": {}}, type: <class 'str'>, valid types: <class 'dict'>
What is the proper way to pass in
InputSerialization
andOutputSerialization
?Beta Was this translation helpful? Give feedback.
All reactions