简体   繁体   中英

AWS Cloudformation Template help for IAM

I am new to creating templates in Cloudformattion. I have a requirement where i Need to create a IAM user with password and access keys , password should be changed upon first time login , a I AM group should be create where in the group a set of manageg policy and custom policy should be added .

How do I go with this , please help

Thanks satish

---
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

next time: why not just use google?

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html and the password is set in the LoginProfile http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user-loginprofile.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM