When using put_intent to update an existing intent, I provide the checksum in this way:
checksum = lex_client.get_intent(name=intent_name, version='$LATEST')['checksum']
and then use the checksum with put_intent:
lex_client.put_intent(
name=name,
slots=slots,
sampleUtterances=utterances,
checksum=checksum
)
The exception thrown is:
botocore.errorfactory.BadRequestException: An error occurred (BadRequestException) when calling the PutIntent operation: The fulfillment is not valid for intent 'TotalWasteForItem'. Specify another fullfillment.
Intent does not have multiple versions, '$LATEST' is the only one. Checksum is returned normally and is of type str.