【问题标题】:AWS Cloudformation Template help for IAMIAM 的 AWS Cloudformation 模板帮助
【发布时间】:2017-06-25 14:01:41
【问题描述】:

我是在 Cloudformattion 中创建模板的新手。 我有一个要求,我需要创建一个带有密码和访问密钥的 IAM 用户,首次登录时应更改密码,应创建一个 I AM 组,在该组中应添加一组管理策略和自定义策略。

我该怎么办,请帮忙

谢谢 萨蒂什

【问题讨论】:

    标签: amazon-web-services amazon-cloudformation


    【解决方案1】:
    ---
    AWSTemplateFormatVersion: '2010-09-09'
    Description: 'IAM user'
    Parameters:
      UserName:
        Type: String
      Password:
        Type: String
        NoEcho: true
    Resources:
      Type: 'AWS::IAM::User'
        Properties: 
          LoginProfile:
            Password: !Ref Password
            PasswordResetRequired: true
          ManagedPolicyArns:
          - 'arn:aws:iam::aws:policy/AdministratorAccess'
          UserName: !Ref UserName
    

    下一次:为什么不直接使用谷歌?

    http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html,密码在 LoginProfile 中设置http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user-loginprofile.html

    【讨论】:

    • 太棒了,这很接近我的需要,如果您能建议我如何将此用户添加到组中,这将有所帮助,该组将拥有所有托管策略和自定义策略直接添加到用户。
    猜你喜欢
    • 2017-06-18
    • 2018-02-07
    • 2017-07-26
    • 2019-12-29
    • 2019-02-10
    • 2017-05-13
    • 2018-08-24
    • 2021-10-15
    • 2021-08-20
    相关资源
    最近更新 更多