AWS IoT debugging notes

Trying to use a custom authorizer with mosquitto_pub on AWS IoT and getting an error like this?

Client mosq-52ek7cYR6D3C7hgp9s sending CONNECT
Error: Unrecognised command 16

Error: A network protocol error occurred when communicating with the broker.

Likely your mossquitto command is missing the --cafile AmazonRootCA1.pem option.

Want to jump to the CloudWatch logs for your default AWS IoT custom authorizer (MacOS only)?

bash -c 'open "https://console.aws.amazon.com/cloudwatch/home?region="$(aws configure get region)"#logsV2:log-groups/log-group/\$252Faws\$252Flambda\$252F"$(aws iot describe-default-authorizer --query authorizerDescription.authorizerFunctionArn --output text | sed "s/^.*:\\([^:]*\\)\$/\\1/")'