Describe the bug
In the Lambda ruby3.4 runtime using the latest version of the aws-sdk-states gem, the states:GetExecutionHistory encounters a JSON parsing error if the execution history contains unicode characters.
Regression Issue
Expected Behavior
Aws::States::Client.new.get_execution_history(execution_arn: 'arn:aws...') should succeed
Current Behavior
When a Step Function state machine's execution history contains an emdash (Unicode U+2014) the Ruby SDK throws an error parsing the JSON response.
/var/lang/lib/ruby/gems/3.4.0/gems/json-2.10.2/lib/json/common.rb:248:in 'String#encode': "\xE2" on US-ASCII (Encoding::InvalidByteSequenceError)
Reproduction Steps
- Create a state machine that contains an emdash (—) character in its output or variable assignment
- Create an execution for the state machine and take note of the execution ARN
- Open Lambda ruby3.4 runtime shell:
docker run --rm -it --entrypoint=bash public.ecr.aws/lambda/ruby
- Install the states gem:
gem install aws-sdk-states
- Open an IRB session:
irb
- Try to get the execution history:
Aws::States::Client.new.get_execution_history(execution_arn: 'arn:aws:...')
- See error
Possible Solution
No response
Additional Information/Context
No response
Gem name ('aws-sdk', 'aws-sdk-resources' or service gems like 'aws-sdk-s3') and its version
aws-sdk-states
Environment details (Version of Ruby, OS environment)
Lambda ruby3.4
Describe the bug
In the Lambda
ruby3.4runtime using the latest version of theaws-sdk-statesgem, thestates:GetExecutionHistoryencounters a JSON parsing error if the execution history contains unicode characters.Regression Issue
Expected Behavior
Aws::States::Client.new.get_execution_history(execution_arn: 'arn:aws...')should succeedCurrent Behavior
When a Step Function state machine's execution history contains an emdash (Unicode U+2014) the Ruby SDK throws an error parsing the JSON response.
Reproduction Steps
docker run --rm -it --entrypoint=bash public.ecr.aws/lambda/rubygem install aws-sdk-statesirbAws::States::Client.new.get_execution_history(execution_arn: 'arn:aws:...')Possible Solution
No response
Additional Information/Context
No response
Gem name ('aws-sdk', 'aws-sdk-resources' or service gems like 'aws-sdk-s3') and its version
aws-sdk-states
Environment details (Version of Ruby, OS environment)
Lambda ruby3.4