Remove newlines which the AWS SDK rejects