After client.synthesize_speech, do response['AudioStream'].read() and write the result with open('speech.mp3', 'wb'). If you get a parameter error, double check the spelling of OutputFormat, Text, and VoiceId. Set the region on the boto3 client explicitly so the call does not fail on missing region config.

Context: Stack Overflow #56913249 (accepted answer, 4 votes): a user called synthesize_speech with boto3 but could not figure out how to save the result as an mp3 file. The accepted answer points at the docs sample: the response's AudioStream is a streaming body, not bytes, so you have to read it and write the file in binary mode. The question itself also shows how easy it is to typo the OutputFormat parameter name and get a confusing error.