Skip to content

Commit bafd4d1

Browse files
authored
Merge branch 'aws-samples:main' into sra-bedrock-guardrails
2 parents dea7687 + 9ecacb6 commit bafd4d1

File tree

2 files changed

+5
-28
lines changed

2 files changed

+5
-28
lines changed

aws_sra_examples/solutions/config/config_management_account/templates/sra-config-management-account-role.yaml

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -44,31 +44,8 @@ Parameters:
4444
Type: String
4545

4646
Resources:
47-
rConfigRecorderRole:
48-
Metadata:
49-
cfn_nag:
50-
rules_to_suppress:
51-
- id: W28
52-
reason: Explicit name provided
53-
Type: AWS::IAM::Role
47+
rConfigServiceLinkedRole:
48+
Type: AWS::IAM::ServiceLinkedRole
5449
Properties:
55-
RoleName: !Sub ${pManagedResourcePrefix}-ConfigRecorderRole
56-
Description: Role for AWS Config Recorder
57-
AssumeRolePolicyDocument:
58-
Version: 2012-10-17
59-
Statement:
60-
- Effect: Allow
61-
Action: sts:AssumeRole
62-
Principal:
63-
Service:
64-
- config.amazonaws.com
65-
ManagedPolicyArns:
66-
- !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWS_ConfigRole
67-
Tags:
68-
- Key: !Ref pSRASolutionTagKey
69-
Value: !Ref pSRASolutionName
70-
71-
Outputs:
72-
oConfigRecorderRoleArn:
73-
Description: Config Recorder Role ARN
74-
Value: !GetAtt rConfigRecorderRole.Arn
50+
AWSServiceName: config.amazonaws.com
51+
Description: A service-linked role for the ConfigRecorder.

aws_sra_examples/solutions/config/config_management_account/templates/sra-config-management-account.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ Resources:
165165
Type: AWS::Config::ConfigurationRecorder
166166
Properties:
167167
Name: !Sub ${pManagedResourcePrefix}-BaselineConfigRecorder
168-
RoleARN: !Sub arn:${AWS::Partition}:iam::${AWS::AccountId}:role/${pManagedResourcePrefix}-ConfigRecorderRole
168+
RoleARN: !Sub arn:${AWS::Partition}:iam::${AWS::AccountId}:role/aws-service-role/config.amazonaws.com/AWSServiceRoleForConfig
169169
RecordingGroup:
170170
AllSupported: !Ref pAllSupported
171171
IncludeGlobalResourceTypes: !If

0 commit comments

Comments
 (0)