我正在CloudFormation中创建一个系统管理器补丁基准,以自动为我的Windows EC2实例应用操作系统更新:
Windows2016PatchBaseline:
Type: AWS::SSM::PatchBaseline
Properties:
Name: Windows2016PatchBaseline
Description: Baseline containing all updates approved for Windows 2016 instances
OperatingSystem: WINDOWS
PatchGroups:
- Windows Server 2016 Base
ApprovalRules:
PatchRules:
- PatchFilterGroup:
PatchFilters:
- Values:
- Critical
- Important
- Moderate
Key: MSRC_SEVERITY
- Values:
- SecurityUpdates
- CriticalUpdates
Key: CLASSIFICATION
- Values:
- WindowsServer2016
Key: PRODUCT
ApproveAfterDays: 7
ComplianceLevel: CRITICAL但是,我可以看到有一个predefined baseline完成了大部分配置。我想使用这个预定义的基线,而不是创建自己的基线,但我看不到在CloudFormation的AWS::SSM::PatchBaseline中使用它的任何方法。
以前有没有人这样做过,或者可能只通过控制台才能使用?
发布于 2019-10-26 05:27:03
以下是您要查找的内容:
MaintenanceWindowRunCommandTask:
Type: 'AWS::SSM::MaintenanceWindowTask'
Properties:
WindowId: !Ref MaintenanceWindow
Targets:
- Key: WindowTargetIds
Values:
- !Ref MaintenanceWindowTarget
TaskArn: AWS-RunPatchBaseline
TaskType: RUN_COMMAND
TaskInvocationParameters:
MaintenanceWindowRunCommandParameters:
DocumentHash: 945ae15356b0f6ba7bce2a738101b8822cedef3bf5c027abc3bb9023aaec8b1b
DocumentHashType: Sha256
NotificationConfig:
NotificationArn: !Ref MaintenanceTargetSNSARN
NotificationEvents:
- All
NotificationType: Command
OutputS3BucketName: !Ref MaintenanceRunCommandS3Bucket
OutputS3KeyPrefix: !Ref MaintenanceRunCommandS3BucketPrefix看看我这里的SystemsManager模板:https://github.com/Talderon/AWS_CloudFormation/tree/master/SystemsManager
请查看我的存储库中的WIKI页面,因为我也记录了那里的所有内容。
https://stackoverflow.com/questions/58371701
复制相似问题