Error producing records that are read from International Stream

This is a practice lab, so the solution code is provided, but this is just the output. If the datastream is “USA,” the records are written successfully; but if it’s “International,” there’s an error reading each record. I double-checked the code against the solution, and it’s identical. Here is the log of the read info and then the error when writing a record:
Read User Session {
‘session_id’: ‘f1f80298-1d88-4098-8094-ceb1c666af30’,
‘customer_number’: 250,
‘city’: ‘Amsterdam’,
‘country’: ‘Netherlands’,
‘credit_limit’: 69126,
‘browse_history’: [
{‘product_code’: ‘S24_2972’, ‘quantity’: ‘6’, ‘in_shopping_cart’: False},
{‘product_code’: ‘S24_3969’, ‘quantity’: ‘5’, ‘in_shopping_cart’: True},
{‘product_code’: ‘S700_2047’, ‘quantity’: ‘5’, ‘in_shopping_cart’: True},
{‘product_code’: ‘S18_2238’, ‘quantity’: ‘6’, ‘in_shopping_cart’: True}]}
from Shard shardId-000000000002 at position 49663610404079420682966555204251411191511788918086303778
2025-05-25 00:45:02 root ERROR

{‘message’: ‘Error producing record’, ‘error’: “‘International’”, ‘record’: {
‘session_id’: ‘f1f80298-1d88-4098-8094-ceb1c666af30’,
‘customer_number’: 250,
‘city’: ‘Amsterdam’,
‘country’: ‘Netherlands’,
‘credit_limit’: 69126,
‘browse_history’: [
{‘product_code’: ‘S24_2972’, ‘quantity’: ‘6’, ‘in_shopping_cart’: False},
{‘product_code’: ‘S24_3969’, ‘quantity’: ‘5’, ‘in_shopping_cart’: True},
{‘product_code’: ‘S700_2047’, ‘quantity’: ‘5’, ‘in_shopping_cart’: True},
{‘product_code’: ‘S18_2238’, ‘quantity’: ‘6’, ‘in_shopping_cart’: True}],
‘processing_timestamp’: datetime.datetime(2025, 5, 25, 0, 45, 2, 728434),
‘overall_product_quantity’: 22,
‘overall_in_shopping_cart’: 16,
‘total_different_products’: 4}
}

Hello @DarcieG
In which step of the lab are you getting this error?

2.2.9

@DarcieG I used the solution files, and here are the outputs for that command.


As you can see, there are no errors, and both USA and international records are being read successfully. Maybe your Kinesis data stream stopped working for some temporary outage before you got into this step.

Hm, I tried it more than once. And the US records came out fine–is it possible that the kinesis stream wasn’t working for writing to the international stream but worked for writing to the USA one?

@DarcieG yes, it’s possible. Using name of one stream instead of the other in a single instance might be the problem.