Skip to content

Commit 47960b1

Browse files
authored
Merge branch 'aws-samples:main' into ebs_sts_regional_endpoint
2 parents 724e5fb + d7d71f9 commit 47960b1

File tree

4 files changed

+16
-29
lines changed

4 files changed

+16
-29
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

aws_sra_examples/utils/packaging_scripts/stage_solution.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,21 +404,31 @@ if [ "$solution_directory" != "none" ]; then
404404
solution_name="sra-"$(tr '_' '-' <<<"$solution_name_snake_case")
405405
solution_lambda_s3_prefix="$solution_name/lambda_code"
406406
solution_templates_s3_prefix="$solution_name/templates"
407+
# added for layer code
408+
solution_layer_s3_prefix="$solution_name/layer_code"
407409

408410
package_and_stage_common_solutions
409411
create_solution_staging_folder "$solution_templates_s3_prefix" "$solution_lambda_s3_prefix"
412+
# added for layer code
413+
create_solution_staging_layer_folder "$solution_layer_s3_prefix"
410414

411415
staging_templates_folder="$STAGING_FOLDER/$solution_templates_s3_prefix" || exit 1
412416
staging_lambda_folder="$STAGING_FOLDER/$solution_lambda_s3_prefix" || exit 1
417+
# added for layer code
418+
staging_layer_folder="$STAGING_FOLDER/$solution_layer_s3_prefix" || exit 1
413419
echo "------------------------------------------------------------"
414420
echo "-- Solution: $solution_name"
415421
echo "------------------------------------------------------------"
416422
stage_cloudformation_templates "$solution_directory" "$staging_templates_folder"
417423
package_and_stage_lambda_code "$solution_directory" "$staging_lambda_folder" "$solution_name"
424+
# added for layer code
425+
package_and_stage_layer_code "$solution_directory" "$staging_layer_folder" "$solution_name"
418426

419427
if [ -n "$BUCKET_ACL" ]; then
420428
upload_cloudformation_templates "$staging_templates_folder" "$solution_templates_s3_prefix"
421429
upload_lambda_code "$staging_lambda_folder" "$solution_lambda_s3_prefix"
430+
# added for layer code
431+
upload_layer_code "$staging_layer_folder" "$solution_layer_s3_prefix"
422432

423433
cd "$staging_lambda_folder" || exit 1
424434
update_lambda_functions "$solution_lambda_s3_prefix"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pytest-xdist = "^3.1.0"
1919
black = "^22.12.0"
2020
isort = "^5.11.4"
2121
rope = "^1.7.0"
22-
mypy = "^0.991"
22+
mypy = "^1.13.0"
2323
flake8 = "5.0.4" # Leaving at 5.0.4 until full dependency support (e.g. flake8-eradicate, flake8-broken-line, dlint)
2424
darglint = "^1.8.1"
2525
dlint = "^0.13.0"

0 commit comments

Comments
 (0)