[英]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.