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
{{ message }}
Repository navigation
Attempting to serialize bytes type causes error #5660
Describe the bug
When attempting to call the invoke function with a bytes object in the body, it throws an error during serialization. This is because bytes are not treated as a primitive.
Fixed in #5736, released in v3.11.0. bytes is now treated as a primitive in the serializer (is_not_primitive includes bytes), so serialize({"body": b'1'}) returns {'body': b'1'} as expected — verified against your repro. You were on 3.6.0, which predates the fix; please upgrade to v3.11.0 or later. Closing as resolved.
Activity
[-]attempting to serialize bytes type causes Error[/-][+]Attempting to serialize bytes type causes error[/+]fix: Attempting to serialize bytes type causes error (aws#5660)
mohamedzeidan2021 commentedon Sep 1, 2026
Fixed in #5736, released in v3.11.0.
bytesis now treated as a primitive in the serializer (is_not_primitiveincludesbytes), soserialize({"body": b'1'})returns{'body': b'1'}as expected — verified against your repro. You were on 3.6.0, which predates the fix; please upgrade to v3.11.0 or later. Closing as resolved.