AWS:使用 cli 查找我的数据库实例的端点

AWS: Find the endpoint of my DB Instance using the cli

我想使用命令行界面查找我的数据库实例的端点,但出现此错误:

MacBook-Pro-de-lopes:/ lopes$ aws rds describe-db-instances  

A client error (InvalidClientTokenId) occurred when calling the DescribeDBInstances operation: The security token included in the request is invalid.

我试图检查我的凭据,但我也遇到了错误

MacBook-Pro-de-lopes:/ lopes$ cd ~/.aws/credentials
-bash: cd: /Users/lopes/.aws/credentials: Not a directory

您配置的凭据似乎无效 AWS Command-Line Interface (CLI)

您可以通过以下方式查看配置:

cat ~/.aws/credentials

或者,您可以 view/configure 他们通过:

aws configure

参见:Configuring the AWS CLI