这通常是因为本地环境没有正确配置所导致的。要解决这个问题,你可以尝试以下步骤:
确保你的本地环境中已经安装了AWS CLI和SNS。
通过AWS CLI登录到您的AWS帐户。你可以使用以下命令来登录:
$ aws configure
你需要输入你的AWS Access Key和AWS Secret Key。
$ aws sns create-topic --name my-topic
$ aws sns subscribe --topic-arn arn:aws:sns:us-east-1:123456789012:my-topic --protocol http --notification-endpoint http://localhost:8080/