role.yaml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. AWSTemplateFormatVersion: 2010-09-09
  2. Resources:
  3. RootRole:
  4. Type: 'AWS::IAM::Role'
  5. Properties:
  6. AssumeRolePolicyDocument:
  7. Version: 2012-10-17
  8. Statement:
  9. - Effect: Allow
  10. Principal:
  11. Service:
  12. - lambda.amazonaws.com
  13. - ec2.amazonaws.com.cn
  14. - ecs-tasks.amazonaws.com
  15. - vpc-flow-logs.amazonaws.com
  16. Action:
  17. - 'sts:AssumeRole'
  18. Path: /
  19. RoleName: !Ref roleName
  20. Metadata:
  21. 'AWS::CloudFormation::Designer':
  22. id: 5a809822-8fad-40ca-bd0f-7aae64ae7b4a
  23. RolePolicies:
  24. Type: 'AWS::IAM::Policy'
  25. Properties:
  26. PolicyName: rota
  27. PolicyDocument:
  28. Version: 2012-10-17
  29. Statement:
  30. - Effect: Allow
  31. Action: '*'
  32. Resource: '*'
  33. Roles:
  34. - Ref: RootRole
  35. Metadata:
  36. 'AWS::CloudFormation::Designer':
  37. id: 41ab1589-d187-45a1-99aa-379280c9f643
  38. RootInstanceProfile:
  39. Type: 'AWS::IAM::InstanceProfile'
  40. Properties:
  41. Path: /
  42. Roles:
  43. - Ref: RootRole
  44. Metadata:
  45. 'AWS::CloudFormation::Designer':
  46. id: 15050a6e-6cfb-43ec-b19f-c3c3102187d3
  47. Parameters:
  48. roleName:
  49. Type: String
  50. Default: BaseRole