I have a hex representation of a binary value (e.g. "ed634d...").
Using the aws-sdk-php to deal with a dynamoDB PutItem call, how would I feed that value to it? How do I need to convert it for DynamoDB to recognize it as the bytes that are the source for that hex representation?
$this->client->putItem([
'Item' => [
'encryptedCredentials' => [
// This doesn't work. What binary representation would work here?
'B' => 'ed634d...',
],
What exception are you getting?
I was given the answer. I needed to use
'B' => hex2bin('ed634d...'),
@Leeroy Hannigan I wasn't actually getting an exception. However, another script that needed that value was choking on it.
I've posted the solution as an answer below.