本文介绍了AWS:Beanstalk 错误:操作被拒绝.您的权限是否正确?使用 EB CLI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

第一次尝试 AWS 托管.我正在使用 python3.4 eb CLI.对于 eb init,我总是得到相同的错误输出.在同一用户的模拟器上,允许所有操作.我哪里错了?为什么我总是收到错误:操作被拒绝.您的权限是否正确?

Trying AWS hosting for the first time. Am using python3.4 eb CLI. Am always getting same Error output for eb init. On simulator for the same user all actions are allowed. Where am I going wrong? Why do I always get ERROR: Operation Denied. Are your permissions correct?

使用pip安装eb cli.任何指示都会有所帮助.

Used pip to install eb cli. Any pointers will be helpful.

推荐答案

这看起来像是您使用的凭据具有有限的权限.

This looks like the credentials you are using have limited permissions.

当您首次设置 EB CLI 或运行 aws configure 时,系统会提示您输入 AWS 访问密钥 ID 和 AWS 秘密访问密钥.这些是特定 root 帐户或 的凭据密钥IAM 用户.最佳做法是使用 IAM 用户进行大多数访问.

When you first setup the EB CLI, or run aws configure, you will be prompted for your AWS Access Key ID and AWS Secret Access Key. These are the credential keys for a specific root account or IAM User. It is best practice to use an IAM User for most access.

如果您已经为 CLI 设置了凭据,您可以在 ~/.aws/config~/.aws/credentials 文件中检查它们.

If you have already setup your credentials for the CLI you can check them either in the ~/.aws/config or ~/.aws/credentials file.

~/.aws/credentials 的示例如下:

[default]
aws_access_key_id = AKIAIOSFODNN7EXAMPLE
aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

[limited]
aws_access_key_id = AKIAIOSFODNN7EXAMPLE
aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

默认情况下,如果没有在命令行中指定配置文件,将使用 [default] 选项下的凭据.如果您希望使用特定的凭据配置文件,您可以像这样指定它们:eb init --profile limited.

By default the credentials under the [default] option will be used if no profile is specified in the command line. If you wish to use a specific profile of credentials you can specify them like this: eb init --profile limited.

您可以通过 IAM 控制台,您可以从那里查看已授予用户的权限.您还可以在此控制台中为该用户添加权限.

You can search for the credentials being used via the IAM console, from there you can view which permissions have been granted to your user. You can also add permissions for that user in this console.

这篇关于AWS:Beanstalk 错误:操作被拒绝.您的权限是否正确?使用 EB CLI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 18:19