cleaning up logging, adding user-agent, and turning SNS message to JSON format