[amazon-web-services] How can I resolve the error "The security token included in the request is invalid" when running aws iam upload-server-certificate?

Try to export the correct profile i.e. $ export AWS_PROFILE="default" If you only have a default profile make sure the keys are correct and rerun aws configure