-3

我正在尝试执行一些 AWS 命令​​,但我使用了错误的 IAM 用户配置文件。因此,当我运行命令时,我会收到以下消息:

调用 CreateFunction 操作时发生错误 (AccessDeniedException):用户:arn:aws:iam::9999999999999:user/xxxxxxxxxxxxxx 无权执行:lambda:CreateFunction on resource:arn:aws:lambda:eu-west-1: 99999999999:功能:zzzzzzzzzzzzzz

如何退出此 IAM 用户配置文件,然后转到另一个有效的配置文件?

我已尝试清除我的 .aws/credentials 文件并再次运行该命令,但我似乎永久卡在这个不正确的配置文件上!

4

2 回答 2

0

Try running aws configure and see if the credentials configured corresponding to default profile is correct or not,

Next potential point can be the user that you are using from CLI doesn't have permission to perform create function. Try https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-awscli.html

于 2021-05-23T16:56:03.923 回答
-1

已修复环境变量设置为错误的 AWS 配置文件

于 2021-05-23T17:05:42.480 回答