简体   繁体   English

IAM 角色未分配实例配置文件

[英]IAM role is not assigned an instance profile

I'm trying to export my table from DynamoDB to S3.我正在尝试将我的表从 DynamoDB 导出到 S3。 Following the documentation here I created the two roles needed for the pipeline, DataPipelineDefaultRole and DataPipelineDefaultResourceRole.按照此处的文档,我创建了管道所需的两个角色,DataPipelineDefaultRole 和 DataPipelineDefaultResourceRole。 After trying to execute the pipeline, I discovered that my DataPipelineDefaultRole was not created with an instance profile.在尝试执行管道后,我发现我的 DataPipelineDefaultRole 不是使用实例配置文件创建的。

I've been looking through forums and Amazon says that people receive errors like this when they create their IAM Roles through the CLI.我一直在浏览论坛,亚马逊说人们在通过 CLI 创建他们的 IAM 角色时会收到这样的错误。 Their recommendation is to create the roles through the console and then the instance profile will be attached to the roll automatically.他们的建议是通过控制台创建角色,然后实例配置文件将自动附加到卷中。 I'm creating the role through the console but for the DataPipelineDefaultRole, there is no instance profile attached?我正在通过控制台创建角色,但对于 DataPipelineDefaultRole,没有附加实例配置文件?

Is there a way to manually attach an instance profile?有没有办法手动附加实例配置文件? Or am I missing something that is causing this to not auto-generate?还是我错过了导致它无法自动生成的东西?

This might help:这可能会有所帮助:

https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html

It highlights info about instance profiles and namely how to create if you already have existing roles etc. I think this might be what you're looking for.它突出了有关实例配置文件的信息,即如果您已经拥有现有角色等如何创建。我认为这可能是您正在寻找的。

ie . IE 。

aws iam create-instance-profile --instance-profile-name DataPipelineDefaultRole

then然后

aws iam add-role-to-instance-profile --role-name DataPipelineDefaultRole --instance-profile-name DataPipelineDefaultRole

I have test the solution by Liam and it's working fine.我已经测试了 Liam 的解决方案,它工作正常。

aws iam create-instance-profile --instance-profile-name DataPipelineDefaultRole

aws iam add-role-to-instance-profile add-role-to-instance-profile --role-name DataPipelineDefaultRole --instance-profile-name DataPipelineDefaultRole 

and there typo on the command provided should not repeat aws I am again.并且提供的命令上的错字不应该重复我再次出现的aws。

reference: https://docs.aws.amazon.com/cli/latest/reference/iam/add-role-to-instance-profile.html参考: https ://docs.aws.amazon.com/cli/latest/reference/iam/add-role-to-instance-profile.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AWS实例配置文件与IAM用户角色 - AWS instance profile vs IAM user role 将 IAM 角色附加到实例配置文件时出错 - Error Attaching IAM Role to an Instance Profile AWS 实例配置文件与 IAM 角色? 为什么不直接分配角色? - AWS instance profile vs IAM role? Why not directly assign a role? 从实例配置文件中检索IAM角色以与v4签名者一起使用 - Retrieve IAM Role from Instance Profile for Use With v4 Signer AWS associate-iam-instance-profile function,实例需要什么 IAM 角色? - AWS associate-iam-instance-profile function, what IAM role is required for the instance? IAM角色和实例配置文件 - IAM Roles and instance profile CDK cloud9 - 如何将预先构建的实例配置文件附加到 cdk 中的 Cloud9 实例 iam 角色? - CDK cloud9 - How to attach preconstructed instance profile to Cloud9 instance iam role in cdk? IAM 权限不足。 无法确定实例配置文件“aws-elasticbeanstalk-ec2-role”是否存在 - Insufficient IAM privileges. Unable to determine if instance profile 'aws-elasticbeanstalk-ec2-role' exists IAM 实例配置文件名称无效 - Invalid IAM Instance Profile name 从已在分配了IAM角色的Amazon EC2实例上运行的C#.NET应用程序为联合用户创建STS令牌 - Creating STS tokens for federated users from a C# .NET application running on an Amazon EC2 instance that's been assigned an IAM Role
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM