如何重置或从头开始 aws cdk 配置?
How to reset or start from scratch aws cdk configrations?
我最近开始使用 aws cdk 作为新手。所以我 运行 很多我不知道的命令。
现在我想删除所有设置,例如我创建的环境变量或配置文件,然后从头开始。应该在 un install 中安装什么来实现?
我不太确定你要重置的是什么,但这里有一些可能有用的建议:
删除已部署的 CDK 堆栈
cdk destroy stack_name
注意:您必须为已部署的每个堆栈执行此操作。这也可以通过浏览器中 AWS 仪表板中的“CloudFormation”来完成。
删除 CLI 设置
根据https://docs.amazonaws.cn/en_us/cli/latest/userguide/cli-configure-files.html
To remove a setting, use an empty string as the value, or manually delete the setting in your config and credentials files in a text editor.
示例:
aws configure set cli_pager ""
删除配置文件
不确定您是否可以通过 CLI 轻松完成此操作,但您可以从配置文件中手动删除它们。只有两个配置文件,可以使用 https://docs.amazonaws.cn/en_us/cli/latest/userguide/cli-configure-profiles.html
找到它们
~/.aws/credentials (Linux & Mac) or %USERPROFILE%.aws\credentials (Windows)
~/.aws/config (Linux & Mac) or %USERPROFILE%.aws\config (Windows)
如果您需要有关如何撤消某些内容的更具体的帮助,请举例说明您 运行 想要撤消的具体内容。
我最近开始使用 aws cdk 作为新手。所以我 运行 很多我不知道的命令。
现在我想删除所有设置,例如我创建的环境变量或配置文件,然后从头开始。应该在 un install 中安装什么来实现?
我不太确定你要重置的是什么,但这里有一些可能有用的建议:
删除已部署的 CDK 堆栈
cdk destroy stack_name
注意:您必须为已部署的每个堆栈执行此操作。这也可以通过浏览器中 AWS 仪表板中的“CloudFormation”来完成。
删除 CLI 设置
根据https://docs.amazonaws.cn/en_us/cli/latest/userguide/cli-configure-files.html
To remove a setting, use an empty string as the value, or manually delete the setting in your config and credentials files in a text editor.
示例:
aws configure set cli_pager ""
删除配置文件
不确定您是否可以通过 CLI 轻松完成此操作,但您可以从配置文件中手动删除它们。只有两个配置文件,可以使用 https://docs.amazonaws.cn/en_us/cli/latest/userguide/cli-configure-profiles.html
找到它们~/.aws/credentials (Linux & Mac) or %USERPROFILE%.aws\credentials (Windows)
~/.aws/config (Linux & Mac) or %USERPROFILE%.aws\config (Windows)
如果您需要有关如何撤消某些内容的更具体的帮助,请举例说明您 运行 想要撤消的具体内容。