AWSTemplateFormatVersion: '2010-09-09'
Resources:
createIAMUser:
Type: AWS::IAM::User
Properties:
Groups:
- 추가 할 그룹
LoginProfile:
Password: 사용자패스워드
UserName:
!Join
- ''
- - !Ref 'AWS::Region'
- '_'
- !Ref 'UserName'
createAccessKey:
Type: AWS::IAM::AccessKey
Properties:
Status: Active
UserName:
!Join
- ''
- - !Ref 'AWS::Region'
- '_'
- !Ref 'UserName'
DependsOn: createIAMUser
Parameters:
UserName:
Description: UserName for IAM
Type: String
Outputs:
IAMtest:
Value:
!Join
- ''
- - !Ref createAccessKey
- ' and '
- !GetAtt createAccessKey.SecretAccessKey
참고: https://docs.aws.amazon.com/ko_kr/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html