role.yaml 884 B

123456789101112131415161718192021222324252627282930313233
  1. AWSTemplateFormatVersion: "2010-09-09"
  2. Description: Amazon S3 Find and Forget Data Access IAM Role (uksb-1qjminsba)
  3. Parameters:
  4. SourceAccountId:
  5. Type: String
  6. Description: The ID of the AWS account in which the S3F2 solution is deployed
  7. AllowedPattern: "^[0-9]{12}$"
  8. Resources:
  9. Role:
  10. Type: "AWS::IAM::Role"
  11. Properties:
  12. RoleName: S3F2DataAccessRole
  13. AssumeRolePolicyDocument:
  14. Version: "2012-10-17"
  15. Statement:
  16. - Effect: "Allow"
  17. Principal:
  18. AWS:
  19. - !Sub "arn:${AWS::Partition}:iam::${SourceAccountId}:root"
  20. Action: "sts:AssumeRole"
  21. - Effect: "Allow"
  22. Principal:
  23. AWS:
  24. - !Sub "arn:${AWS::Partition}:iam::${SourceAccountId}:root"
  25. Action: "sts:TagSession"
  26. Outputs:
  27. RoleArn:
  28. Value: !GetAtt Role.Arn
  29. RoleName:
  30. Value: !Ref Role