id
stringlengths 8
78
| source
stringclasses 743
values | chunk_id
int64 1
5.05k
| text
stringlengths 593
49.7k
|
---|---|---|---|
systems-manager-api-226
|
systems-manager-api.pdf
| 226 |
Required: Yes See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 Tag API Version 2014-11-06 1262 AWS Systems Manager API Reference See Also API Version 2014-11-06 1263 AWS Systems Manager Target API Reference An array of search criteria that targets managed nodes using a key-value pair that you specify. Note One or more targets must be specified for maintenance window Run Command-type tasks. Depending on the task, targets are optional for other maintenance window task types (Automation, AWS Lambda, and AWS Step Functions). For more information about running tasks that don't specify targets, see Registering maintenance window tasks without targets in the AWS Systems Manager User Guide. Supported formats include the following. For all Systems Manager tools: • Key=tag-key,Values=tag-value-1,tag-value-2 For Automation and Change Manager: • Key=tag:tag-key,Values=tag-value • Key=ResourceGroup,Values=resource-group-name • Key=ParameterValues,Values=value-1,value-2,value-3 • To target all instances in the AWS Region: • Key=AWS::EC2::Instance,Values=* • Key=InstanceIds,Values=* For Run Command and Maintenance Windows: • Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3 • Key=tag:tag-key,Values=tag-value-1,tag-value-2 • Key=resource-groups:Name,Values=resource-group-name • Additionally, Maintenance Windows support targeting resource types: • Key=resource-groups:ResourceTypeFilters,Values=resource- type-1,resource-type-2 Target API Version 2014-11-06 1264 AWS Systems Manager For State Manager: API Reference • Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3 • Key=tag:tag-key,Values=tag-value-1,tag-value-2 • To target all instances in the AWS Region: • Key=InstanceIds,Values=* For more information about how to send commands that target managed nodes using Key,Value parameters, see Targeting multiple managed nodes in the AWS Systems Manager User Guide. Contents Key User-defined criteria for sending commands that target managed nodes that meet the criteria. Type: String Length Constraints: Minimum length of 1. Maximum length of 163. Pattern: ^[\p{L}\p{Z}\p{N}_.:/=\-@]*$|resource-groups:ResourceTypeFilters| resource-groups:Name Required: No Values User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer. Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50. Type: Array of strings Array Members: Minimum number of 0 items. Maximum number of 50 items. Required: No Contents API Version 2014-11-06 1265 AWS Systems Manager See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 See Also API Version 2014-11-06 1266 AWS Systems Manager TargetLocation API Reference The combination of AWS Regions and AWS accounts targeted by the current Automation execution. Contents Accounts The AWS accounts targeted by the current Automation execution. Type: Array of strings Array Members: Minimum number of 1 item. Maximum number of 50 items. Required: No ExcludeAccounts AWS accounts or organizational units to exclude as expanded targets. Type: Array of strings Array Members: Minimum number of 1 item. Maximum number of 5000 items. Length Constraints: Minimum length of 6. Maximum length of 68. Pattern: ^(ou-[a-z0-9]{4,32}-[a-z0-9]{8,32})|(\d{12})$ Required: No ExecutionRoleName The Automation execution role used by the currently running Automation. If not specified, the default value is AWS-SystemsManager-AutomationExecutionRole. Type: String Length Constraints: Minimum length of 1. Maximum length of 64. Pattern: [\w+=,.@/-]+ Required: No TargetLocation API Version 2014-11-06 1267 AWS Systems Manager IncludeChildOrganizationUnits API Reference Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is false. Type: Boolean Required: No Regions The AWS Regions targeted by the current Automation execution. Type: Array of strings Array Members: Minimum number of 1 item. Maximum number of 50 items. Required: No TargetLocationAlarmConfiguration The details for the CloudWatch alarm you want to apply to an automation or command. Type: AlarmConfiguration object Required: No TargetLocationMaxConcurrency The maximum number of AWS Regions and AWS accounts allowed to run the Automation concurrently. Type: String Length Constraints: Minimum length of 1. Maximum length of 7. Pattern: ^([1-9][0-9]*|[1-9][0-9]%|[1-9]%|100%)$ Required: No TargetLocationMaxErrors The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation. Type: String Contents API Version 2014-11-06 1268 AWS Systems Manager API Reference Length Constraints: Minimum length of 1. Maximum length of 7. Pattern: ^([1-9][0-9]*|[0]|[1-9][0-9]%|[0-9]%|100%)$ Required: No Targets A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for TargetParameterName. This Targets parameter takes precedence over the StartAutomationExecution:Targets parameter if both are supplied. Type: Array of Target objects Array Members: Minimum number of 0 items. Maximum number of 5 items. Required: No TargetsMaxConcurrency The maximum number of targets allowed to run this task in parallel. This TargetsMaxConcurrency takes precedence over the StartAutomationExecution:MaxConcurrency parameter if both are supplied. Type: String Length Constraints: Minimum length of 1. Maximum length of 7. Pattern: ^([1-9][0-9]*|[1-9][0-9]%|[1-9]%|100%)$ Required: No TargetsMaxErrors The maximum number of errors that are allowed before the system stops running
|
systems-manager-api-227
|
systems-manager-api.pdf
| 227 |
values for this data type, you must also specify a value for TargetParameterName. This Targets parameter takes precedence over the StartAutomationExecution:Targets parameter if both are supplied. Type: Array of Target objects Array Members: Minimum number of 0 items. Maximum number of 5 items. Required: No TargetsMaxConcurrency The maximum number of targets allowed to run this task in parallel. This TargetsMaxConcurrency takes precedence over the StartAutomationExecution:MaxConcurrency parameter if both are supplied. Type: String Length Constraints: Minimum length of 1. Maximum length of 7. Pattern: ^([1-9][0-9]*|[1-9][0-9]%|[1-9]%|100%)$ Required: No TargetsMaxErrors The maximum number of errors that are allowed before the system stops running the automation on additional targets. This TargetsMaxErrors parameter takes precedence over the StartAutomationExecution:MaxErrors parameter if both are supplied. Type: String Length Constraints: Minimum length of 1. Maximum length of 7. Pattern: ^([1-9][0-9]*|[0]|[1-9][0-9]%|[0-9]%|100%)$ Contents API Version 2014-11-06 1269 AWS Systems Manager Required: No See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 See Also API Version 2014-11-06 1270 AWS Systems Manager TargetPreview API Reference Information about the resources that would be included in the actual runbook execution, if it were to be run. Contents Count The number of resources of a certain type included in an execution preview. Type: Integer Required: No TargetType A type of resource that was included in the execution preview. Type: String Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 TargetPreview API Version 2014-11-06 1271 AWS Systems Manager API Reference Common Parameters The following list contains the parameters that all actions use for signing Signature Version 4 requests with a query string. Any action-specific parameters are listed in the topic for that action. For more information about Signature Version 4, see Signing AWS API requests in the IAM User Guide. Action The action to be performed. Type: string Required: Yes Version The API version that the request is written for, expressed in the format YYYY-MM-DD. Type: string Required: Yes X-Amz-Algorithm The hash algorithm that you used to create the request signature. Condition: Specify this parameter when you include authentication information in a query string instead of in the HTTP authorization header. Type: string Valid Values: AWS4-HMAC-SHA256 Required: Conditional X-Amz-Credential The credential scope value, which is a string that includes your access key, the date, the region you are targeting, the service you are requesting, and a termination string ("aws4_request"). The value is expressed in the following format: access_key/YYYYMMDD/region/service/ aws4_request. API Version 2014-11-06 1272 AWS Systems Manager API Reference For more information, see Create a signed AWS API request in the IAM User Guide. Condition: Specify this parameter when you include authentication information in a query string instead of in the HTTP authorization header. Type: string Required: Conditional X-Amz-Date The date that is used to create the signature. The format must be ISO 8601 basic format (YYYYMMDD'T'HHMMSS'Z'). For example, the following date time is a valid X-Amz-Date value: 20120325T120000Z. Condition: X-Amz-Date is optional for all requests; it can be used to override the date used for signing requests. If the Date header is specified in the ISO 8601 basic format, X-Amz-Date is not required. When X-Amz-Date is used, it always overrides the value of the Date header. For more information, see Elements of an AWS API request signature in the IAM User Guide. Type: string Required: Conditional X-Amz-Security-Token The temporary security token that was obtained through a call to AWS Security Token Service (AWS STS). For a list of services that support temporary security credentials from AWS STS, see AWS services that work with IAM in the IAM User Guide. Condition: If you're using temporary security credentials from AWS STS, you must include the security token. Type: string Required: Conditional X-Amz-Signature Specifies the hex-encoded signature that was calculated from the string to sign and the derived signing key. Condition: Specify this parameter when you include authentication information in a query string instead of in the HTTP authorization header. API Version 2014-11-06 1273 AWS Systems Manager Type: string Required: Conditional X-Amz-SignedHeaders API Reference Specifies all the HTTP headers that were included as part of the canonical request. For more information about specifying signed headers, see Create a signed AWS API request in the IAM User Guide. Condition: Specify this parameter when you include authentication information in a query string instead of in the HTTP authorization header. Type: string Required: Conditional API Version 2014-11-06 1274 AWS Systems Manager API Reference Common Errors This section lists the errors common to the API actions of all AWS services. For errors specific to an
|
systems-manager-api-228
|
systems-manager-api.pdf
| 228 |
Version 2014-11-06 1273 AWS Systems Manager Type: string Required: Conditional X-Amz-SignedHeaders API Reference Specifies all the HTTP headers that were included as part of the canonical request. For more information about specifying signed headers, see Create a signed AWS API request in the IAM User Guide. Condition: Specify this parameter when you include authentication information in a query string instead of in the HTTP authorization header. Type: string Required: Conditional API Version 2014-11-06 1274 AWS Systems Manager API Reference Common Errors This section lists the errors common to the API actions of all AWS services. For errors specific to an API action for this service, see the topic for that API action. AccessDeniedException You do not have sufficient access to perform this action. HTTP Status Code: 400 IncompleteSignature The request signature does not conform to AWS standards. HTTP Status Code: 400 InternalFailure The request processing has failed because of an unknown error, exception or failure. HTTP Status Code: 500 InvalidAction The action or operation requested is invalid. Verify that the action is typed correctly. HTTP Status Code: 400 InvalidClientTokenId The X.509 certificate or AWS access key ID provided does not exist in our records. HTTP Status Code: 403 NotAuthorized You do not have permission to perform this action. HTTP Status Code: 400 OptInRequired The AWS access key ID needs a subscription for the service. HTTP Status Code: 403 API Version 2014-11-06 1275 AWS Systems Manager RequestExpired API Reference The request reached the service more than 15 minutes after the date stamp on the request or more than 15 minutes after the request expiration date (such as for pre-signed URLs), or the date stamp on the request is more than 15 minutes in the future. HTTP Status Code: 400 ServiceUnavailable The request has failed due to a temporary failure of the server. HTTP Status Code: 503 ThrottlingException The request was denied due to request throttling. HTTP Status Code: 400 ValidationError The input fails to satisfy the constraints specified by an AWS service. HTTP Status Code: 400 API Version 2014-11-06 1276
|
systems-manager-automation-runbook-guide-001
|
systems-manager-automation-runbook-guide.pdf
| 1 |
User Guide AWS Systems Manager Automation runbook reference Copyright © 2025 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. AWS Systems Manager Automation runbook reference User Guide AWS Systems Manager Automation runbook reference: User Guide Copyright © 2025 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon. AWS Systems Manager Automation runbook reference User Guide Table of Contents Automation runbook reference ...................................................................................................... 1 View runbook content ................................................................................................................................. 3 API Gateway ................................................................................................................................................... 4 AWSConfigRemediation-DeleteAPIGatewayStage ................................................................ 4 AWSConfigRemediation-EnableAPIGatewayTracing ........................................................... 6 AWSConfigRemediation-UpdateAPIGatewayMethodCaching ............................................ 7 AWS Batch ...................................................................................................................................................... 8 AWSSupport-TroubleshootAWSBatchJob ................................................................................... 9 AWS CloudFormation ................................................................................................................................ 14 AWS-DeleteCloudFormationStack ............................................................................................. 15 AWS-EnableCloudFormationSNSNotification ..................................................................... 16 AWS-RunCfnLint ................................................................................................................................. 18 AWSSupport-TroubleshootCFNCustomResource .................................................................. 20 AWS-UpdateCloudFormationStack ............................................................................................. 22 CloudFront ................................................................................................................................................... 23 AWSConfigRemediation-EnableCloudFrontDefaultRootObject ................................. 23 AWSConfigRemediation-EnableCloudFrontAccessLogs ................................................. 25 AWSConfigRemediation-EnableCloudFrontOriginAccessIdentity ......................... 27 AWSConfigRemediation-EnableCloudFrontOriginFailover ........................................ 29 AWSConfigRemediation-EnableCloudFrontViewerPolicyHTTPS ................................. 30 CloudTrail ..................................................................................................................................................... 32 AWSConfigRemediation-CreateCloudTrailMultiRegionTrail ................................... 32 AWS-EnableCloudTrail .................................................................................................................. 34 AWS-EnableCloudTrailCloudWatchLogs ................................................................................. 35 AWSConfigRemediation-EnableCloudTrailEncryptionWithKMS ................................. 37 AWS-EnableCloudTrailKmsEncryption ................................................................................... 38 AWSConfigRemediation-EnableCloudTrailLogFileValidation ................................. 40 AWS-EnableCloudTrailLogFileValidation ......................................................................... 41 AWS-QueryCloudTrailLogs ........................................................................................................... 42 CloudWatch ................................................................................................................................................. 45 AWS-ConfigureCloudWatchOnEC2Instance ............................................................................ 45 AWS-EnableCWAlarm ......................................................................................................................... 46 Amazon DocumentDB ............................................................................................................................... 49 AWS-EnableDocDbClusterBackupRetentionPeriod ........................................................... 49 iii AWS Systems Manager Automation runbook reference User Guide CodeBuild ..................................................................................................................................................... 51 AWSConfigRemediation-ConfigureCodeBuildProjectWithKMSCMK ............................ 51 AWSConfigRemediation-DeleteAccessKeysFromCodeBuildProject ......................... 53 AWS CodeDeploy ........................................................................................................................................ 55 AWSSupport-TroubleshootCodeDeploy ................................................................................... 55 AWS Config .................................................................................................................................................. 57 AWSSupport-SetupConfig ............................................................................................................. 57 Amazon Connect ........................................................................................................................................ 60 AWSSupport-AssociatePhoneNumbersToConnectContactFlows ................................... 60 AWSSupport-CollectAmazonConnectContactFlowLog ...................................................... 68 AWS Directory Service .............................................................................................................................. 74 AWS-CreateDSManagementInstance .......................................................................................... 74 AWSSupport-TroubleshootADConnectorConnectivity .................................................... 79 AWSSupport-TroubleshootDirectoryTrust ......................................................................... 82 AWS AppSync .............................................................................................................................................. 86 AWS-EnableAppSyncGraphQLApiLogging ................................................................................. 86 Amazon Athena .......................................................................................................................................... 88 AWS-EnableAthenaWorkGroupEncryptionAtRest ................................................................ 88 DynamoDB ................................................................................................................................................... 91 AWS-ChangeDDBRWCapacityMode ................................................................................................. 91 AWS-CreateDynamoDBBackup ......................................................................................................... 93 AWS-DeleteDynamoDbBackup ......................................................................................................... 94 AWSConfigRemediation-DeleteDynamoDbTable .................................................................. 95 AWS-DeleteDynamoDbTableBackups .......................................................................................... 96 AWSConfigRemediation-EnableEncryptionOnDynamoDbTable ..................................... 98 AWSConfigRemediation-EnablePITRForDynamoDbTable ................................................. 99 AWS-EnableDynamoDbAutoscaling .......................................................................................... 101 AWS-RestoreDynamoDBTable ...................................................................................................... 104 Amazon EBS .............................................................................................................................................. 107 AWSSupport-AnalyzeEBSResourceUsage .............................................................................. 107 AWS-ArchiveEBSSnapshots ......................................................................................................... 114 AWS-AttachEBSVolume .................................................................................................................. 116 AWSSupport-CalculateEBSPerformanceMetrics ............................................................. 117 AWS-CopySnapshot ......................................................................................................................... 124 AWS-CreateSnapshot ..................................................................................................................... 125 AWS-DeleteSnapshot ..................................................................................................................... 126 iv AWS Systems Manager Automation runbook reference User Guide AWSConfigRemediation-DeleteUnusedEBSVolume ........................................................... 127 AWS-DeregisterAMIs ..................................................................................................................... 129 AWS-DetachEBSVolume .................................................................................................................. 130 AWSConfigRemediation-EnableEbsEncryptionByDefault .......................................... 131 AWS-ExtendEbsVolume .................................................................................................................. 133 AWSSupport-ModifyEBSSnapshotPermission ..................................................................... 135 AWSConfigRemediation-ModifyEBSVolumeType ................................................................ 137 Amazon EC2 .............................................................................................................................................. 139 AWS-ASGEnterStandby .................................................................................................................. 141 AWS-ASGExitStandby ..................................................................................................................... 142 AWS-CreateImage ............................................................................................................................ 143 AWS-DeleteImage ............................................................................................................................ 144 AWS-PatchAsgInstance ................................................................................................................ 146 AWS-PatchInstanceWithRollback .......................................................................................... 148 AWS-QuarantineEC2Instance .................................................................................................... 151 AWS-ResizeInstance ..................................................................................................................... 153 AWS-RestartEC2Instance ........................................................................................................... 154 AWS-SetupJupyter ......................................................................................................................... 155 AWS-StartEC2Instance ................................................................................................................ 158 AWS-StopEC2Instance .................................................................................................................. 159 AWS-TerminateEC2Instance ...................................................................................................... 160 AWS-UpdateLinuxAmi ..................................................................................................................... 161 AWS-UpdateWindowsAmi ................................................................................................................ 164 AWSConfigRemediation-EnableAutoScalingGroupELBHealthCheck ....................... 168 AWSConfigRemediation-EnforceEC2InstanceIMDSv2 .................................................... 169 AWSEC2-CloneInstanceAndUpgradeSQLServer .................................................................. 171 AWSEC2-CloneInstanceAndUpgradeWindows ....................................................................... 174 AWSEC2-ConfigureSTIG ..................................................................................................................... 178 AWSEC2-PatchLoadBalancerInstance ................................................................................... 212 AWSEC2-SQLServerDBRestore .................................................................................................... 213 AWSSupport-ActivateWindowsWithAmazonLicense ......................................................... 218 AWSSupport-AnalyzeAWSEndpointReachabilityFromEC2 ............................................. 221 AWSPremiumSupport-ChangeInstanceTypeIntelToAMD ................................................. 226 AWSSupport-CheckXenToNitroMigrationRequirements ............................................... 232 AWSSupport-ConfigureEC2Metadata ..................................................................................... 235 AWSSupport-ContainEC2Instance .......................................................................................... 238 v AWS Systems Manager Automation runbook reference User Guide AWSSupport-CopyEC2Instance ................................................................................................. 249 AWSSupport-EnableWindowsEC2SerialConsole ................................................................ 254 AWSSupport-ExecuteEC2Rescue ............................................................................................... 263 AWSSupport-ListEC2Resources ............................................................................................... 265 AWSSupport-ManageRDPSettings ............................................................................................. 268 AWSSupport-ManageWindowsService ..................................................................................... 270 AWSSupport-MigrateEC2ClassicToVPC ................................................................................. 272 AWSSupport-MigrateXenToNitroLinux ................................................................................. 279 AWSSupport-ResetAccess ........................................................................................................... 291 AWSSupport-ResetLinuxUserPassword ................................................................................. 293 AWSPremiumSupport-ResizeNitroInstance ....................................................................... 300 AWSSupport-RestoreEC2InstanceFromSnapshot ............................................................. 307 AWSSupport-SendLogBundleToS3Bucket .............................................................................. 311 AWSSupport-StartEC2RescueWorkflow ................................................................................. 313 AWSPremiumSupport-TroubleshootEC2DiskUsage ........................................................... 323 AWSSupport-TroubleshootEC2InstanceConnect ............................................................. 328 AWSSupport-TroubleshootLinuxMGNDRSAgentLogs ......................................................... 334 AWSSupport-TroubleshootRDP ................................................................................................. 337 AWSSupport-TroubleshootSSH ................................................................................................. 343 AWSSupport-TroubleshootSUSERegistration .................................................................. 346 AWSSupport-TroubleshootWindowsPerformance ............................................................. 349 AWSSupport-TroubleshootWindowsUpdate ......................................................................... 356 AWSSupport-UpgradeWindowsAWSDrivers ............................................................................ 363 Amazon ECS .............................................................................................................................................. 367 AWSSupport-CollectECSInstanceLogs ................................................................................. 367 AWS-InstallAmazonECSAgent .................................................................................................... 370 AWS-ECSRunTask .............................................................................................................................. 372 AWSSupport-TroubleshootECSContainerInstance ......................................................... 375 AWSSupport-TroubleshootECSTaskFailedToStart ......................................................... 377 AWS-UpdateAmazonECSAgent ...................................................................................................... 381 Amazon EFS .............................................................................................................................................. 383 AWSSupport-CheckAndMountEFS ............................................................................................... 384 Amazon EKS .............................................................................................................................................. 387 AWSSupport-CollectEKSInstanceLogs ................................................................................. 387 AWS-CreateEKSClusterWithFargateProfile ..................................................................... 390 AWS-CreateEKSClusterWithNodegroup ................................................................................. 393 vi AWS Systems Manager Automation runbook reference User Guide AWS-DeleteEKSCluster ................................................................................................................ 397 AWS-MigrateToNewEKSSelfManagedNodeGroup .................................................................. 400 AWSPremiumSupport-TroubleshootEKSCluster ................................................................ 406 AWSSupport-TroubleshootEKSWorkerNode ......................................................................... 410 AWS-UpdateEKSCluster ................................................................................................................ 412 AWS-UpdateEKSManagedNodeGroup .......................................................................................... 413 AWS-UpdateEKSSelfManagedLinuxNodeGroups .................................................................. 418 AWSSupport-SetupK8sApiProxyForEKS ................................................................................. 422 AWSSupport-TroubleshootEbsCsiDriversForEks ........................................................... 433 Elastic Beanstalk ...................................................................................................................................... 442 AWSSupport-CollectElasticBeanstalkLogs ..................................................................... 442 AWSConfigRemediation-EnableElasticBeanstalkEnvironmentLogStreaming . 445 AWSConfigRemediation-EnableBeanstalkEnvironmentNotifications ................ 446 AWSSupport-TroubleshootElasticBeanstalk .................................................................. 448 Elastic Load Balancing ............................................................................................................................ 451 AWSConfigRemediation-DropInvalidHeadersForALB .................................................... 452 AWS-EnableCLBAccessLogs ......................................................................................................... 453 AWS-EnableCLBConnectionDraining ..................................................................................... 455 AWSConfigRemediation-EnableCLBCrossZoneLoadBalancing ................................... 457 AWSConfigRemediation-EnableELBDeletionProtection ............................................. 458 AWSConfigRemediation-EnableLoggingForALBAndCLB ................................................. 459 AWSSupport-TroubleshootCLBConnectivity ..................................................................... 461 AWSConfigRemediation-EnableNLBCrossZoneLoadBalancing ................................... 464 AWS-UpdateALBDesyncMitigationMode ................................................................................. 466 AWS-UpdateCLBDesyncMitigationMode ................................................................................. 468 Amazon EMR ............................................................................................................................................. 469 AWSSupport-AnalyzeEMRLogs .................................................................................................... 470 AWSSupport-DiagnoseEMRLogsWithAthena ......................................................................... 476 Amazon OpenSearch Service ................................................................................................................ 484 AWSConfigRemediation-DeleteOpenSearchDomain ......................................................... 485 AWSConfigRemediation-EnforceHTTPSOnOpenSearchDomain ..................................... 486 AWSConfigRemediation-UpdateOpenSearchDomainSecurityGroups ....................... 487 AWSSupport-TroubleshootOpenSearchRedYellowCluster .......................................... 489 AWSSupport-TroubleshootOpenSearchHighCPU ................................................................ 495 EventBridge ............................................................................................................................................... 501 AWS-AddOpsItemDedupStringToEventBridgeRule ........................................................... 501 vii AWS Systems Manager Automation runbook reference User Guide AWS-DisableEventBridgeRule ................................................................................................. 503 AWS Glue ................................................................................................................................................... 504 AWSSupport-TroubleshootGlueConnection ....................................................................... 505 Amazon FSx ............................................................................................................................................... 515 AWSSupport-ValidateFSxWindowsADConfig ....................................................................... 516 GuardDuty ................................................................................................................................................. 529 AWSConfigRemediation-CreateGuardDutyDetector ...................................................... 530 IAM .............................................................................................................................................................. 531 AWSSupport-TroubleshootIAMAccessDeniedEvents ...................................................... 532 AWS-AttachIAMToInstance ......................................................................................................... 538 AWS-DeleteIAMInlinePolicy .................................................................................................... 540 AWSConfigRemediation-DeleteIAMRole .............................................................................. 542 AWSConfigRemediation-DeleteIAMUser .............................................................................. 543 AWSConfigRemediation-DeleteUnusedIAMGroup ............................................................. 546 AWSConfigRemediation-DeleteUnusedIAMPolicy ........................................................... 547 AWSConfigRemediation-DetachIAMPolicy ......................................................................... 549 AWSConfigRemediation-EnableAccountAccessAnalyzer ............................................. 550 AWSSupport-GrantPermissionsToIAMUser ......................................................................... 551 AWSConfigRemediation-RemoveUserPolicies .................................................................. 557 AWSConfigRemediation-ReplaceIAMInlinePolicy ......................................................... 558 AWSConfigRemediation-RevokeUnusedIAMUserCredentials ..................................... 560 AWSConfigRemediation-SetIAMPasswordPolicy
|
systems-manager-automation-runbook-guide-002
|
systems-manager-automation-runbook-guide.pdf
| 2 |
OpenSearch Service ................................................................................................................ 484 AWSConfigRemediation-DeleteOpenSearchDomain ......................................................... 485 AWSConfigRemediation-EnforceHTTPSOnOpenSearchDomain ..................................... 486 AWSConfigRemediation-UpdateOpenSearchDomainSecurityGroups ....................... 487 AWSSupport-TroubleshootOpenSearchRedYellowCluster .......................................... 489 AWSSupport-TroubleshootOpenSearchHighCPU ................................................................ 495 EventBridge ............................................................................................................................................... 501 AWS-AddOpsItemDedupStringToEventBridgeRule ........................................................... 501 vii AWS Systems Manager Automation runbook reference User Guide AWS-DisableEventBridgeRule ................................................................................................. 503 AWS Glue ................................................................................................................................................... 504 AWSSupport-TroubleshootGlueConnection ....................................................................... 505 Amazon FSx ............................................................................................................................................... 515 AWSSupport-ValidateFSxWindowsADConfig ....................................................................... 516 GuardDuty ................................................................................................................................................. 529 AWSConfigRemediation-CreateGuardDutyDetector ...................................................... 530 IAM .............................................................................................................................................................. 531 AWSSupport-TroubleshootIAMAccessDeniedEvents ...................................................... 532 AWS-AttachIAMToInstance ......................................................................................................... 538 AWS-DeleteIAMInlinePolicy .................................................................................................... 540 AWSConfigRemediation-DeleteIAMRole .............................................................................. 542 AWSConfigRemediation-DeleteIAMUser .............................................................................. 543 AWSConfigRemediation-DeleteUnusedIAMGroup ............................................................. 546 AWSConfigRemediation-DeleteUnusedIAMPolicy ........................................................... 547 AWSConfigRemediation-DetachIAMPolicy ......................................................................... 549 AWSConfigRemediation-EnableAccountAccessAnalyzer ............................................. 550 AWSSupport-GrantPermissionsToIAMUser ......................................................................... 551 AWSConfigRemediation-RemoveUserPolicies .................................................................. 557 AWSConfigRemediation-ReplaceIAMInlinePolicy ......................................................... 558 AWSConfigRemediation-RevokeUnusedIAMUserCredentials ..................................... 560 AWSConfigRemediation-SetIAMPasswordPolicy ............................................................. 562 AWSSupport-ContainIAMPrincipal ........................................................................................ 565 Amazon Kinesis Data Streams .............................................................................................................. 579 AWS-EnableKinesisStreamEncryption ................................................................................. 579 AWS KMS ................................................................................................................................................... 581 AWSConfigRemediation-CancelKeyDeletion ..................................................................... 582 AWSConfigRemediation-EnableKeyRotation ..................................................................... 583 Lambda ....................................................................................................................................................... 584 AWSConfigRemediation-ConfigureLambdaFunctionXRayTracing ............................ 585 AWSConfigRemediation-DeleteLambdaFunction ............................................................. 586 AWSConfigRemediation-EncryptLambdaEnvironmentVariablesWithCMK ............. 587 AWSConfigRemediation-MoveLambdaToVPC ......................................................................... 589 AWSSupport-RemediateLambdaS3Event ................................................................................. 591 AWSSupport-TroubleshootLambdaInternetAccess ......................................................... 593 AWSSupport-TroubleshootLambdaS3Event ......................................................................... 597 viii AWS Systems Manager Automation runbook reference User Guide Amazon Managed Workflows for Apache Airflow ............................................................................ 599 AWSSupport-TroubleshootMWAAEnvironmentCreation ................................................. 599 Neptune ..................................................................................................................................................... 606 AWS-EnableNeptuneDbAuditLogsToCloudWatch ................................................................ 606 AWS-EnableNeptuneDbBackupRetentionPeriod ................................................................ 608 AWS-EnableNeptuneClusterDeletionProtection ........................................................... 610 Amazon RDS ............................................................................................................................................. 611 AWS-CreateEncryptedRdsSnapshot ........................................................................................ 612 AWS-CreateRdsSnapshot ............................................................................................................. 615 AWSConfigRemediation-DeleteRDSCluster ....................................................................... 616 AWSConfigRemediation-DeleteRDSClusterSnapshot .................................................... 618 AWSConfigRemediation-DeleteRDSInstance ..................................................................... 619 AWSConfigRemediation-DeleteRDSInstanceSnapshot ................................................. 621 AWSConfigRemediation-DisablePublicAccessToRDSInstance ................................. 622 AWSConfigRemediation-EnableCopyTagsToSnapshotOnRDSCluster ....................... 624 AWSConfigRemediation-EnableCopyTagsToSnapshotOnRDSDBInstance ................ 626 AWSConfigRemediation-EnableEnhancedMonitoringOnRDSInstance ..................... 627 AWSConfigRemediation-EnableMinorVersionUpgradeOnRDS ..................................... 629 AWSConfigRemediation-EnableMultiAZOnRDSInstance ............................................... 631 AWSConfigRemediation-EnablePerformanceInsightsOnRDSInstance .................. 633 AWSConfigRemediation-EnableRDSClusterDeletionProtection ............................ 635 AWSConfigRemediation-EnableRDSInstanceBackup ...................................................... 636 AWSConfigRemediation-EnableRDSInstanceDeletionProtection ......................... 638 AWSConfigRemediation-ModifyRDSInstancePortNumber ............................................. 640 AWSSupport-ModifyRDSSnapshotPermission ..................................................................... 642 AWSPremiumSupport-PostgreSQLWorkloadReview ........................................................... 644 AWS-RebootRdsInstance ............................................................................................................. 660 AWSSupport-ShareRDSSnapshot ............................................................................................... 661 AWS-StartRdsInstance ................................................................................................................ 664 AWS-StartStopAuroraCluster ................................................................................................. 665 AWS-StopRdsInstance .................................................................................................................. 667 AWSSupport-TroubleshootConnectivityToRDS ................................................................ 668 AWSSupport-TroubleshootRDSIAMAuthentication ......................................................... 671 AWSSupport-ValidateRdsNetworkConfiguration ........................................................... 678 Amazon Redshift ...................................................................................................................................... 684 AWSConfigRemediation-DeleteRedshiftCluster ........................................................... 684 ix AWS Systems Manager Automation runbook reference User Guide AWSConfigRemediation-DisablePublicAccessToRedshiftCluster ....................... 686 AWSConfigRemediation-EnableRedshiftClusterAuditLogging .............................. 687 AWSConfigRemediation-EnableRedshiftClusterAutomatedSnapshot .................. 689 AWSConfigRemediation-EnableRedshiftClusterEncryption ................................... 690 AWSConfigRemediation-EnableRedshiftClusterEnhancedVPCRouting ................ 692 AWSConfigRemediation-EnforceSSLOnlyConnectionsToRedshiftCluster ......... 693 AWSConfigRemediation-ModifyRedshiftClusterMaintenanceSettings ............. 695 AWSConfigRemediation-ModifyRedshiftClusterNodeType ........................................ 697 Amazon S3 ................................................................................................................................................ 699 AWS-ArchiveS3BucketToIntelligentTiering .................................................................. 699 AWS-ConfigureS3BucketLogging ............................................................................................. 702 AWS-ConfigureS3BucketVersioning ..................................................................................... 704 AWSConfigRemediation-ConfigureS3BucketPublicAccessBlock ............................ 705 AWSConfigRemediation-ConfigureS3PublicAccessBlock .......................................... 707 AWS-CreateS3PolicyToExpireMultipartUploads ........................................................... 709 AWS-DisableS3BucketPublicReadWrite .............................................................................. 711 AWS-EnableS3BucketEncryption ............................................................................................. 712 AWS-EnableS3BucketKeys ........................................................................................................... 713 AWSConfigRemediation-RemovePrincipalStarFromS3BucketPolicy ..................... 715 AWSConfigRemediation-RestrictBucketSSLRequestsOnly ........................................ 716 AWSSupport-TroubleshootS3PublicRead ............................................................................ 718 AWSSupport-EmptyS3Bucket ...................................................................................................... 723 AWSSupport-TroubleshootS3EventNotifications ......................................................... 730 AWSSupport-ContainS3Resource ............................................................................................. 737 Amazon SES .............................................................................................................................................. 746 AWSSupport-AnalyzeSESMessageSendingStatus ............................................................. 746 SageMaker AI ............................................................................................................................................ 750 AWS-DisableSageMakerNotebookRootAccess ..................................................................... 750 Secrets Manager ....................................................................................................................................... 753 AWSConfigRemediation-DeleteSecret ................................................................................. 753 AWSConfigRemediation-RotateSecret ................................................................................. 754 Security Hub ............................................................................................................................................. 756 AWSConfigRemediation-EnableSecurityHub ..................................................................... 756 AWS Shield ................................................................................................................................................ 758 AWSPremiumSupport-DDoSResiliencyAssessment ........................................................... 758 Amazon SNS ............................................................................................................................................. 767 x AWS Systems Manager Automation runbook reference User Guide AWS-EnableSNSTopicDeliveryStatusLogging .................................................................. 767 AWSConfigRemediation-EncryptSNSTopic ......................................................................... 770 AWS-PublishSNSNotification ................................................................................................. 771 Amazon SQS ............................................................................................................................................. 772 AWS-EnableSQSEncryption ......................................................................................................... 772 Step Functions .......................................................................................................................................... 775 AWS-EnableStepFunctionsStateMachineLogging ........................................................... 775 Systems Manager ..................................................................................................................................... 777 AWS-BulkDeleteAssociation .................................................................................................... 778 AWS-BulkEditOpsItems ................................................................................................................ 779 AWS-BulkResolveOpsItems ......................................................................................................... 782 AWS-ConfigureMaintenanceWindows ..................................................................................... 784 AWS-CreateManagedLinuxInstance ........................................................................................ 786 AWS-CreateManagedWindowsInstance ................................................................................... 788 AWSConfigRemediation-EnableCWLoggingForSessionManager ................................. 791 AWS-ExportOpsDataToS3 ............................................................................................................. 792 AWS-ExportPatchReportToS3 .................................................................................................... 794 AWS-SetupInventory ..................................................................................................................... 796 AWS-SetupManagedInstance ...................................................................................................... 800 AWS-SetupManagedRoleOnEC2Instance ................................................................................. 801 AWSSupport-TroubleshootManagedInstance ..................................................................... 803 AWSSupport-TroubleshootPatchManagerLinux ................................................................ 805 AWSSupport-TroubleshootSessionManager ....................................................................... 809 Third-party ................................................................................................................................................ 815 AWS-CreateJiraIssue .................................................................................................................. 815 AWS-CreateServiceNowIncident ............................................................................................. 817 AWS-RunPacker ................................................................................................................................. 819 Amazon VPC ............................................................................................................................................. 821 AWS-CloseSecurityGroup ........................................................................................................... 822 AWSSupport-ConfigureDNSQueryLogging ............................................................................ 823 AWSSupport-ConfigureTrafficMirroring ......................................................................... 826 AWSSupport-ConnectivityTroubleshooter ....................................................................... 829 AWSSupport-TroubleshootVPN ................................................................................................. 832 AWSConfigRemediation-DeleteEgressOnlyInternetGateway ................................... 838 AWSConfigRemediation-DeleteUnusedENI ......................................................................... 840 AWSConfigRemediation-DeleteUnusedSecurityGroup ................................................. 841 xi AWS Systems Manager Automation runbook reference User Guide AWSConfigRemediation-DeleteUnusedVPCNetworkACL ................................................. 842 AWSConfigRemediation-DeleteVPCFlowLog ....................................................................... 844 AWSConfigRemediation-DetachAndDeleteInternetGateway ..................................... 845 AWSConfigRemediation-DetachAndDeleteVirtualPrivateGateway ....................... 847 AWS-DisableIncomingSSHOnPort22 ........................................................................................ 849 AWS-DisablePublicAccessForSecurityGroup .................................................................. 850 AWSConfigRemediation-DisableSubnetAutoAssignPublicIP ................................... 852 AWSSupport-EnableVPCFlowLogs ............................................................................................. 853 AWSConfigRemediation-EnableVPCFlowLogsToCloudWatch ........................................ 859 AWSConfigRemediation-EnableVPCFlowLogsToS3Bucket ............................................. 861 AWS-ReleaseElasticIP ................................................................................................................ 863 AWS-RemoveNetworkACLUnrestrictedSSHRDP ..................................................................... 864 AWSConfigRemediation-RemoveUnrestrictedSourceIngressRules ....................... 866 AWSConfigRemediation-RemoveVPCDefaultSecurityGroupRules ............................ 867 AWSSupport-SetupIPMonitoringFromVPC ............................................................................ 868 AWSSupport-TerminateIPMonitoringFromVPC .................................................................. 882 AWS WAF ................................................................................................................................................... 885 AWS-AddWAFRegionalRuleToRuleGroup ................................................................................. 885 AWS-AddWAFRegionalRuleToWebAcl ........................................................................................ 888 AWSConfigRemediation-EnableWAFClassicLogging ...................................................... 890 AWSConfigRemediation-EnableWAFClassicRegionalLogging ................................... 892 AWSConfigRemediation-EnableWAFV2Logging .................................................................. 893 Amazon WorkSpaces ............................................................................................................................... 895 AWS-CreateWorkSpace .................................................................................................................. 895 AWSSupport-RecoverWorkSpace ............................................................................................... 898 X-Ray ........................................................................................................................................................... 903 AWSConfigRemediation-UpdateXRayKMSKey ....................................................................... 903 xii AWS Systems Manager Automation runbook reference User Guide Systems Manager Automation runbook reference To help you get started quickly, AWS Systems Manager provides predefined runbooks. These runbooks are maintained by Amazon Web Services, AWS Support, and AWS Config. The runbook reference describes each of the predefined runbooks provided by Systems Manager, Support, and AWS Config. Important If you run an automation workflow that invokes other services by using an AWS Identity and Access Management (IAM) service role, be aware that the service role must be configured with permission to invoke those services. This requirement applies to all AWS Automation runbooks (AWS-* runbooks) such as the AWS-ConfigureS3BucketLogging, AWS-CreateDynamoDBBackup, and AWS-RestartEC2Instance runbooks, to name a few. This requirement also applies to any custom Automation runbooks you create that invoke other AWS services by using actions that call other services. For example, if you use the aws:executeAwsApi, aws:createStack, or aws:copyImage actions, then you must configure the service role with permission to invoke those services. You can enable permissions to other AWS services by adding an IAM inline policy to the role. For more information, see Add an Automation inline policy to invoke other
|
systems-manager-automation-runbook-guide-003
|
systems-manager-automation-runbook-guide.pdf
| 3 |
those services. This requirement applies to all AWS Automation runbooks (AWS-* runbooks) such as the AWS-ConfigureS3BucketLogging, AWS-CreateDynamoDBBackup, and AWS-RestartEC2Instance runbooks, to name a few. This requirement also applies to any custom Automation runbooks you create that invoke other AWS services by using actions that call other services. For example, if you use the aws:executeAwsApi, aws:createStack, or aws:copyImage actions, then you must configure the service role with permission to invoke those services. You can enable permissions to other AWS services by adding an IAM inline policy to the role. For more information, see Add an Automation inline policy to invoke other AWS services. This reference includes topics that describe each of the Systems Manager runbooks that are owned by AWS, AWS Support, and AWS Config. Runbooks are organized by the relevant AWS service. Each page provides an explanation of the required and optional parameters that you can specify when using the runbook. Each page also lists the steps in the runbook and the output of the automation, if any. This reference does not include a separate page for runbooks that require approval such as the AWS-CreateManagedLinuxInstanceWithApproval or AWS- StopEC2InstanceWithApproval runbook. Any runbook name that includes WithApproval, means the runbook includes the aws:approve action. This action temporarily pauses an automation until designated principals either approve or reject the action. After the required number of approvals is reached, the automation resumes. 1 AWS Systems Manager Automation runbook reference User Guide For information about running automations, see Running a simple automation. For information about running automations on multiple targets, see Running automations that use targets and rate controls. Topics • View runbook content • API Gateway • AWS Batch • AWS CloudFormation • CloudFront • CloudTrail • CloudWatch • Amazon DocumentDB • CodeBuild • AWS CodeDeploy • AWS Config • Amazon Connect • AWS Directory Service • AWS AppSync • Amazon Athena • DynamoDB • Amazon EBS • Amazon EC2 • Amazon ECS • Amazon EFS • Amazon EKS • Elastic Beanstalk • Elastic Load Balancing • Amazon EMR • Amazon OpenSearch Service • EventBridge 2 AWS Systems Manager Automation runbook reference User Guide • AWS Glue • Amazon FSx • GuardDuty • IAM • Amazon Kinesis Data Streams • AWS KMS • Lambda • Amazon Managed Workflows for Apache Airflow • Neptune • Amazon RDS • Amazon Redshift • Amazon S3 • Amazon SES • SageMaker AI • Secrets Manager • Security Hub • AWS Shield • Amazon SNS • Amazon SQS • Step Functions • Systems Manager • Third-party • Amazon VPC • AWS WAF • Amazon WorkSpaces • X-Ray View runbook content You can view the content for runbooks in the Systems Manager console. View runbook content 3 AWS Systems Manager Automation runbook reference User Guide To view runbook content 1. Open the AWS Systems Manager console at https://console.aws.amazon.com/systems- manager/. 2. In the navigation pane, choose Documents. -or- If the AWS Systems Manager home page opens first, choose the menu icon ( to open the navigation pane, and then choose Documents in the navigation pane. ) 3. In the Categories section, choose Automation documents. 4. Choose a runbook, and then choose View details. 5. Choose the Content tab. API Gateway AWS Systems Manager Automation provides predefined runbooks for Amazon API Gateway. For more information about runbooks, see Working with runbooks. For information about how to view runbook content, see View runbook content. Topics • AWSConfigRemediation-DeleteAPIGatewayStage • AWSConfigRemediation-EnableAPIGatewayTracing • AWSConfigRemediation-UpdateAPIGatewayMethodCaching AWSConfigRemediation-DeleteAPIGatewayStage Description The AWSConfigRemediation-DeleteAPIGatewayStage runbook deletes an Amazon API Gateway (API Gateway) stage. AWS Config must be enabled in the AWS Region where you run this automation. Run this Automation (console) Document type API Gateway 4 AWS Systems Manager Automation runbook reference User Guide Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. • StageArn Type: String Description: (Required) The Amazon Resource Name (ARN) of the API Gateway stage you want to delete. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:GetAutomationExecution • config:GetResourceConfigHistory • apigateway:GET • apigateway:DELETE Document Steps • aws:executeScript - Deletes the API Gateway stage specified in the StageArn parameter. AWSConfigRemediation-DeleteAPIGatewayStage 5 AWS Systems Manager Automation runbook reference User Guide AWSConfigRemediation-EnableAPIGatewayTracing Description The AWSConfigRemediation-EnableAPIGatewayTracing runbook enables tracing on an Amazon API Gateway (API Gateway) stage. AWS Config must be enabled in the AWS Region where you run this automation. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. • StageArn Type:
|
systems-manager-automation-runbook-guide-004
|
systems-manager-automation-runbook-guide.pdf
| 4 |
aws:executeScript - Deletes the API Gateway stage specified in the StageArn parameter. AWSConfigRemediation-DeleteAPIGatewayStage 5 AWS Systems Manager Automation runbook reference User Guide AWSConfigRemediation-EnableAPIGatewayTracing Description The AWSConfigRemediation-EnableAPIGatewayTracing runbook enables tracing on an Amazon API Gateway (API Gateway) stage. AWS Config must be enabled in the AWS Region where you run this automation. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. • StageArn Type: String Description: (Required) The Amazon Resource Name (ARN) of the API Gateway stage you want to enable tracing on. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. AWSConfigRemediation-EnableAPIGatewayTracing 6 AWS Systems Manager Automation runbook reference User Guide • ssm:GetAutomationExecution • ssm:StartAutomationExecution • config:GetResourceConfigHistory • apigateway:GET • apigateway:PATCH Document Steps • aws:executeScript - Enables tracing on the API Gateway stage specified in the StageArn parameter. AWSConfigRemediation-UpdateAPIGatewayMethodCaching Description The AWSConfigRemediation-UpdateAPIGatewayMethodCaching runbook updates the cache method setting for an Amazon API Gateway stage resource. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. AWSConfigRemediation-UpdateAPIGatewayMethodCaching 7 AWS Systems Manager Automation runbook reference User Guide • CachingAuthorizedMethods Type: StringList Description: (Required) The methods authorized to have caching enabled. The list must be some combination of DELETE , GET , HEAD , OPTIONS , PATCH , POST , and PUT . Caching is enabled for selected methods and disabled for non-selected methods. Caching is enabled for all methods if ANY is selected and is disabled for all methods if NONE is selected. • StageArn Type: String Description: (Required) The API Gateway stage ARN for the REST API. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:GetAutomationExecution • apigateway:PATCH • apigateway:GET Document Steps • aws:executeScript - Accepts the stage resource ID as input, updates the cache method setting for an API Gateway stage using the UpdateStage API action, and verifies the update. AWS Batch AWS Systems Manager Automation provides predefined runbooks for AWS Batch. For more information about runbooks, see Working with runbooks. For information about how to view runbook content, see View runbook content. Topics • AWSSupport-TroubleshootAWSBatchJob AWS Batch 8 AWS Systems Manager Automation runbook reference User Guide AWSSupport-TroubleshootAWSBatchJob Description The AWSSupport-TroubleshootAWSBatchJob runbook helps you to troubleshoot issues that prevent an AWS Batch job from progressing from RUNNABLE to STARTING status. How does it work? This runbook performs the following checks: • If the compute environment is in an INVALID or DISABLED state. • If the compute environment’s Max vCPU parameter is large enough to accommodate the job volume in the job queue. • If the jobs require more vCPUs or memory resources than what the compute environment’s instance types can provide. • If the jobs should run on GPU-based instances but the compute environment is not configured to use GPU-based instances. • If the Auto Scaling group for the compute environment failed to launch instances. • If the launched instances can join the underlying Amazon Elastic Container Service (Amazon ECS) cluster; if not, it runs the AWSSupport-TroubleshootECSContainerInstance runbook. • If any permissions issue is blocking specific actions that are required to run the job. Important • This runbook must be initiated in the same AWS Region as your job that is stuck in RUNNABLE status. • This runbook can be initiated for AWS Batch jobs scheduled on Amazon ECS, AWS Fargate or Amazon Elastic Compute Cloud (Amazon EC2) instances. If the automation is initiated for an AWS Batch job on Amazon Elastic Kubernetes Service (Amazon EKS), the initiation stops. • If instances are available to run the job but fail to register the Amazon ECS cluster, this runbook initiates the AWSSupport-TroubleshootECSContainerInstance automation runbook to try determine why. For more information, reference the AWSSupport-TroubleshootECSContainerInstance runbook. AWSSupport-TroubleshootAWSBatchJob 9 AWS Systems Manager Automation runbook reference User Guide Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • JobId Type: String Description: (Required) The ID of the AWS Batch Job that is stuck in RUNNABLE status. Allowed Pattern: ^[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}(:[0-9]+)? (#[0-9]+)?$ Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • autoscaling:DescribeAutoScalingGroups • autoscaling:DescribeScalingActivities •
|
systems-manager-automation-runbook-guide-005
|
systems-manager-automation-runbook-guide.pdf
| 5 |
Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • JobId Type: String Description: (Required) The ID of the AWS Batch Job that is stuck in RUNNABLE status. Allowed Pattern: ^[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}(:[0-9]+)? (#[0-9]+)?$ Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • autoscaling:DescribeAutoScalingGroups • autoscaling:DescribeScalingActivities • batch:DescribeComputeEnvironments AWSSupport-TroubleshootAWSBatchJob 10 AWS Systems Manager Automation runbook reference User Guide • batch:DescribeJobs • batch:DescribeJobQueues • batch:ListJobs • cloudtrail:LookupEvents • ec2:DescribeIamInstanceProfileAssociations • ec2:DescribeInstanceAttribute • ec2:DescribeInstances • ec2:DescribeInstanceTypeOfferings • ec2:DescribeInstanceTypes • ec2:DescribeNetworkAcls • ec2:DescribeRouteTables • ec2:DescribeSecurityGroups • ec2:DescribeSpotFleetInstances • ec2:DescribeSpotFleetRequests • ec2:DescribeSpotFleetRequestHistory • ec2:DescribeSubnets • ec2:DescribeVpcEndpoints • ec2:DescribeVpcs • ecs:DescribeClusters • ecs:DescribeContainerInstances • ecs:ListContainerInstances • iam:GetInstanceProfile • iam:GetRole • iam:ListRoles • iam:PassRole • iam:SimulateCustomPolicy • iam:SimulatePrincipalPolicy • ssm:DescribeAutomationExecutions • ssm:DescribeAutomationStepExecutions • ssm:GetAutomationExecution AWSSupport-TroubleshootAWSBatchJob 11 AWS Systems Manager Automation runbook reference User Guide • ssm:StartAutomationExecution • sts:GetCallerIdentity Instructions 1. Navigate to the AWSSupport-TroubleshootAWSBatchJob in the AWS Systems Manager Console. 2. Select Execute Automation 3. For input parameters, enter the following: • AutomationAssumeRole (Optional): The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • JobId (Required): The ID of the AWS Batch Job that is stuck in the RUNNABLE status. 4. Select Execute. 5. Notice that the automation initiates. 6. The document performs the following steps: • PreflightPermissionChecks: Performs preflight IAM permission checks against the initiating user/role. If there are any missing permissions, this step provides the API Actions missing in the global output section. • ProceedOnlyIfUserHasPermission: Branches based on if you have permissions to all required actions for the runbook. • AWSBatchJobEvaluation: Performs checks against the AWS Batch Job verifying it exists and is in the RUNNABLE status. AWSSupport-TroubleshootAWSBatchJob 12 AWS Systems Manager Automation runbook reference User Guide • ProceedOnlyIfBatchJobExistsAndIsinRunnableState: Branches based on if the jobs exists and is in the RUNNABLE status. • BatchComputeEnvironmentEvaluation: Performs checks against the AWS Batch Compute Environment. • ProceedOnlyIfComputeEnvironmentChecksAreOK: Branches based on if compute environment checks succeeded. • UnderlyingInfraEvaluation: Performs checks against the underlying Auto Scaling Group or Spot Fleet Request. • ProceedOnlyIfInstancesNotJoiningEcsCluster: Branches based on if there are instances not joining the Amazon ECS cluster. • EcsAutomationRunner: Runs the Amazon ECS automation for the instances not joining the cluster. • ExecutionResults: Generates output based on previous steps. 7. After completing, the URI for the assessment report HTML file is provided: S3 Console link and Amazon S3 URI for the Report on successful execution of the runbook AWSSupport-TroubleshootAWSBatchJob 13 AWS Systems Manager Automation runbook reference User Guide References Systems Manager Automation • Run this Automation (console) • Run an automation • Setting up an Automation • Support Automation Workflows landing page AWS CloudFormation AWS Systems Manager Automation provides predefined runbooks for AWS CloudFormation. For more information about runbooks, see Working with runbooks. For information about how to view runbook content, see View runbook content. Topics • AWS-DeleteCloudFormationStack • AWS-EnableCloudFormationSNSNotification AWS CloudFormation 14 AWS Systems Manager Automation runbook reference User Guide • AWS-RunCfnLint • AWSSupport-TroubleshootCFNCustomResource • AWS-UpdateCloudFormationStack AWS-DeleteCloudFormationStack Description Delete an AWS CloudFormation stack. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • StackNameOrId Type: String Description: (Required) Name or Unique ID of the CloudFormation stack to be deleted AWS-DeleteCloudFormationStack 15 AWS Systems Manager Automation runbook reference User Guide AWS-EnableCloudFormationSNSNotification Description The AWS-EnableCloudFormationSNSNotification runbook enables Amazon Simple Notification Service (Amazon SNS) notifications for the AWS CloudFormation (AWS CloudFormation) stack you specify. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • StackArn Type: String Description: (Required) The ARN or name of the AWS CloudFormation stack you want to enable Amazon SNS notifications for. • NotificationArn Type: String AWS-EnableCloudFormationSNSNotification 16 AWS Systems Manager Automation runbook reference User Guide Description: (Required) The ARN of the Amazon SNS topic you want to associate with
|
systems-manager-automation-runbook-guide-006
|
systems-manager-automation-runbook-guide.pdf
| 6 |
AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • StackArn Type: String Description: (Required) The ARN or name of the AWS CloudFormation stack you want to enable Amazon SNS notifications for. • NotificationArn Type: String AWS-EnableCloudFormationSNSNotification 16 AWS Systems Manager Automation runbook reference User Guide Description: (Required) The ARN of the Amazon SNS topic you want to associate with the AWS CloudFormation stack. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:GetAutomationExecution • ssm:StartAutomationExecution • cloudformation:DescribeStacks • cloudformation:UpdateStack • kms:Decrypt • kms:GenerateDataKey • sns:Publish • sqs:GetQueueAttributes Document Steps • CheckCfnSnsLimits (aws:executeScript) - Verifies the maximum number of Amazon SNS topics haven't already been associated with the AWS CloudFormation stack you specify. • EnableCfnSnsNotification (aws:executeAwsApi) - Enables Amazon SNS notifications for the AWS CloudFormation stack. • VerificationCfnSnsNotification (aws:executeScript) - Verifies that Amazon SNS notifications have been enabled for the AWS CloudFormation stack. Outputs CheckCfnSnsLimits.NotificationArnList - A list of ARNs that receive Amazon SNS notifications for the AWS CloudFormation stack. VerificationCfnSnsNotification.VerifySnsTopicsResponse - Response from the API operation confirming Amazon SNS notifications have been enabled for the AWS CloudFormation stack. AWS-EnableCloudFormationSNSNotification 17 AWS Systems Manager Automation runbook reference User Guide AWS-RunCfnLint Description This runbook uses an AWS CloudFormation Linter ( cfn-python-lint ) to validate YAML and JSON templates against the AWS CloudFormation resource specification. The AWS-RunCfnLint runbook performs additional checks, such as ensuring that valid values have been entered for resource properties. If validation is not successful, the RunCfnLintAgainstTemplate step fails and the linter tool's output is provided in an error message. This runbook is using cfn-lint v0.24.4. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • ConfigureRuleFlag Type: String Description: (Optional) Configuration options for a rule to pass to the --configure-rule parameter. AWS-RunCfnLint 18 AWS Systems Manager Automation runbook reference User Guide Example: E2001:strict=false,E3012:strict=false. • FormatFlag Type: String Description: (Optional) Value to pass to the --format parameter to specify the output format. Valid values: Default | quiet | parseable | json Default: Default • IgnoreChecksFlag Type: String Description: (Optional) IDs of rules to pass to the --ignore-checks parameter. These rules are not checked. Example: E1001,E1003,W7001 • IncludeChecksFlag Type: String Description: (Optional) IDs of rules to pass to the --include-checks parameter. These rules are checked. Example: E1001,E1003,W7001 • InfoFlag Type: String Description: (Optional) Option for the --info parameter. Include the option to enable additional logging information about the template processing. Default: false • TemplateFileName Type: String Description: The name, or key, of the template file in the S3 bucket. • TemplateS3BucketName AWS-RunCfnLint 19 AWS Systems Manager Automation runbook reference User Guide Type: String Description: The name of the S3 bucket containing the packer template. • RegionsFlag Type: String Description: (Optional) Values to pass to the for --regions parameter to test the template against specified AWS Regions. Example: us-east-1,us-west-1 Document Steps RunCfnLintAgainstTemplate – Runs the cfn-python-lint tool against the specified AWS CloudFormation template. Outputs RunCfnLintAgainstTemplate.output – The stdout from the cfn-python-lint tool. AWSSupport-TroubleshootCFNCustomResource Description The AWSSupport-TroubleshootCFNCustomResource runbook helps diagnose why an AWS CloudFormation stack failed in creating, updating, or deleting a custom resource. The runbook checks the service token used for the custom resource and the error message that was returned. After reviewing the details for the custom resource, the runbook output provides an explanation of the stack behavior and troubleshooting steps for the custom resource. Run this Automation (console) Document type Automation Owner Amazon AWSSupport-TroubleshootCFNCustomResource 20 AWS Systems Manager Automation runbook reference User Guide Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • StackName Type: String Description: (Required) The name of the AWS CloudFormation stack where the custom resource failed. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • cloudformation:DescribeStacks • cloudformation:DescribeStackEvents • cloudformation:ListStackResources • ec2:DescribeRouteTables • ec2:DescribeNatGateways • ec2:DescribeSecurityGroups • ec2:DescribeVpcs • ec2:DescribeVpcEndpoints • ec2:DescribeSubnets • logs:FilterLogEvents AWSSupport-TroubleshootCFNCustomResource 21 AWS Systems Manager Automation runbook reference User Guide Document Steps • validateCloudFormationStack - Verifies that the AWS CloudFormation stack exists in the same AWS
|
systems-manager-automation-runbook-guide-007
|
systems-manager-automation-runbook-guide.pdf
| 7 |
on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • StackName Type: String Description: (Required) The name of the AWS CloudFormation stack where the custom resource failed. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • cloudformation:DescribeStacks • cloudformation:DescribeStackEvents • cloudformation:ListStackResources • ec2:DescribeRouteTables • ec2:DescribeNatGateways • ec2:DescribeSecurityGroups • ec2:DescribeVpcs • ec2:DescribeVpcEndpoints • ec2:DescribeSubnets • logs:FilterLogEvents AWSSupport-TroubleshootCFNCustomResource 21 AWS Systems Manager Automation runbook reference User Guide Document Steps • validateCloudFormationStack - Verifies that the AWS CloudFormation stack exists in the same AWS account and AWS Region. • checkCustomResource - Analyzes the AWS CloudFormation stack, checks the failed custom resource, and outputs information about how to troubleshoot the failed custom resource. AWS-UpdateCloudFormationStack Description Update an AWS CloudFormation stack by using an AWS CloudFormation template stored in an Amazon S3 bucket. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • LambdaAssumeRole AWS-UpdateCloudFormationStack 22 AWS Systems Manager Automation runbook reference User Guide Type: String Description: (Required) The ARN of the role assumed by Lambda • StackNameOrId Type: String Description: (Required) Name or Unique ID of the AWS CloudFormation stack to be updated • TemplateUrl Type: String Description: (Required) S3 bucket location that contains the updated CloudFormation template (e.g. https://s3.amazonaws.com/amzn-s3-demo-bucket2/updated.template) CloudFront AWS Systems Manager Automation provides predefined runbooks for Amazon CloudFront. For more information about runbooks, see Working with runbooks. For information about how to view runbook content, see View runbook content. Topics • AWSConfigRemediation-EnableCloudFrontDefaultRootObject • AWSConfigRemediation-EnableCloudFrontAccessLogs • AWSConfigRemediation-EnableCloudFrontOriginAccessIdentity • AWSConfigRemediation-EnableCloudFrontOriginFailover • AWSConfigRemediation-EnableCloudFrontViewerPolicyHTTPS AWSConfigRemediation-EnableCloudFrontDefaultRootObject Description The AWSConfigRemediation-EnableCloudFrontDefaultRootObject runbook configures the default root object for the Amazon CloudFront (CloudFront) distribution that you specify. Run this Automation (console) CloudFront 23 AWS Systems Manager Automation runbook reference User Guide Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. • CloudFrontDistributionId Type: String Description: (Required) The ID of the CloudFront distribution that you want to configure the default root object for. • DefaultRootObject Type: String Description: (Required) The object that you want CloudFront to return when a viewer request points to your root URL. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:GetAutomationExecution AWSConfigRemediation-EnableCloudFrontDefaultRootObject 24 AWS Systems Manager Automation runbook reference User Guide • cloudfront:GetDistributionConfig • cloudfront:UpdateDistribution Document Steps • aws:executeScript - Configures the default root object for the CloudFront distribution that you specify in the CloudFrontDistributionId parameter. AWSConfigRemediation-EnableCloudFrontAccessLogs Description The AWSConfigRemediation-EnableCloudFrontAccessLogs runbook enables access logging for the Amazon CloudFront (CloudFront) distribution you specify. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. • BucketName AWSConfigRemediation-EnableCloudFrontAccessLogs 25 AWS Systems Manager Automation runbook reference User Guide Type: String Description: (Required) The name of the Amazon Simple Storage Service (Amazon S3) bucket you want to store access logs in. Buckets in the af-south-1, ap-east-1, eu-south-1, and me-south-1 AWS Region are not supported. • CloudFrontId Type: String Description: (Required) The ID of the CloudFront distribution you want to enable access logging on. • IncludeCookies Type: Boolean Valid values: true | false Description: (Required) Set this parameter to true , if you want cookies to be included in the access logs. • Prefix Type: String Description: (Optional) An optional string that you want CloudFront to prefix to the access log filenames for your distribution, for example, myprefix/. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:GetAutomationExecution • cloudfront:GetDistribution • cloudfront:GetDistributionConfig • cloudfront:UpdateDistribution • s3:GetBucketLocation AWSConfigRemediation-EnableCloudFrontAccessLogs 26 AWS Systems Manager Automation runbook reference User Guide • s3:GetBucketAcl • s3:PutBucketAcl Note The s3:GetBucketLocation API can only be used for S3 buckets in same account. You cannot use it for cross-account S3 buckets. Document Steps • aws:executeScript - Enables access logging for the CloudFront distribution you specify in the CloudFrontDistributionId parameter. AWSConfigRemediation- EnableCloudFrontOriginAccessIdentity Description The AWSConfigRemediation-EnableCloudFrontOriginAccessIdentity runbook enables origin access identity for the Amazon CloudFront (CloudFront) distribution you specify. This automation assigns the same CloudFront Origin Access Identity for all Origins of the Amazon Simple Storage Service (Amazon S3) Origin type without origin access identity for the CloudFront distribution you specify.
|
systems-manager-automation-runbook-guide-008
|
systems-manager-automation-runbook-guide.pdf
| 8 |
Manager Automation runbook reference User Guide • s3:GetBucketAcl • s3:PutBucketAcl Note The s3:GetBucketLocation API can only be used for S3 buckets in same account. You cannot use it for cross-account S3 buckets. Document Steps • aws:executeScript - Enables access logging for the CloudFront distribution you specify in the CloudFrontDistributionId parameter. AWSConfigRemediation- EnableCloudFrontOriginAccessIdentity Description The AWSConfigRemediation-EnableCloudFrontOriginAccessIdentity runbook enables origin access identity for the Amazon CloudFront (CloudFront) distribution you specify. This automation assigns the same CloudFront Origin Access Identity for all Origins of the Amazon Simple Storage Service (Amazon S3) Origin type without origin access identity for the CloudFront distribution you specify. This automation does not grant read permission to the origin access identity for CloudFront to access objects in your Amazon S3 bucket. You must update your Amazon S3 bucket permissions to allow access. Run this Automation (console) Document type Automation Owner Amazon Platforms AWSConfigRemediation-EnableCloudFrontOriginAccessIdentity 27 AWS Systems Manager Automation runbook reference User Guide Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. • CloudFrontDistributionId Type: String Description: (Required) The ID of the CloudFront distribution you want to enable origin failover on. • OriginAccessIdentityId Type: String Description: (Required) The ID of the CloudFront origin access identity to associate with the origin. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:GetAutomationExecution • cloudfront:GetDistributionConfig • cloudfront:UpdateDistribution Document Steps • aws:executeScript - Enables origin access identity for the CloudFront distribution you specify in the CloudFrontDistributionId parameter, and verifies the origin access identity was assigned. AWSConfigRemediation-EnableCloudFrontOriginAccessIdentity 28 AWS Systems Manager Automation runbook reference User Guide AWSConfigRemediation-EnableCloudFrontOriginFailover Description The AWSConfigRemediation-EnableCloudFrontOriginFailover runbook enables origin failover for the Amazon CloudFront (CloudFront) distribution you specify. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. • CloudFrontDistributionId Type: String Description: (Required) The ID of the CloudFront distribution you want to enable origin failover on. • OriginGroupId Type: String Description: (Required) The ID of the origin group. AWSConfigRemediation-EnableCloudFrontOriginFailover 29 AWS Systems Manager Automation runbook reference User Guide • PrimaryOriginId Type: String Description: (Required) The ID of the primary origin in the origin group. • SecondaryOriginId Type: String Description: (Required) The ID of the secondary origin in the origin group. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:GetAutomationExecution • cloudfront:GetDistributionConfig • cloudfront:UpdateDistribution Document Steps • aws:executeScript - Enables origin failover for the CloudFront distribution you specify in the CloudFrontDistributionId parameter, and verifies that failover has been enabled. AWSConfigRemediation-EnableCloudFrontViewerPolicyHTTPS Description The AWSConfigRemediation-EnableCloudFrontViewerPolicyHTTPS runbook enables the viewer protocol policy for the Amazon CloudFront (CloudFront) distribution you specify. Run this Automation (console) Document type Automation AWSConfigRemediation-EnableCloudFrontViewerPolicyHTTPS 30 AWS Systems Manager Automation runbook reference User Guide Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. • CloudFrontDistributionId Type: String Description: (Required) The ID of the CloudFront distribution you want to enable the viewer protocol policy on. • ViewerProtocolPolicy Type: String Valid values: https-only, redirect-to-https Description: (Required) The protocol that viewers can use to access the files in the origin. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:GetAutomationExecution • cloudfront:GetDistributionConfig • cloudfront:UpdateDistribution AWSConfigRemediation-EnableCloudFrontViewerPolicyHTTPS 31 AWS Systems Manager Automation runbook reference User Guide • cloudfront:GetDistribution Document Steps • aws:executeScript - Enables the viewer protocol policy for the CloudFront distribution you specify in the CloudFrontDistributionId parameter, and verifies the policy was assigned. CloudTrail AWS Systems Manager Automation provides predefined runbooks for AWS CloudTrail. For more information about runbooks, see Working with runbooks. For information about how to view runbook content, see View runbook content. Topics • AWSConfigRemediation-CreateCloudTrailMultiRegionTrail • AWS-EnableCloudTrail • AWS-EnableCloudTrailCloudWatchLogs • AWSConfigRemediation-EnableCloudTrailEncryptionWithKMS • AWS-EnableCloudTrailKmsEncryption • AWSConfigRemediation-EnableCloudTrailLogFileValidation • AWS-EnableCloudTrailLogFileValidation • AWS-QueryCloudTrailLogs AWSConfigRemediation-CreateCloudTrailMultiRegionTrail Description The AWSConfigRemediation-CreateCloudTrailMultiRegionTrail runbook creates an AWS CloudTrail (CloudTrail) trail that delivers log files from multiple AWS Regions to the Amazon Simple Storage Service (Amazon S3) bucket of your choice. Run this Automation (console) Document type Automation CloudTrail 32 AWS Systems Manager Automation runbook reference User Guide Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. • BucketName Type: String Description: (Required) The name of the Amazon S3 bucket you want
|
systems-manager-automation-runbook-guide-009
|
systems-manager-automation-runbook-guide.pdf
| 9 |
The AWSConfigRemediation-CreateCloudTrailMultiRegionTrail runbook creates an AWS CloudTrail (CloudTrail) trail that delivers log files from multiple AWS Regions to the Amazon Simple Storage Service (Amazon S3) bucket of your choice. Run this Automation (console) Document type Automation CloudTrail 32 AWS Systems Manager Automation runbook reference User Guide Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. • BucketName Type: String Description: (Required) The name of the Amazon S3 bucket you want to upload logs to. • KeyPrefix Type: String Description: (Optional) The Amazon S3 key prefix that comes after the name of the bucket you designated for log file delivery. • TrailName Type: String Description: (Required) The name of the CloudTrail trail to be created. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:GetAutomationExecution AWSConfigRemediation-CreateCloudTrailMultiRegionTrail 33 AWS Systems Manager Automation runbook reference User Guide • cloudtrail:CreateTrail • cloudtrail:StartLogging • cloudtrail:GetTrail • s3:PutObject • s3:GetBucketAcl • s3:PutBucketLogging • s3:ListBucket Document Steps • aws:executeAwsApi - Accepts the trail name and the Amazon S3 bucket name as input and creates a CloudTrail trail. • aws:executeAwsApi - Enables logging on the created trail and starts log delivery to the Amazon S3 bucket you specified. • aws:assertAwsResourceProperty - Verifies that the CloudTrail trail has been created. AWS-EnableCloudTrail Description Create an AWS CloudTrail trail and configure logging to an S3 bucket. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters AWS-EnableCloudTrail 34 AWS Systems Manager Automation runbook reference User Guide • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • S3BucketName Type: String Description: (Required) Name of the S3 bucket designated for publishing log files. Note The S3 bucket must exist and the bucket policy must grant CloudTrail permission to write to it. For information, see Amazon S3 Bucket Policy for CloudTrail . • TrailName Type: String Description: (Required) The name of the new trail. AWS-EnableCloudTrailCloudWatchLogs Description This runbook updates the configuration of one or more AWS CloudTrail trails to send events to an Amazon CloudWatch Logs log group. Run this Automation (console) Document type Automation Owner Amazon AWS-EnableCloudTrailCloudWatchLogs 35 AWS Systems Manager Automation runbook reference User Guide Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • CloudWatchLogsLogGroupArn Type: String Description: (Required) The ARN of the CloudWatch Logs log group where the CloudTrail logs will be delivered. • CloudWatchLogsRoleArn Type: String Description: (Required) The ARN of the IAM role CloudWatch Logs Logs assumes to write to the specified log group. • TrailNames Type: StringList Description: (Required) A comma separated list of the names of the CloudTrail trails whose events you want to send to CloudWatch Logs. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • cloudtrail:UpdateTrail • iam:PassRole AWS-EnableCloudTrailCloudWatchLogs 36 AWS Systems Manager Automation runbook reference User Guide Document Steps • aws:executeScript - Updates the specified CloudTrail trails to deliver events to the specified CloudWatch Logs log group. AWSConfigRemediation-EnableCloudTrailEncryptionWithKMS Description The AWSConfigRemediation-EnableCloudTrailEncryptionWithKMS runbook encrypts an AWS CloudTrail (CloudTrail) trail using the AWS Key Management Service (AWS KMS) customer managed key you specify. This runbook should only be used as a baseline to ensure that your CloudTrail trails are encrypted according to minimum recommended security best practices. We recommend encrypting multiple trails with different KMS keys. CloudTrail digest files are not encrypted. If you have previously set the EnableLogFileValidation parameter to true for the trail, see the "Use server-side encryption with AWS KMS managed keys" section of the CloudTrail Preventative Security Best Practices topic in the AWS CloudTrail User Guide for more information. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. AWSConfigRemediation-EnableCloudTrailEncryptionWithKMS 37 AWS Systems Manager Automation runbook reference User Guide • KMSKeyId Type: String Description: (Required) The ARN, key ID, or the key alias of the of the customer managed key you want to use to encrypt the trail you specify in the TrailName parameter. • TrailName Type: String
|
systems-manager-automation-runbook-guide-010
|
systems-manager-automation-runbook-guide.pdf
| 10 |
User Guide for more information. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. AWSConfigRemediation-EnableCloudTrailEncryptionWithKMS 37 AWS Systems Manager Automation runbook reference User Guide • KMSKeyId Type: String Description: (Required) The ARN, key ID, or the key alias of the of the customer managed key you want to use to encrypt the trail you specify in the TrailName parameter. • TrailName Type: String Description: (Required) The ARN or name of the trail you want to update to be encrypted. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:GetAutomationExecution • cloudtrail:GetTrail • cloudtrail:UpdateTrail Document Steps • aws:executeAwsApi - Enables encryption on the trail you specify in the TrailName parameter. • aws:executeAwsApi - Gathers the ARN for the customer managed key you specify in the KMSKeyId parameter. • aws:assertAwsResourceProperty - Verifies that encryption has been enabled on the CloudTrail trail. AWS-EnableCloudTrailKmsEncryption Description This runbook updates the configuration of one or more AWS CloudTrail trails to use AWS Key Management Service (AWS KMS) encryption. AWS-EnableCloudTrailKmsEncryption 38 AWS Systems Manager Automation runbook reference User Guide Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • KMSKeyId Type: String Description: (Required) The key ID of the of the customer managed key you want to use to encrypt the trail you specify in the TrailName parameter. The value can be an alias name prefixed by "alias/", a fully specified ARN to an alias, or a fully specified ARN to a key. • TrailNames Type: StringList Description: (Required) A comma separated list of the trails you want to update to be encrypted. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. AWS-EnableCloudTrailKmsEncryption 39 AWS Systems Manager Automation runbook reference User Guide • cloudtrail:UpdateTrail • kms:DescribeKey • kms:ListKeys Document Steps • aws:executeScript - Enables AWS KMS encryption on the trails you specify in the TrailName parameter. AWSConfigRemediation-EnableCloudTrailLogFileValidation Description The AWSConfigRemediation-EnableCloudTrailLogFileValidation runbook enables log file validation for your AWS CloudTrail trail. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. AWSConfigRemediation-EnableCloudTrailLogFileValidation 40 AWS Systems Manager Automation runbook reference User Guide • TrailName Type: String Description: (Required) The name or Amazon Resource Name (ARN) of the trail you want to enable log validation for. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:GetAutomationExecution • cloudtrail:GetTrail • cloudtrail:UpdateTrail Document Steps • aws:executeAwsApi - Enables log validation for the AWS CloudTrail trail you specify in the TrailName parameter. • aws:assertAwsResourceProperty - Verifies log validation is enabled for your trail. AWS-EnableCloudTrailLogFileValidation Description The AWS-EnableCloudTrailLogFileValidation runbook enables log file validation for the AWS CloudTrail trails you specify. Run this Automation (console) Document type Automation Owner AWS-EnableCloudTrailLogFileValidation 41 AWS Systems Manager Automation runbook reference User Guide Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • TrailNames Type: StringList Description: (Required) A comma separated list of the names of the CloudTrail trails you want to enable log validation for. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • cloudtrail:GetTrail • cloudtrail:UpdateTrail Document Steps • aws:executeScript - Enables log validation for the AWS CloudTrail trails you specify in the TrailNames parameter. AWS-QueryCloudTrailLogs Description AWS-QueryCloudTrailLogs 42 AWS Systems Manager Automation runbook reference User Guide The AWS-QueryCloudTrailLogs runbook creates an Amazon Athena table from the Amazon Simple Storage Service (Amazon S3) bucket of your choice containing AWS CloudTrail (CloudTrail) logs. After creating the table, the automation runs SQL queries you specify and then deletes the table. Run this Automation (console) Document type Automation Owner Amazon Platforms Databases Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your
|
systems-manager-automation-runbook-guide-011
|
systems-manager-automation-runbook-guide.pdf
| 11 |
in the TrailNames parameter. AWS-QueryCloudTrailLogs Description AWS-QueryCloudTrailLogs 42 AWS Systems Manager Automation runbook reference User Guide The AWS-QueryCloudTrailLogs runbook creates an Amazon Athena table from the Amazon Simple Storage Service (Amazon S3) bucket of your choice containing AWS CloudTrail (CloudTrail) logs. After creating the table, the automation runs SQL queries you specify and then deletes the table. Run this Automation (console) Document type Automation Owner Amazon Platforms Databases Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • Query Type: String Description: (Required) The SQL query you want to run. • SourceBucketPath Type: String Description: (Required) The name of the Amazon S3 bucket containing the CloudTrail log files you want to query. • TableName AWS-QueryCloudTrailLogs 43 AWS Systems Manager Automation runbook reference User Guide Type: String Description: (Optional) The name of the Athena table created by the automation. Default: cloudtrail_logs Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • athena:GetQueryResults • athena:GetQueryExecution • athena:StartQueryExecution • glue:CreateTable • glue:DeleteTable • glue:GetDatabase • glue:GetPartitions • glue:GetTable • s3:AbortMultipartUpload • s3:CreateBucket • s3:GetBucketLocation • s3:GetObject • s3:ListBucket • s3:ListBucketMultipartUploads • s3:ListMultipartUploadParts • s3:PutObject Document Steps • aws:executeAwsApi - Creates an Athena table. • aws:executeAwsApi - Runs the query string you specify in the Query parameter. • aws:executeScript - Polls and waits for the query to complete. AWS-QueryCloudTrailLogs 44 AWS Systems Manager Automation runbook reference User Guide • aws:executeAwsApi - Gets the results of the query. • aws:executeAwsApi - Deletes the table created by the automation. CloudWatch AWS Systems Manager Automation provides predefined runbooks for Amazon CloudWatch. For more information about runbooks, see Working with runbooks. For information about how to view runbook content, see View runbook content. Topics • AWS-ConfigureCloudWatchOnEC2Instance • AWS-EnableCWAlarm AWS-ConfigureCloudWatchOnEC2Instance Description Enable or disable Amazon CloudWatch detailed monitoring on managed instances. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on CloudWatch 45 AWS Systems Manager Automation runbook reference User Guide your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • InstanceId Type: String Description: (Required) The ID of the Amazon EC2 instance on which you want to enable CloudWatch monitoring. • properties Type: String Description: (Optional) This parameter is not supported. It is listed here for backwards compatibility. • status Valid values: Enabled | Disabled Description: (Optional) Specifies whether to enable or disable CloudWatch. Default: Enabled Document Steps configureCloudWatch - Configures CloudWatch on the Amazon EC2 instance with the given status. Outputs This automation has no output. AWS-EnableCWAlarm Description The AWS-EnableCWAlarm runbook creates Amazon CloudWatch (CloudWatch) alarms for AWS resources in your AWS account that do not already have one. CloudWatch alarms are created for the following AWS resources: • Amazon Elastic Compute Cloud (Amazon EC2) instances • Amazon Elastic Block Store (Amazon EBS) volumes AWS-EnableCWAlarm 46 AWS Systems Manager Automation runbook reference User Guide • Amazon Simple Storage Service (Amazon S3) buckets • Amazon Relational Database Service (Amazon RDS) clusters Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • ComparisonOperator Type: String Valid values: GreaterThanOrEqualToThreshold | GreaterThanThreshold | GreaterThanUpperThreshold | LessThanLowerOrGreaterThanUpperThreshol | LessThanLowerThreshold | LessThanOrEqualToThreshold | LessThanThreshold Description: (Required) The arithmetic operation to use when comparing the specified statistic and threshold. • MetricName Type: String AWS-EnableCWAlarm 47 AWS Systems Manager Automation runbook reference User Guide Description: (Required) The name for the metric associated with the alarm. • Period Type: Integer Valid values: 10 | 30 | 60 | A multiple of 60 Description: (Required) The period, in seconds, over which the statistic is applied. • ResourceARNs Type: StringList Description: (Required) A comma separated list of ARNs of the resources to create a CloudWatch alarm for • Statistic Type: String Valid values: Average | Maximum | Minimum | SampleCount | Sum Description: (Required) The statistic for the metric associated with the alarm. • Threshold Type: Integer Description: (Required) The value to compare with the specified statistic. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • cloudwatch:PutMetricAlarm Document Steps • aws:executeScript - Creates
|
systems-manager-automation-runbook-guide-012
|
systems-manager-automation-runbook-guide.pdf
| 12 |
A multiple of 60 Description: (Required) The period, in seconds, over which the statistic is applied. • ResourceARNs Type: StringList Description: (Required) A comma separated list of ARNs of the resources to create a CloudWatch alarm for • Statistic Type: String Valid values: Average | Maximum | Minimum | SampleCount | Sum Description: (Required) The statistic for the metric associated with the alarm. • Threshold Type: Integer Description: (Required) The value to compare with the specified statistic. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • cloudwatch:PutMetricAlarm Document Steps • aws:executeScript - Creates a CloudWatch alarm according to the values specified in the runbook parameters for the resources you specify in the ResourceARNs parameter . AWS-EnableCWAlarm 48 AWS Systems Manager Automation runbook reference User Guide Outputs EnableCWAlarm.FailedResources: A maplist of resource ARNs for which a CloudWatch alarm was not created and the reason for the failure. EnableCWAlarm.SuccessfulResources: A list of resource ARNs for which a CloudWatch alarm was successfully created. Amazon DocumentDB AWS Systems Manager Automation provides predefined runbooks for Amazon DocumentDB (with MongoDB compatibility). For more information about runbooks, see Working with runbooks. For information about how to view runbook content, see View runbook content. Topics • AWS-EnableDocDbClusterBackupRetentionPeriod AWS-EnableDocDbClusterBackupRetentionPeriod Description The AWS-EnableDocDbClusterBackupRetentionPeriod runbook enables a backup retention period for the Amazon DocumentDB cluster you specify. This feature sets the total number of days for which an automated backup is retained. To modify a cluster, the cluster must be in the available state with an engine type of docdb. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters Amazon DocumentDB 49 AWS Systems Manager Automation runbook reference User Guide • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • DBClusterResourceId Type: String Description: (Required) The resource ID for the Amazon DocumentDB cluster you want to enable the backup retention period for. • BackupRetentionPeriod Type: Integer Description: (Required) The number of days for which automated backups are retained. Must be a value from 7-35 days. • PreferredBackupWindow Type: String Description: (Optional) A daily time range in Universal Time Coordinated (UTC) in the format hh24:mm-hh24:mm, for example 07:14-07:44. The value must be at least 30 minutes and can't conflict with the preferred maintenance window. • ssm:GetAutomationExecution • ssm:StartAutomationExecution • docdb:DescribeDBClusters • docdb:ModifyDBCluster • rds:DescribeDBClusters • rds:ModifyDBCluster Document Steps AWS-EnableDocDbClusterBackupRetentionPeriod 50 AWS Systems Manager Automation runbook reference User Guide • GetDocDbClusterIdentifier (aws:executeAwsApi) - Returns the Amazon DocumentDB cluster identifier using the provided resource ID. • VerifyDocDbEngine (aws:assertAwsResourceProperty) - Verifies the Amazon DocumentDB engine type is docdb to prevent inadvertent changes to other Amazon RDS engine types. • VerifyDocDbStatus (aws:waitAwsResourceProperty) - Verifies the Amazon DocumentDB cluster status is available. • ModifyDocDbRetentionPeriod (aws:executeAwsApi) - Sets the retention period using the provided values for the specified Amazon DocumentDB cluster. • VerifyDocDbBackupsEnabled (aws:executeScript) - Verifies the retention period for the Amazon DocumentDB cluster and the preferred back up window, if specified, were successfully set. Outputs ModifyDocDbRetentionPeriod.ModifyDbClusterResponse - Response from the ModifyDBCluster API operation. VerifyDocDbBackupsEnabled.VerifyDbClusterBackupsEnabledResponse - Output from the VerifyDocDbBackupsEnabled step confirming successful modification of the Amazon DocumentDB cluster. CodeBuild AWS Systems Manager Automation provides predefined runbooks for AWS CodeBuild. For more information about runbooks, see Working with runbooks. For information about how to view runbook content, see View runbook content. Topics • AWSConfigRemediation-ConfigureCodeBuildProjectWithKMSCMK • AWSConfigRemediation-DeleteAccessKeysFromCodeBuildProject AWSConfigRemediation-ConfigureCodeBuildProjectWithKMSCMK Description CodeBuild 51 AWS Systems Manager Automation runbook reference User Guide The AWSConfigRemediation-ConfigureCodeBuildProjectWithKMSCMK runbook encrypts an AWS CodeBuild (CodeBuild) project's build artifacts using the AWS Key Management Service (AWS KMS) customer managed key you specify. AWS Config must be enabled in the AWS Region where you run this automation. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. • KMSKeyId Type: String Description: (Required) The Amazon Resource Name (ARN) of the AWS KMS customer managed key you want to use to encrypt the CodeBuild project you specify in the ProjectId parameter. • ProjectId Type: String Description: (Required) The ID of the CodeBuild project whose build artifacts you want to encrypt. Required IAM permissions AWSConfigRemediation-ConfigureCodeBuildProjectWithKMSCMK 52 AWS Systems Manager Automation runbook reference User Guide The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:GetAutomationExecution • codebuild:BatchGetProjects • codebuild:UpdateProject • config:GetResourceConfigHistory Document Steps • aws:executeAwsApi - Gathers the CodeBuild project name from the project ID. • aws:executeAwsApi - Enables encryption on the CodeBuild project you specify in
|
systems-manager-automation-runbook-guide-013
|
systems-manager-automation-runbook-guide.pdf
| 13 |
AWS KMS customer managed key you want to use to encrypt the CodeBuild project you specify in the ProjectId parameter. • ProjectId Type: String Description: (Required) The ID of the CodeBuild project whose build artifacts you want to encrypt. Required IAM permissions AWSConfigRemediation-ConfigureCodeBuildProjectWithKMSCMK 52 AWS Systems Manager Automation runbook reference User Guide The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:GetAutomationExecution • codebuild:BatchGetProjects • codebuild:UpdateProject • config:GetResourceConfigHistory Document Steps • aws:executeAwsApi - Gathers the CodeBuild project name from the project ID. • aws:executeAwsApi - Enables encryption on the CodeBuild project you specify in the ProjectId parameter. • aws:assertAwsResourceProperty - Verifies that encryption has been enabled on the CodeBuild project. Outputs UpdateLambdaConfig.UpdateFunctionConfigurationResponse - Response from the UpdateFunctionConfiguration API call. AWSConfigRemediation- DeleteAccessKeysFromCodeBuildProject Description The AWSConfigRemediation-DeleteAccessKeysFromCodeBuildProject runbook deletes the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables from the AWS CodeBuild (CodeBuild) project you specify. AWS Config must be enabled in the AWS Region where you run this automation. Run this Automation (console) Document type Automation AWSConfigRemediation-DeleteAccessKeysFromCodeBuildProject 53 AWS Systems Manager Automation runbook reference User Guide Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. • ResourceId Type: String Description: (Required) The ID of the CodeBuild project whose access key environment variables you want to delete. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:GetAutomationExecution • config:GetResourceConfigHistory • codebuild:BatchGetProjects • codebuild:UpdateProject Document Steps • aws:executeScript - Deletes the access key environment variables for the CodeBuild project specified in the ResourceId parameter. AWSConfigRemediation-DeleteAccessKeysFromCodeBuildProject 54 AWS Systems Manager Automation runbook reference User Guide AWS CodeDeploy AWS Systems Manager Automation provides predefined runbooks for AWS CodeDeploy. For more information about runbooks, see Working with runbooks. For information about how to view runbook content, see View runbook content. Topics • AWSSupport-TroubleshootCodeDeploy AWSSupport-TroubleshootCodeDeploy Description The AWSSupport-TroubleshootCodeDeploy runbook helps diagnose why an AWS CodeDeploy deployment failed on an Amazon Elastic Compute Cloud (Amazon EC2) instance. The runbook outputs steps to help you resolve the issue or troubleshoot further. Best practices for CodeDeploy are also provided to help you avoid similar issues in the future. This runbook can help you to resolve the following issues: • The CodeDeploy agent is not installed or not running on the Amazon EC2 instance • The Amazon EC2 instance does not have an AWS Identity and Access Management (IAM) instance profile attached • The IAM instance profile attached to the Amazon EC2 instance does not have the required Amazon Simple Storage Service (Amazon S3) permissions • A revision stored in Amazon S3 is missing, or the Amazon S3 bucket used is in an AWS Region that is different than the Amazon EC2 instance • Application specification (AppSpec) file issues • "File already exists at location" errors • Failed CodeDeploy managed lifecycle event hooks • Failed customer managed lifecycle event hooks • Scale-in events during the deployment Run this Automation (console) AWS CodeDeploy 55 AWS Systems Manager Automation runbook reference User Guide Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • DeploymentId Type: String Description: (Required) The ID of the deployment which failed. • InstanceId Type: String Description: (Required) The ID of the Amazon EC2 instance where the deployment failed. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • codedeploy:GetDeployment • codedeploy:GetDeploymentTarget AWSSupport-TroubleshootCodeDeploy 56 AWS Systems Manager Automation runbook reference User Guide • ec2:DescribeInstances Document Steps • aws:executeAwsApi - Verifies the values provided for the DeploymentId and InstanceId parameters. • aws:executeScript - Collects information from the Amazon EC2 instance such as the state of the instance and IAM instance profile details. • aws:executeScript - Reviews the specified deployment, and returns an analysis regarding why the deployment failed. AWS Config AWS Systems Manager Automation provides predefined runbooks for AWS Config. For more information about runbooks, see Working with runbooks. For information about how to view runbook content, see View runbook content. Topics • AWSSupport-SetupConfig AWSSupport-SetupConfig Description The AWSSupport-SetupConfig runbook creates an AWS Identity and Access Management (IAM) service-linked role, a configuration recorder powered by AWS Config, and a delivery channel with an Amazon Simple Storage Service (Amazon S3) bucket where AWS Config sends configuration snapshots and configuration history files. If you specify values for the AggregatorAccountId and AggregatorAccountRegion parameters, the runbook also creates authorizations for data aggregation to collect AWS Config configuration and
|
systems-manager-automation-runbook-guide-014
|
systems-manager-automation-runbook-guide.pdf
| 14 |
Automation provides predefined runbooks for AWS Config. For more information about runbooks, see Working with runbooks. For information about how to view runbook content, see View runbook content. Topics • AWSSupport-SetupConfig AWSSupport-SetupConfig Description The AWSSupport-SetupConfig runbook creates an AWS Identity and Access Management (IAM) service-linked role, a configuration recorder powered by AWS Config, and a delivery channel with an Amazon Simple Storage Service (Amazon S3) bucket where AWS Config sends configuration snapshots and configuration history files. If you specify values for the AggregatorAccountId and AggregatorAccountRegion parameters, the runbook also creates authorizations for data aggregation to collect AWS Config configuration and compliance data from multiple AWS accounts and multiple AWS Regions. To learn more about aggregating data from multiple accounts and Regions, see Multi-Account Multi-Region Data Aggregation in the AWS Config Developer Guide . Run this Automation (console) Document type AWS Config 57 AWS Systems Manager Automation runbook reference User Guide Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • AggregatorAccountId Type: String Description: (Optional) The ID of the AWS account where an aggregator will be added to aggregate AWS Config configuration and compliance data from multiple accounts and AWS Regions. This account is also used by the aggregator to authorize the source accounts. • AggregatorAccountRegion Type: String Description: (Optional) The Region where an aggregator will be added to aggregate AWS Config configuration and compliance data from multiple accounts and Regions. • IncludeGlobalResourcesRegion Type: String Default: us-east-1 Description: (Required) To avoid recording global resource data in each Region, specify one Region to record global resource data from. AWSSupport-SetupConfig 58 AWS Systems Manager Automation runbook reference User Guide • Partition Type: String Default: aws Description: (Required) The partition you want to collect AWS Config configuration and compliance data from. • S3BucketName Type: String Default: aws-config-delivery-channel Description: (Optional) The name you want to apply to the Amazon S3 bucket created for the delivery channel. The account ID is appended to the end of the name. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:GetAutomationExecution • config:DescribeConfigurationRecorders • config:DescribeDeliveryChannels • config:PutAggregationAuthorization • config:PutConfigurationRecorder • config:PutDeliveryChannel • config:StartConfigurationRecorder • iam:CreateServiceLinkedRole • iam:PassRole • s3:CreateBucket • s3:ListAllMyBuckets • s3:PutBucketPolicy AWSSupport-SetupConfig 59 AWS Systems Manager Automation runbook reference User Guide Document Steps • aws:executeScript - Creates a service-linked IAM role for AWS Config if one does not already exist. • aws:executeScript - Creates a configuration recorder if one does not already exist. • aws:executeScript - Creates an Amazon S3 bucket to be used by the delivery channel if one does not already exist. • aws:executeScript - Creates a delivery channel using the resources created by the runbook. • aws:executeAwsApi - Starts the configuration recorder. • aws:executeScript - If you specified values for the AggregatorAccountId and AggregatorAccountRegion parameters, authorizations for multi-account and multi-Region data aggregation are configured. Amazon Connect AWS Systems Manager Automation provides predefined runbooks for Amazon Connect. For more information about runbooks, see Working with runbooks. For information about how to view runbook content, see View runbook content. Topics • AWSSupport-AssociatePhoneNumbersToConnectContactFlows • AWSSupport-CollectAmazonConnectContactFlowLog AWSSupport-AssociatePhoneNumbersToConnectContactFlows Description The AWSSupport-AssociatePhoneNumbersToConnectContactFlows helps you associate phone numbers to contact flows in your Amazon Connect instance. By providing the mappings of phone numbers and contact flows in an input comma-separated values (CSV) file, the runbook associates as many phone numbers to contact flows as possible within 14.5 minutes. The runbook produces a CSV file of all phone number and contact flow pairs that it couldn't associate within the time limit so that you can input them in the next run. How does it work? Amazon Connect 60 AWS Systems Manager Automation runbook reference User Guide The runbook AWSSupport-AssociatePhoneNumbersToConnectContactFlows helps you associate phone numbers to contact flows in your Amazon Connect instance using a CSV file of mapping data that is stored in an Amazon Simple Storage Service (Amazon S3) bucket. The input CSV file should align to the following format, with PhoneNumber values in E.164 format. Example of the input CSV file PhoneNumber,ContactFlowName +1800555xxxx,ContactFlowA +1800555yyyy,ContactFlowB +1800555zzzz,ContactFlowC The automation runbook also creates the following files in the destination location specified in the DestinationFileBucket and DestinationFilePath. • automation:EXECUTION_ID/ResourceIdList.csv: A temporary file that contains the PhoneNumberId and ContactFlowId pairs that are required for the AssociatePhoneNumberContactFlow API. • automation:EXECUTION_ID/ErrorResourceList.csv: A file that contains the phone number and contact flow pairs that could not be processed due to an error, such as ResourceNotFoundException in the format of PhoneNumber,ContactFlowName,ErrorMessage. • automation:EXECUTION_ID/NonProcessedResourceList.csv: A file that contains the phone number and contact flow pairs that weren't processed. The runbook tries
|
systems-manager-automation-runbook-guide-015
|
systems-manager-automation-runbook-guide.pdf
| 15 |
values in E.164 format. Example of the input CSV file PhoneNumber,ContactFlowName +1800555xxxx,ContactFlowA +1800555yyyy,ContactFlowB +1800555zzzz,ContactFlowC The automation runbook also creates the following files in the destination location specified in the DestinationFileBucket and DestinationFilePath. • automation:EXECUTION_ID/ResourceIdList.csv: A temporary file that contains the PhoneNumberId and ContactFlowId pairs that are required for the AssociatePhoneNumberContactFlow API. • automation:EXECUTION_ID/ErrorResourceList.csv: A file that contains the phone number and contact flow pairs that could not be processed due to an error, such as ResourceNotFoundException in the format of PhoneNumber,ContactFlowName,ErrorMessage. • automation:EXECUTION_ID/NonProcessedResourceList.csv: A file that contains the phone number and contact flow pairs that weren't processed. The runbook tries to process as many phone numbers and contact flows as possible within 14.5 min (15 min of AWS Lambda function timeout - 30 seconds of buffer). If there are some phone numbers / contact flows that could not be processed due to the time constraint, the runbook includes them in a CSV file to use as an input for the next runbook execution. Document type Automation Owner Amazon Platforms Linux, macOS, Windows AWSSupport-AssociatePhoneNumbersToConnectContactFlows 61 AWS Systems Manager Automation runbook reference User Guide Parameters Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. { "Statement": [ { "Action": [ "s3:GetBucketPublicAccessBlock", "s3:GetBucketPolicyStatus", "s3:GetBucketAcl", "s3:GetObject", "s3:GetObjectAttributes", "s3:PutObject", "s3:PutObjectAcl" ], "Resource": [ "arn:aws:s3:::YOUR-BUCKET/*", "arn:aws:s3:::YOUR-BUCKET" ], "Effect": "Allow" }, { "Action": [ "cloudformation:CreateStack", "cloudformation:DescribeStacks", "cloudformation:DeleteStack", "iam:CreateRole", "iam:DeleteRole", "iam:DeleteRolePolicy", "iam:GetRole", "iam:PutRolePolicy", "lambda:CreateFunction", "lambda:DeleteFunction", "lambda:GetFunction", "lambda:InvokeFunction", "lambda:TagResource", "connect:AssociatePhoneNumberContactFlow", "logs:CreateLogGroup", "logs:TagResource", AWSSupport-AssociatePhoneNumbersToConnectContactFlows 62 AWS Systems Manager Automation runbook reference User Guide "logs:PutRetentionPolicy", "logs:DeleteLogGroup", "s3:GetAccountPublicAccessBlock" ], "Resource": "*", "Effect": "Allow" }, { "Action": [ "connect:DescribeInstance", "connect:ListPhoneNumbers", "connect:ListContactFlows", "ds:DescribeDirectories" ], "Resource": "*", "Effect": "Allow" }, { "Condition": { "StringLikeIfExists": { "iam:PassedToService": [ "ssm.amazonaws.com", "lambda.amazonaws.com" ] } }, "Action": [ "iam:PassRole" ], "Resource": "*", "Effect": "Allow" } ] } Instructions Follow these steps to configure the automation: 1. Navigate to AWSSupport-AssociatePhoneNumbersToConnectContactFlows in Systems Manager under Documents. 2. Select Execute automation. AWSSupport-AssociatePhoneNumbersToConnectContactFlows 63 AWS Systems Manager Automation runbook reference User Guide 3. For the input parameters, enter the following: • AutomationAssumeRole (Optional) The Amazon Resource Name (ARN) of the AWS AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user who starts this runbook. • ConnectInstanceId (Required) The ID of your Amazon Connect instance. • SourceFileBucket (Required) The Amazon S3 bucket that stores the CSV file that contains the phone number and contact flow pairs. • SourceFilePath (Required) The Amazon S3 object key of the CSV file that contains the phone number and contact flow pairs. For example, path/to/input.csv. • DestinationFileBucket (Required) The Amazon S3 bucket into which the automation will place an intermediate file and result report. • DestinationFilePath (Optional) The Amazon S3 object path in DestinationFileBucket under which an intermediate file and result report should be stored. For example, if you specify path/to/files/, files are stored under s3://[DestinationFileBucket]/path/to/files/ [automation:EXECUTION_ID]/. • S3BucketOwnerAccount (Optional) The AWS Account Number that owns the Amazon S3 bucket where you want to upload the Contact Flow Log. If you do not specify this parameter, the runbooks uses the AWS account ID of the user or role in which the Automation runs. • S3BucketOwnerRoleArn (Optional) The ARN of the IAM role with permissions to get the Amazon S3 bucket and account block public access settings, bucket encryption configuration, the bucket ACLs, the bucket AWSSupport-AssociatePhoneNumbersToConnectContactFlows 64 AWS Systems Manager Automation runbook reference User Guide policy status, and upload objects to the bucket. If this parameter is not specified, the runbook uses the AutomationAssumeRole (if specified) or user that starts this runbook (if AutomationAssumeRole is not specified). Please see the required permissions section in the runbook description. 4. Select Execute. 5. The automation initiates. 6. The document performs the following steps: • CheckConnectInstanceExistance Checks if the Amazon Connect instance provided in ConnectInstanceId exists. • CheckS3BucketPublicStatus Checks if the Amazon S3 buckets specified in the SourceFileBucket and DestinationFileBucket allow anonymous or public read or write access permissions. • CheckSourceFileExistenceAndSize Checks if the source CSV file specified in the SourceFilePath exists and if the file size exceeds the of 25 MiB limit. • GenerateResourceIdMap Downloads the source CSV file specified in the SourceFilePath and identify PhoneNumberId and ContactFlowId for each resource. After it's done, it uploads a CSV file that contains PhoneNumber, PhoneNumberId, ContactFlowName, and ContactFlowId to the destination Amazon S3 bucket specified in DestinationFileBucket. If PhoneNumberId cannot be identified for a certain number, the filed will be empty in the CSV file. • AssociatePhoneNumbersToContactFlows AWSSupport-AssociatePhoneNumbersToConnectContactFlows 65 AWS Systems Manager Automation runbook reference User Guide Creates an AWS Lambda function in your account using an AWS CloudFormation stack. The AWS Lambda function associates each number to a contact flow listed in the source CSV file specified in SourceFileBucket and SourceFilePath and the
|
systems-manager-automation-runbook-guide-016
|
systems-manager-automation-runbook-guide.pdf
| 16 |
SourceFilePath and identify PhoneNumberId and ContactFlowId for each resource. After it's done, it uploads a CSV file that contains PhoneNumber, PhoneNumberId, ContactFlowName, and ContactFlowId to the destination Amazon S3 bucket specified in DestinationFileBucket. If PhoneNumberId cannot be identified for a certain number, the filed will be empty in the CSV file. • AssociatePhoneNumbersToContactFlows AWSSupport-AssociatePhoneNumbersToConnectContactFlows 65 AWS Systems Manager Automation runbook reference User Guide Creates an AWS Lambda function in your account using an AWS CloudFormation stack. The AWS Lambda function associates each number to a contact flow listed in the source CSV file specified in SourceFileBucket and SourceFilePath and the AWS CloudFormation stack invokes the function. The AWS Lambda function map as many phone numbers to contact flows as possible before it times out (15 minutes). The list of phone numbers and contact flows that could not be processed due to error is uploaded in [automation:EXECUTION_ID]/ErrorResourceList.csv. The ones that could not be processed due to an excess of the maximum number of phone numbers that can be processed in a single execution are uploaded in [automation:EXECUTION_ID]/NonProcessedResourceList.csv. If this step fails, it goes to the DescribeCloudFormationErrorFromStackEvents step to show why it failed from AWS CloudFormation stack events. • WaitForPhoneNumberContactFlowAssociationCompletion Waits until the AWS Lambda function that maps phone numbers to contact flows is created and the AWS CloudFormation stack completes its invocation. • GenerateReport Generates the report that contains the number of phone numbers mapped to contact flows, the ones that could not be processed due to error, and the ones that could not be processed due to an excess of the maximum number of phone numbers that can be processed in single execution. The report also shows the location (Amazon S3 URI and Amazon S3 console URL) for [automation:EXECUTION_ID]/ErrorResourceList.csv or [automation:EXECUTION_ID]/NonProcessedResourceList.csv, if applicable. • DeleteCloudFormationStack Deletes the AWS CloudFormation stack, including the Lambda function for mapping. • DescribeCloudFormationErrorFromStackEvent Describes errors from the AWS CloudFormation stack of the AssociatePhoneNumbersToContactFlows step. 7. After completed, review the Outputs section for the detailed results of the execution: • GenerateReport.OutputPayload Output of phone number and contact flow associations. This report contains following information: AWSSupport-AssociatePhoneNumbersToConnectContactFlows 66 AWS Systems Manager Automation runbook reference User Guide • The number of phone number and contact flow pairs listed in the input CSV file • The number of phone numbers associated with contact flows as specified in the input CSV file • The number of phone numbers that could not be associated with contact flows due to error • The number of phone numbers that weren't associated with contact flows due to time constraint • The location (Amazon S3 URI and Amazon S3 console URL) of the CSV file that contains the phone number and contact flow pairs that could not be associated due to error • The location (Amazon S3 URI and Amazon S3 Console URL) of the CSV file that contains the phone number and contact flow pairs that weren't associated due to time constraint • DescribeCloudFormationErrorFromStackEvents.Events Output that shows AWS CloudFormation stack events if the AssociatePhoneNumbersToContactFlows step fails. Output of execution with a small number of phone numbers and contact flows Output of execution with a large number of phone numbers and contact flows and phone numbers that weren't associated due to error or time constraint AWSSupport-AssociatePhoneNumbersToConnectContactFlows 67 AWS Systems Manager Automation runbook reference User Guide References Systems Manager Automation • Run this Automation (console) • Run an automation • Setting up an Automation • Support Automation Workflows landing page AWSSupport-CollectAmazonConnectContactFlowLog Description The AWSSupport-CollectAmazonConnectContactFlowLog automation runbook is used to collect the Amazon Connect contact flow logs for a specific contact ID. By providing your Amazon Connect instance ID and contact ID, the runbook searches contact flow logs for the contact from the Amazon CloudWatch log group and uploads them to the Amazon Simple Storage Service (Amazon S3) bucket that is specified in the request parameter. The runbook generates output that provides Amazon S3 console URL and AWS CLI command for you to download the logs. How does it work? The AWSSupport-CollectAmazonConnectContactFlowLog automation runbook helps to collect the Amazon Connect contact flow logs for a specific contact ID stored in the configured CloudWatch log group and uploads them to a specified Amazon S3 bucket. To help with the security of the logs gathered from your Amazon Connect contact flow, the automation evaluates the Amazon S3 bucket configuration to determine if the bucket grants public read or write AWSSupport-CollectAmazonConnectContactFlowLog 68 AWS Systems Manager Automation runbook reference User Guide access permissions and is owned by the AWS account specified in the S3BucketOwnerAccountId parameter. If your Amazon S3 bucket uses server-side encryption with AWS Key Management Service keys (SSE-KMS), make sure that the user or AWS Identity and Access Management (IAM) role that is running this automation has the kms:GenerateDataKey permissions on the AWS KMS key. For more information about the
|
systems-manager-automation-runbook-guide-017
|
systems-manager-automation-runbook-guide.pdf
| 17 |
security of the logs gathered from your Amazon Connect contact flow, the automation evaluates the Amazon S3 bucket configuration to determine if the bucket grants public read or write AWSSupport-CollectAmazonConnectContactFlowLog 68 AWS Systems Manager Automation runbook reference User Guide access permissions and is owned by the AWS account specified in the S3BucketOwnerAccountId parameter. If your Amazon S3 bucket uses server-side encryption with AWS Key Management Service keys (SSE-KMS), make sure that the user or AWS Identity and Access Management (IAM) role that is running this automation has the kms:GenerateDataKey permissions on the AWS KMS key. For more information about the logs generated by your Amazon Connect instance, see Flow logs stored in an Amazon CloudWatch log group. Important The CloudWatch Logs Insights queries incur charges based on the amount of data that is queried. Free tier customers are charged only for usage that exceeds service quotas. For more information, see Amazon CloudWatch Pricing. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. { "Statement": [ { "Action": [ "s3:GetBucketPublicAccessBlock", "s3:GetBucketPolicyStatus", AWSSupport-CollectAmazonConnectContactFlowLog 69 AWS Systems Manager Automation runbook reference User Guide "s3:GetBucketAcl", "s3:GetObject", "s3:GetObjectAttributes", "s3:PutObject", "s3:PutObjectAcl" ], "Resource": [ "arn:aws:s3:::amzn-s3-demo-bucket/*", "arn:aws:s3:::amzn-s3-demo-bucket" ], "Effect": "Allow" }, { "Action": [ "connect:DescribeInstance", "connect:DescribeContact", "ds:DescribeDirectories" ], "Resource": "*", "Effect": "Allow" }, { "Action": [ "logs:StartQuery", "logs:GetQueryResults" "Resource": "*", "Effect": "Allow" } ] } Instructions Follow these steps to configure the automation: 1. Navigate to AWSSupport-CollectAmazonConnectContactFlowLog in Systems Manager under Documents. 2. Select Execute automation. 3. For the input parameters, enter the following: • AutomationAssumeRole (Optional): AWSSupport-CollectAmazonConnectContactFlowLog 70 AWS Systems Manager Automation runbook reference User Guide The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user who starts this runbook. • ConnectInstanceId (Required): The ID of your Amazon Connect instance. • ContactId (Required): The ID of the contact that you want to collect contact flow log for. • S3BucketName (Required): The Amazon S3 bucket name in your account where you want to upload the contact flow log. Make sure that bucket policy does not grant unnecessary read/write permissions to parties that do not need access to the collected logs. • S3ObjectPrefix (Optional): The Amazon S3 object path in the Amazon S3 bucket for an uploaded contact flow log. For example, if you specify CollectedLogs, the log will be uploaded as s3://your- s3-bucket/CollectedLogs/ContactFlowLog_[ContactId][AWSAccountId].gz. If you do not specify this parameter, the Systems Manager Automation execution ID is used, for example: s3://your-s3-bucket/[automation:EXECUTION_ID]/ ContactFlowLog[ContactId]_[AWSAccountId].gz. Note: if you specify a value for S3ObjectPrefix and run this automation using the same [ContactId], the contact flow log will be overwritten. • S3BucketOwnerAccount (Optional): The AWS account number that owns the Amazon S3 bucket where you want to upload the contact flow log. If you do not specify this parameter, the runbook uses the AWS account ID of the user or role in which the automation runs. • S3BucketOwnerRoleArn (Optional): The ARN of the IAM role with permissions to get the Amazon S3 bucket and account block public access settings, bucket encryption configuration, bucket ACLs, bucket policy status, and upload objects to the bucket. If this parameter is not specified, the runbook uses the AutomationAssumeRole (if specified) or user that starts this runbook (if AWSSupport-CollectAmazonConnectContactFlowLog 71 AWS Systems Manager Automation runbook reference User Guide AutomationAssumeRole is not specified). See the required permissions section in the runbook description. 4. Select Execute. 5. The automation initiates. 6. The document performs the following steps: • CheckConnectInstanceExistance Checks if the Amazon Connect instance provided in the ConnectInstanceId is ACTIVE. • CheckS3BucketPublicStatus Checks if the Amazon S3 bucket specified in the S3BucketName allows anonymous or public read or write access permissions. • GenerateLogSearchTimeRange Generates StartTime and EndTime for the StartQuery step based on the InitiationTimestamp and LastUpdateTimestamp returned by the DescribeContact API. StartTime will be an hour before InitiationTimestamp and EndTime will be an hour after LastUpdateTimestamp. • StartQuery Starts a query log for the provided ContactId in the CloudWatch Logs log group associated with the Amazon Connect instance provided in ConnectInstanceId. Queries time out after 60 minutes of runtime. If your query times out, reduce the time range being searched. You can view the queries currently in progress as well as your recent query history in the CloudWatch console. For more information see View running queries or query history. • WaitForQueryCompletion AWSSupport-CollectAmazonConnectContactFlowLog 72 AWS Systems Manager Automation runbook reference User Guide Waits for the CloudWatch Logs query log for the provided ContactId to complete. Notice that the query times out after 60 minutes of runtime. If your query times out, reduce the time range being searched. You
|
systems-manager-automation-runbook-guide-018
|
systems-manager-automation-runbook-guide.pdf
| 18 |
instance provided in ConnectInstanceId. Queries time out after 60 minutes of runtime. If your query times out, reduce the time range being searched. You can view the queries currently in progress as well as your recent query history in the CloudWatch console. For more information see View running queries or query history. • WaitForQueryCompletion AWSSupport-CollectAmazonConnectContactFlowLog 72 AWS Systems Manager Automation runbook reference User Guide Waits for the CloudWatch Logs query log for the provided ContactId to complete. Notice that the query times out after 60 minutes of runtime. If your query times out, reduce the time range being searched. You can view the queries currently in progress as well as your recent query history in the Amazon Connect console. For more information see View running queries or query history. • UploadContactFlowLog Gets the query result and uploads the contact flow log to the Amazon S3 bucket specified in S3BucketName. • GenerateReport Returns the Amazon S3 console URL where the contact flow log was uploaded and an example AWS CLI command that you can use to download the log file. 7. After completed, review the Outputs section for the detailed results of the execution: • GenerateReport.OutputPayload Output that tells you the runbook successfully retrieved contact flow logs for the specified contact. This report also contains Amazon S3 console URL and an example AWS CLI command so that you can download the log file. References Systems Manager Automation • Run this Automation (console) • Run an automation • Setting up an Automation AWSSupport-CollectAmazonConnectContactFlowLog 73 AWS Systems Manager Automation runbook reference User Guide • Support Automation Workflows landing page AWS Directory Service AWS Systems Manager Automation provides predefined runbooks for AWS Directory Service. For more information about runbooks, see Working with runbooks. For information about how to view runbook content, see View runbook content. Topics • AWS-CreateDSManagementInstance • AWSSupport-TroubleshootADConnectorConnectivity • AWSSupport-TroubleshootDirectoryTrust AWS-CreateDSManagementInstance Description The AWS-CreateDSManagementInstance runbook creates an Amazon Elastic Compute Cloud (Amazon EC2) Windows instance that you can use to manage your AWS Directory Service directory. The management instance can't be used to manage AD Connector directories. Run this Automation (console) Document type Automation Owner Amazon Platforms Windows Parameters • AutomationAssumeRole AWS Directory Service 74 AWS Systems Manager Automation runbook reference User Guide Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • AmiID Type: String Default: {{ ssm:/aws/service/ami-windows-latest/Windows_Server-2019- English-Full-Base }} Description: (Required) The ID of the Amazon Machine Image (AMI) you want to use to launch the management instance. • DirectoryId Type: String Description: (Required) The ID of the AWS Directory Service directory you want to manage. The instance is joined to the directory you specify. • IamInstanceProfileName Type: String Description: (Required) The name you specify is applied to the IAM instance profile that is created by the automation and attached to the management instance. • InstanceType Type: String Default: t3.medium Allowed values: • t2.nano • t2.micro • t2.small • t2.medium AWS-CreateDSManagementInstance 75 AWS Systems Manager Automation runbook reference User Guide • t2.large • t2.xlarge • t2.2xlarge • t3.nano • t3.micro • t3.small • t3.medium • t3.large • t3.xlarge • t3.2xlarge Description: (Required) The type of instance you want to launch. • KeyPairName Type: String Description: (Optional) The key pair to use when creating the instance. If you do not specify a value, no key pair is associated with the instance. • RemoteAccessCidr Type: String Description: (Required) The CIDR block you want to allow RDP traffic (port 3389) from. The CIDR block you specify is applied to an inbound rule that's added to the security group created by the automation. • SecurityGroupName Type: String Description: (Required) The name you specify is applied to the security group that is created by the automation and associated with the management instance. • Tags Type: MapList Description: (Optional) A key-value pair you want to apply to the resources created by the automation. AWS-CreateDSManagementInstance 76 AWS Systems Manager Automation runbook reference User Guide Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ds:DescribeDirectories • ec2:AuthorizeSecurityGroupIngress • ec2:CreateSecurityGroup • ec2:CreateTags • ec2:DeleteSecurityGroup • ec2:DescribeInstances • ec2:DescribeInstanceStatus • ec2:DescribeKeyPairs • ec2:DescribeSecurityGroups • ec2:DescribeVpcs • ec2:RunInstances • ec2:TerminateInstances • iam:AddRoleToInstanceProfile • iam:AttachRolePolicy • iam:CreateInstanceProfile • iam:CreateRole • iam:DeleteInstanceProfile • iam:DeleteRole • iam:DetachRolePolicy • iam:GetInstanceProfile • iam:GetRole • iam:ListAttachedRolePolicies • iam:ListInstanceProfiles • iam:ListInstanceProfilesForRole • iam:PassRole AWS-CreateDSManagementInstance 77 AWS Systems Manager Automation runbook reference User Guide • iam:RemoveRoleFromInstanceProfile • iam:TagInstanceProfile • iam:TagRole • ssm:CreateDocument • ssm:DeleteDocument • ssm:DescribeInstanceInformation • ssm:GetAutomationExecution • ssm:GetParameters • ssm:ListCommandInvocations • ssm:ListCommands • ssm:ListDocuments • ssm:SendCommand • ssm:StartAutomationExecution Document Steps • aws:executeAwsApi - Gathers details about the directory you specify in
|
systems-manager-automation-runbook-guide-019
|
systems-manager-automation-runbook-guide.pdf
| 19 |
successfully. • ds:DescribeDirectories • ec2:AuthorizeSecurityGroupIngress • ec2:CreateSecurityGroup • ec2:CreateTags • ec2:DeleteSecurityGroup • ec2:DescribeInstances • ec2:DescribeInstanceStatus • ec2:DescribeKeyPairs • ec2:DescribeSecurityGroups • ec2:DescribeVpcs • ec2:RunInstances • ec2:TerminateInstances • iam:AddRoleToInstanceProfile • iam:AttachRolePolicy • iam:CreateInstanceProfile • iam:CreateRole • iam:DeleteInstanceProfile • iam:DeleteRole • iam:DetachRolePolicy • iam:GetInstanceProfile • iam:GetRole • iam:ListAttachedRolePolicies • iam:ListInstanceProfiles • iam:ListInstanceProfilesForRole • iam:PassRole AWS-CreateDSManagementInstance 77 AWS Systems Manager Automation runbook reference User Guide • iam:RemoveRoleFromInstanceProfile • iam:TagInstanceProfile • iam:TagRole • ssm:CreateDocument • ssm:DeleteDocument • ssm:DescribeInstanceInformation • ssm:GetAutomationExecution • ssm:GetParameters • ssm:ListCommandInvocations • ssm:ListCommands • ssm:ListDocuments • ssm:SendCommand • ssm:StartAutomationExecution Document Steps • aws:executeAwsApi - Gathers details about the directory you specify in the DirectoryId parameter. • aws:executeAwsApi - Gets the CIDR block of the virtual private cloud (VPC) where the directory was launched. • aws:executeAwsApi - Creates a security group using the value you specify in the SecurityGroupName parameter. • aws:executeAwsApi - Creates an inbound rule for the newly created security group that allows RDP traffic from the CIDR you specify in the RemoteAccessCidr parameter. • aws:executeAwsApi - Creates an IAM role and instance profile using the value you specify in the IamInstanceProfileName parameter. • aws:executeAwsApi - Launches an Amazon EC2 instance based on the values you specify in the runbook parameters. • aws:executeAwsApi - Creates an AWS Systems Manager document to join the newly launched instance to your directory. • aws:runCommand - Joins the new instance to your directory. AWS-CreateDSManagementInstance 78 AWS Systems Manager Automation runbook reference User Guide • aws:runCommand - Installs remote server administration tools on the new instance. AWSSupport-TroubleshootADConnectorConnectivity Description The AWSSupport-TroubleshootADConnectorConnectivity runbook verifies the following prerequisites for an AD Connector: • Checks if the required traffic is allowed by the security group and network access control list (ACL) rules associated with your AD Connector. • Checks if the AWS Systems Manager, AWS Security Token Service, and Amazon CloudWatch interface VPC endpoints exist in the same virtual private cloud (VPC) as the AD Connector. When the prerequisite checks complete successfully, the runbook launches two Amazon Elastic Compute Cloud (Amazon EC2) Linux t2.micro instances in the same subnets as your AD Connector. Network connectivity tests are then performed using the netcat and nslookup utilities. Run this Automation (console) Important Using this runbook might incur extra charges to your AWS account for the Amazon EC2 instances, Amazon Elastic Block Store volumes and Amazon Machine Image (AMI) created during the automation. For more information, see Amazon Elastic Compute Cloud Pricing and Amazon Elastic Block Store Pricing. If the aws:deletestack step fails, go to the AWS CloudFormation console to manually delete the stack. The stack name created by this runbook begins with AWSSupport- TroubleshootADConnectorConnectivity. For information about deleting AWS CloudFormation stacks, see Deleting a stack in the AWS CloudFormation User Guide. Document type Automation Owner Amazon AWSSupport-TroubleshootADConnectorConnectivity 79 AWS Systems Manager Automation runbook reference User Guide Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • DirectoryId Type: String Description: (Required) The ID of the AD Connector directory you want to troubleshoot connectivity to. • Ec2InstanceProfile Type: String Maximum characters: 128 Description: (Required) The name of the instance profile you want to assign to the instances that are launched to perform connectivity tests. The instance profile you specify must have the AmazonSSMManagedInstanceCore policy or equivalent permissions attached. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ec2:DescribeInstances • ec2:DescribeImages • ec2:DescribeSubnets • ec2:DescribeSecurityGroups AWSSupport-TroubleshootADConnectorConnectivity 80 AWS Systems Manager Automation runbook reference User Guide • ec2:DescribeNetworkAcls • ec2:DescribeVpcEndpoints • ec2:CreateTags • ec2:RunInstances • ec2:StopInstances • ec2:TerminateInstances • cloudformation:CreateStack • cloudformation:DescribeStacks • cloudformation:ListStackResources • cloudformation:DeleteStack • ds:DescribeDirectories • ssm:SendCommand • ssm:ListCommands • ssm:ListCommandInvocations • ssm:GetParameters • ssm:DescribeInstanceInformation • iam:PassRole Document Steps • aws:assertAwsResourceProperty - Confirms the directory specified in the DirectoryId parameter is an AD Connector. • aws:executeAwsApi - Gathers information about the AD Connector. • aws:executeAwsApi - Gathers information about the security groups that are associated with the AD Connector. • aws:executeAwsApi - Gathers information about the network ACL rules that are associated with the subnets for the AD Connector. • aws:executeScript - Evalutes the AD Connector security group rules to verify that the required outbound traffic is allowed. • aws:executeScript - Evalutes the AD Connector network ACL rules to verify that the required outbound and inbound network traffic is allowed. AWSSupport-TroubleshootADConnectorConnectivity 81 AWS Systems Manager Automation runbook reference User Guide • aws:executeScript - Checks if the AWS Systems Manager, AWS Security Token Service and Amazon CloudWatch interface endpoints exist in the same VPC as the AD Connector. • aws:executeScript - Compiles the outputs of the checks performed in the
|
systems-manager-automation-runbook-guide-020
|
systems-manager-automation-runbook-guide.pdf
| 20 |
that are associated with the subnets for the AD Connector. • aws:executeScript - Evalutes the AD Connector security group rules to verify that the required outbound traffic is allowed. • aws:executeScript - Evalutes the AD Connector network ACL rules to verify that the required outbound and inbound network traffic is allowed. AWSSupport-TroubleshootADConnectorConnectivity 81 AWS Systems Manager Automation runbook reference User Guide • aws:executeScript - Checks if the AWS Systems Manager, AWS Security Token Service and Amazon CloudWatch interface endpoints exist in the same VPC as the AD Connector. • aws:executeScript - Compiles the outputs of the checks performed in the previous steps. • aws:branch - Branches the automation depending on the output of previous steps. The automation stops here if the required outbound and inbound rules are missing for the security groups and network ACLs. • aws:createStack - Creates an AWS CloudFormation stack to launch Amazon EC2 instances to perform connectivity tests. • aws:executeAwsApi - Gathers the IDs of newly launched Amazon EC2 instances. • aws:waitForAwsResourceProperty - Waits for the first newly launched Amazon EC2 instance to report as managed by AWS Systems Manager. • aws:waitForAwsResourceProperty - Waits for the second newly launched Amazon EC2 instance to report as managed by AWS Systems Manager. • aws:runCommand - Performs network connectivity tests to the on-premises DNS server IP addresses from the first Amazon EC2 instance. • aws:runCommand - Performs network connectivity tests to the on-premises DNS server IP addresses from the second Amazon EC2 instance. • aws:changeInstanceState - Stops the Amazon EC2 instances used for the connectivity tests. • aws:deleteStack - Deletes the AWS CloudFormation stack. • aws:executeScript - Outputs instructions about how to manually delete the AWS CloudFormation stack if the automation fails to delete the stack. AWSSupport-TroubleshootDirectoryTrust Description The AWSSupport-TroubleshootDirectoryTrust runbook diagnoses trust creation issues between an AWS Managed Microsoft AD and a Microsoft Active Directory. The automation ensures the directory type supports trusts, and then checks the associated security group rules, network access control lists (network ACLs), and route tables for potential connectivity issues. Run this Automation (console) Document type Automation AWSSupport-TroubleshootDirectoryTrust 82 AWS Systems Manager Automation runbook reference User Guide Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • DirectoryId Type: String Allowed pattern: ^d-[a-z0-9]{10}$ Description: (Required) The ID of the AWS Managed Microsoft AD to troubleshoot. • RemoteDomainCidrs Type: StringList Allowed pattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9] {2}|2[0-4][0-9]|25[0-5])(\/(3[0-2]|[1-2][0-9]|[1-9]))$ Description: (Required) The CIDR(s) of the remote domain you are attempting to establish a trust relationship with. You can add multiple CIDRs using comma-separated values. For example, 172.31.48.0/20, 192.168.1.10/32. • RemoteDomainName Type: String Description: (Required) The fully qualified domain name of the remote domain you are establishing a trust relationship with. AWSSupport-TroubleshootDirectoryTrust 83 AWS Systems Manager Automation runbook reference User Guide • RequiredTrafficACL Type: String Description: (Required) The default port requirements for AWS Managed Microsoft AD. In most cases, you should not modify the default value. Default: {"inbound":{"tcp":[[53,53],[88,88],[135,135],[389,389],[445,445],[464,464], [636,636],[1024,65535]],"udp":[[53,53],[88,88],[123.123],[138,138],[389,389],[445,445], [464,464]],"icmp":[[-1,-1]]},"outbound":{"-1":[[0,65535]]}} • RequiredTrafficSG Type: String Description: (Required) The default port requirements for AWS Managed Microsoft AD. In most cases, you should not modify the default value. Default: {"inbound":{"tcp":[[53,53],[88,88],[135,135],[389,389],[445,445],[464,464], [636,636],[1024,65535]],"udp":[[53,53],[88,88],[123.123],[138,138],[389,389],[445,445], [464,464]],"icmp":[[-1,-1]]},"outbound":{"-1":[[0,65535]]}} • TrustId Type: String Description: (Optional) The ID of the trust relationship to troubleshoot. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ds:DescribeConditionalForwarders • ds:DescribeDirectories • ds:DescribeTrusts • ds:ListIpRoutes • ec2:DescribeNetworkAcls • ec2:DescribeSecurityGroups • ec2:DescribeSubnets AWSSupport-TroubleshootDirectoryTrust 84 AWS Systems Manager Automation runbook reference User Guide Document Steps • aws:assertAwsResourceProperty - Confirms the directory type is AWS Managed Microsoft AD. • aws:executeAwsApi - Gets information about the AWS Managed Microsoft AD. • aws:branch - Branches automation if a value is provided for the TrustId input parameter. • aws:executeAwsApi - Gets information about the trust relationship. • aws:executeAwsApi - Gets the conditional forwarder DNS IP addresses for the RemoteDomainName . • aws:executeAwsApi - Gets information about IP routes that have been added to the AWS Managed Microsoft AD. • aws:executeAwsApi - Gets the CIDRs of the AWS Managed Microsoft AD subnets. • aws:executeAwsApi - Gets information about the security groups associated with the AWS Managed Microsoft AD. • aws:executeAwsApi - Gets information about the network ACLs associated with the AWS Managed Microsoft AD. • aws:executeScript - Confirms the RemoteDomainCidrs are valid values. Confirms that the AWS Managed Microsoft AD has conditional forwarders for the RemoteDomainCidrs , and that the requisite IP routes have been added to the AWS Managed Microsoft AD if the RemoteDomainCidrs are non-RFC 1918 IP addresses. • aws:executeScript - Evaluates security group rules. • aws:executeScript - Evaluates network ACLs. Outputs evalDirectorySecurityGroup.output - Results from evaluating
|
systems-manager-automation-runbook-guide-021
|
systems-manager-automation-runbook-guide.pdf
| 21 |
Microsoft AD subnets. • aws:executeAwsApi - Gets information about the security groups associated with the AWS Managed Microsoft AD. • aws:executeAwsApi - Gets information about the network ACLs associated with the AWS Managed Microsoft AD. • aws:executeScript - Confirms the RemoteDomainCidrs are valid values. Confirms that the AWS Managed Microsoft AD has conditional forwarders for the RemoteDomainCidrs , and that the requisite IP routes have been added to the AWS Managed Microsoft AD if the RemoteDomainCidrs are non-RFC 1918 IP addresses. • aws:executeScript - Evaluates security group rules. • aws:executeScript - Evaluates network ACLs. Outputs evalDirectorySecurityGroup.output - Results from evaluating whether the security group rules associated with the AWS Managed Microsoft AD allow the requisite traffic for trust creation. evalAclEntries.output - Results from evaluating whether the network ACLs associated with the AWS Managed Microsoft AD allow the requisite traffic for trust creation. evaluateRemoteDomainCidr.output - Results from evaluating whether the RemoteDomainCidrs are valid values. Confirms that the AWS Managed Microsoft AD has conditional forwarders for the RemoteDomainCidrs , and that the requisite IP routes have been added to the AWS Managed Microsoft AD if the RemoteDomainCidrs are non-RFC 1918 IP addresses. AWSSupport-TroubleshootDirectoryTrust 85 AWS Systems Manager Automation runbook reference User Guide AWS AppSync AWS Systems Manager Automation provides predefined runbooks for AWS AppSync. For more information about runbooks, see Working with runbooks. For information about how to view runbook content, see View runbook content. Topics • AWS-EnableAppSyncGraphQLApiLogging AWS-EnableAppSyncGraphQLApiLogging Description The AWS-EnableAppSyncGraphQLApiLogging runbook enables field-level logging and request- level logging for the AWS AppSync GraphQL API you specify. The runbook will apply changes to the specified GraphQL API even if logging has already been enabled. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on AWS AppSync 86 AWS Systems Manager Automation runbook reference User Guide your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • ApiId Type: String Description: (Required) The ID of the API you want to enable logging for. • FieldLogLevel Type: String Valid Values: ERROR | ALL Description: (Required) The field logging level. • CloudWatchLogsRoleArn Type: String Description: (Required) The ARN of the service role that AWS AppSync assumes to publish to Amazon CloudWatch Logs. • ExcludeVerboseContent Type: Boolean Default: False Description: (Optional) Set to True to exclude information such as headers, context, and evaluated mapping templates, regardless of logging level. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:GetAutomationExecution • appsync:GetGraphqlApi • appsync:UpdateGraphqlApi • iam:PassRole AWS-EnableAppSyncGraphQLApiLogging 87 AWS Systems Manager Automation runbook reference User Guide Document Steps • aws:executeAwsApi - Gathers the authentication type and configuration information relevant for the primary authentication type. • aws:branch - Branches based on the authentication type. • aws:executeAwsApi - Updates the logging configuration for the AWS AppSync GraphQL API based on the values specified for the runbook's input parameters. Outputs • EnableApiLoggingWithApiKeyOrAwsIamAuthorization.UpdateGraphQLApiResponse: Response from the UpdateGraphqlApi call. • EnableApiLoggingWithLambdaAuthorization.UpdateGraphQLApiResponse: Response from the UpdateGraphqlApi call. • EnableApiLoggingWithCognitoAuth.UpdateGraphQLApiResponse: Response from the UpdateGraphqlApi call. • EnableApiLoggingWithOpenIdAuthorization.UpdateGraphQLApiResponse: Response from the UpdateGraphqlApi call. Amazon Athena AWS Systems Manager Automation provides predefined runbooks for Amazon Athena. For more information about runbooks, see Working with runbooks. For information about how to view runbook content, see View runbook content. Topics • AWS-EnableAthenaWorkGroupEncryptionAtRest AWS-EnableAthenaWorkGroupEncryptionAtRest Description The AWS-EnableAthenaWorkGroupEncryptionAtRest runbook enables encryption at rest for the Amazon Athena workgroup you specify. Run this Automation (console) Amazon Athena 88 AWS Systems Manager Automation runbook reference User Guide Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • WorkGroup Type: String Description: (Required) The workgroup that you want to enable encryption at rest for. • EncryptionOption Type: String Valid Values: SSE_S3 | SSE_KMS | CSE_KMS Description: (Required) Specifies which encryption option is used. You can choose server-side encryption with Amazon S3 managed keys (SSE_S3), server-side encryption with AWS KMS managed keys (SSE_KMS), or client-side encryption with AWS KMS managed keys (CSE_KMS). • KmsKeyId Type: String Description: (Optional) If you're using a AWS KMS encryption option, specify the key ARN, key ID, or the key alias of the key you want to use. AWS-EnableAthenaWorkGroupEncryptionAtRest 89 AWS Systems Manager Automation runbook reference User Guide • EnableMinimumEncryptionConfiguration Type: Boolean Default: True Description: (Optional) Enforces a minimal level of encryption for the workgroup for query and calculation results that are written to
|
systems-manager-automation-runbook-guide-022
|
systems-manager-automation-runbook-guide.pdf
| 22 |
which encryption option is used. You can choose server-side encryption with Amazon S3 managed keys (SSE_S3), server-side encryption with AWS KMS managed keys (SSE_KMS), or client-side encryption with AWS KMS managed keys (CSE_KMS). • KmsKeyId Type: String Description: (Optional) If you're using a AWS KMS encryption option, specify the key ARN, key ID, or the key alias of the key you want to use. AWS-EnableAthenaWorkGroupEncryptionAtRest 89 AWS Systems Manager Automation runbook reference User Guide • EnableMinimumEncryptionConfiguration Type: Boolean Default: True Description: (Optional) Enforces a minimal level of encryption for the workgroup for query and calculation results that are written to Amazon S3. When enabled, workgroup users can set encryption only to the minimum level set by the administrator or higher when they submit queries. This setting does not apply to Spark-enabled workgroups. • EnforceWorkGroupConfiguration Type: Boolean Default: True Description: (Optional) If set to True, the settings for the workgroup override client-side settings. If set to False, client-side settings are used. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:GetAutomationExecution • ssm:StartAutomationExecution • athena:GetWorkGroup • athena:UpdateWorkGroup Document Steps • aws:branch - Branches based on the encryption option specified in the EncryptionOption parameter. • aws:executeAwsApi - This step updates the Athena Work Group with the specified encryption setting. • aws:executeAwsApi - Updates the Athena Work Group with the specified encryption setting. • aws:assertAwsResourceProperty - Verifies that encryption for the workgroup has been enabled. AWS-EnableAthenaWorkGroupEncryptionAtRest 90 AWS Systems Manager Automation runbook reference User Guide DynamoDB AWS Systems Manager Automation provides predefined runbooks for Amazon DynamoDB. For more information about runbooks, see Working with runbooks. For information about how to view runbook content, see View runbook content. Topics • AWS-ChangeDDBRWCapacityMode • AWS-CreateDynamoDBBackup • AWS-DeleteDynamoDbBackup • AWSConfigRemediation-DeleteDynamoDbTable • AWS-DeleteDynamoDbTableBackups • AWSConfigRemediation-EnableEncryptionOnDynamoDbTable • AWSConfigRemediation-EnablePITRForDynamoDbTable • AWS-EnableDynamoDbAutoscaling • AWS-RestoreDynamoDBTable AWS-ChangeDDBRWCapacityMode Description The AWS-ChangeDDBRWCapacityMode runbook changes the read/write capacity mode for one or more Amazon DynamoDB (DynamoDB) tables to either on-demand mode, or provisioned mode. Run this Automation (console) Document type Automation Owner Amazon Platforms Databases Parameters DynamoDB 91 AWS Systems Manager Automation runbook reference User Guide • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • CapacityMode Type: String Valid values: PROVISIONED | PAY_PER_REQUEST Description: (Required) The desired read/write capacity mode. When switching from on- demand(pay-per-request) to provisioned capacity, initial provisioned capacity values must be set. The initial provisioned capacity values are estimated based on the consumed read and write capacity of your table and global secondary indexes over the past 30 minutes. • ReadCapacityUnits Type: Integer Default: 0 Description: (Optional) The maximum number of strongly consistent reads consumed per second before DynamoDB returns a throttling exception. • TableNames Type: String Description: (Required) Comma separated list of DynamoDB table names to change the read/ write capacity mode for.. • WriteCapacityUnits Type: Integer Default: 0 Description: (Optional) The maximum number of writes consumed per second before DynamoDB returns a throttling exception. AWS-ChangeDDBRWCapacityMode 92 AWS Systems Manager Automation runbook reference User Guide Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • dynamodb:DescribeTable • dynamodb:UpdateTable Document Steps • aws:executeScript - Changes the read/write capacity mode for the DynamoDB tables specified in the TableNames parameter. Outputs ChangeDDBRWCapacityMode.SuccessesTables - List of DynamoDB table names where the capacity mode was successfully changed ChangeDDBRWCapacityMode.FailedTables - Maplist of DynamoDB table names where changing the capacity mode failed and the reason for the failure. AWS-CreateDynamoDBBackup Description Create a backup of an Amazon DynamoDB table. Run this Automation (console) Document type Automation Owner Amazon Platforms Databases Parameters AWS-CreateDynamoDBBackup 93 AWS Systems Manager Automation runbook reference User Guide • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • BackupName Type: String Description: (Required) Name of the backup to create. • LambdaAssumeRole Type: String Description: (Optional) The ARN of the role that allows Lambda created by Automation to perform the actions on your behalf. If not specified a transient role will be created to run the Lambda function. • TableName Type: String Description: (Required) Name of the DynamoDB table. AWS-DeleteDynamoDbBackup Description Delete the backup of an Amazon DynamoDB table. Run this Automation (console) Document type Automation Owner Amazon AWS-DeleteDynamoDbBackup 94 AWS Systems Manager Automation runbook reference User Guide Platforms Databases Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that
|
systems-manager-automation-runbook-guide-023
|
systems-manager-automation-runbook-guide.pdf
| 23 |
Type: String Description: (Optional) The ARN of the role that allows Lambda created by Automation to perform the actions on your behalf. If not specified a transient role will be created to run the Lambda function. • TableName Type: String Description: (Required) Name of the DynamoDB table. AWS-DeleteDynamoDbBackup Description Delete the backup of an Amazon DynamoDB table. Run this Automation (console) Document type Automation Owner Amazon AWS-DeleteDynamoDbBackup 94 AWS Systems Manager Automation runbook reference User Guide Platforms Databases Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • BackupArn Type: String Description: (Required) ARN of the DynamoDB table backup to delete. AWSConfigRemediation-DeleteDynamoDbTable Description The AWSConfigRemediation-DeleteDynamoDbTable runbook deletes the Amazon DynamoDB (DynamoDB) table you specify. Run this Automation (console) Document type Automation Owner Amazon Platforms Databases Parameters AWSConfigRemediation-DeleteDynamoDbTable 95 AWS Systems Manager Automation runbook reference User Guide • AutomationAssumeRole Type: String Description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. • TableName Type: String Description: (Required) The name of the DynamoDB table you want to delete. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:GetAutomationExecution • dynamodb:DeleteTable • dynamodb:DescribeTable Document Steps • aws:executeScript - Deletes the DynamoDB table specified in the TableName parameter. • aws:executeScript - Verifies the DynamoDB table has been deleted. AWS-DeleteDynamoDbTableBackups Description Delete DynamoDB table backups based on retention days or count. Run this Automation (console) Document type Automation AWS-DeleteDynamoDbTableBackups 96 AWS Systems Manager Automation runbook reference User Guide Owner Amazon Platforms Databases Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • LambdaAssumeRole Type: String Description: (Optional) The ARN of the role that allows Lambda created by Automation to perform the actions on your behalf. If not specified a transient role will be created to run the Lambda function. • RetentionCount Type: String Default: 10 Description: (Optional) The number of backups to retain for the table. If more than the specified number of backup exist, the oldest backups beyond that number are deleted. Either RetentionCount or RetentionDays can be used, not both. • RetentionDays Type: String Description: (Optional) The number of days to retain backups for the table. Backups older than the specified number of days are deleted. Either RetentionCount or RetentionDays can be used, not both. AWS-DeleteDynamoDbTableBackups 97 AWS Systems Manager Automation runbook reference User Guide • TableName Type: String Description: (Required) Name of the DynamoDB table. AWSConfigRemediation-EnableEncryptionOnDynamoDbTable Description The AWSConfigRemediation-EnableEncryptionOnDynamoDbTable runbook encrypts an Amazon DynamoDB (DynamoDB) table using the AWS Key Management Service (AWS KMS) customer managed key you specify for the KMSKeyId parameter. Run this Automation (console) Document type Automation Owner Amazon Platforms Databases Parameters • AutomationAssumeRole Type: String Description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. • KMSKeyId Type: String AWSConfigRemediation-EnableEncryptionOnDynamoDbTable 98 AWS Systems Manager Automation runbook reference User Guide Description: (Required) The ARN of the customer managed key you want to use to encrypt the DynamoDB table you specify in the TableName parameter. • TableName Type: String Description: (Required) The name of the DynamoDB table you want to encrypt. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:GetAutomationExecution • dynamodb:DescribeTable • dynamodb:UpdateTable Document Steps • aws:executeAwsApi - Encrypts the DynamoDB table you specify in the TableName parameter. • aws:waitForAwsResourceProperty - Verifies the Enabled property for the DynamoDB table's SSESpecification is set to true . • aws:assertAwsResourceProperty - Verifies the DynamoDB table is encrypted with the customer managed key specified in the KMSKeyId parameter. AWSConfigRemediation-EnablePITRForDynamoDbTable Description The AWSConfigRemediation-EnablePITRForDynamoDbTable runbook enables point-in-time recovery (PITR) on the Amazon DynamoDB table you specify. Run this Automation (console) Document type AWSConfigRemediation-EnablePITRForDynamoDbTable 99 AWS Systems Manager Automation runbook reference User Guide Automation Owner Amazon Platforms Databases Parameters • AutomationAssumeRole Type: String Description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. • TableName Type: String Description: (Required) The name of the DynamoDB table to enable point-in-time recovery on. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:GetAutomationExecution
|
systems-manager-automation-runbook-guide-024
|
systems-manager-automation-runbook-guide.pdf
| 24 |
point-in-time recovery (PITR) on the Amazon DynamoDB table you specify. Run this Automation (console) Document type AWSConfigRemediation-EnablePITRForDynamoDbTable 99 AWS Systems Manager Automation runbook reference User Guide Automation Owner Amazon Platforms Databases Parameters • AutomationAssumeRole Type: String Description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. • TableName Type: String Description: (Required) The name of the DynamoDB table to enable point-in-time recovery on. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:GetAutomationExecution • dynamodb:DescribeContinuousBackups • dynamodb:UpdateContinuousBackups Document Steps • aws:executeAwsApi - Enables point-in-time recovery on the DynamoDB table you specify in the TableName parameter. AWSConfigRemediation-EnablePITRForDynamoDbTable 100 AWS Systems Manager Automation runbook reference User Guide • aws:assertAwsResourceProperty - Confirms point-in-time recovery is enabled on the DynamoDB table. AWS-EnableDynamoDbAutoscaling Description The AWS-EnableDynamoDbAutoscaling runbook enables Application Auto Scaling for the provisioned capacity Amazon DynamoDB table you specify. Application Auto Scaling dynamically adjusts provisioned throughput capacity in response to traffic patterns. For more information, see Managing throughput capacity automatically with DynamoDB auto scaling in the Amazon DynamoDB Developer Guide. Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • TableName Type: String Description: (Required) The name of the DynamoDB table you want to enable Application Auto Scaling on. AWS-EnableDynamoDbAutoscaling 101 AWS Systems Manager Automation runbook reference User Guide • MinReadCapacity Type: Integer Description: (Required) The minimum number of provisioned throughput read capacity units for the DynamoDB table. • MaxReadCapacity Type: Integer Description: (Required) The maximum number of provisioned throughput read capacity units for the DynamoDB table. • TargetReadCapacityUtilization Type: Integer Description: (Required) The desired target read capacity utilization. Target utilization is the percentage of consumed provisioned throughput at a point in time. You can set the auto scaling target utilization values between 20 and 90 percent. • ReadScaleOutCooldown Type: Integer Description: (Required) The amount of time in seconds to wait for a previous read capacity scale- out activity to take effect. • ReadScaleInCooldown Type: Integer Description: (Required) The amount of time in seconds after a read capacity scale-in activity completes before another scale-in activity can start. • MinWriteCapacity Type: Integer Description: (Required) The minimum number of provisioned throughput write units for the DynamoDB table. • MaxWriteCapacity Type: Integer AWS-EnableDynamoDbAutoscaling 102 AWS Systems Manager Automation runbook reference User Guide Description: (Required) The maximum number of provisioned throughput write units for the DynamoDB table. • TargetWriteCapacityUtilization Type: Integer Description: (Required) The desired target write capacity utilization. Target utilization is the percentage of consumed provisioned throughput at a point in time. You can set the auto scaling target utilization values between 20 and 90 percent. • WriteScaleOutCooldown Type: Integer Description: (Required) The amount of time in seconds to wait for a previous write capacity scale- out activity to take effect. • WriteScaleInCooldown Type: Integer Description: (Required) The amount of time in seconds after a write capacity scale-in activity completes before another scale-in activity can start. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:GetAutomationExecution • ssm:StartAutomationExecution • application-autoscaling:DescribeScalableTargets • application-autoscaling:DescribeScalingPolicies • application-autoscaling:PutScalingPolicy • application-autoscaling:RegisterScalableTarget • RegisterAppAutoscalingTargetWrite (aws:executeAwsApi) - Configures Application Auto Scaling on the DynamoDB table you specify. AWS-EnableDynamoDbAutoscaling 103 AWS Systems Manager Automation runbook reference User Guide • RegisterAppAutoscalingTargetWriteDelay (aws:sleep) - Sleeps to avoid API throttling. • PutScalingPolicyWrite (aws:executeAwsApi) - Configures the target write capacity utilization for the DynamoDB table. • PutScalingPolicyWriteDelay (aws:sleep) - Sleeps to avoid API throttling. • RegisterAppAutoscalingTargetRead (aws:executeAwsApi) - Configures minimum and maximum read capacity units for the DynamoDB table. • RegisterAppAutoscalingTargetReadDelay (aws:sleep) - Sleeps to avoid API throttling. • PutScalingPolicyRead (aws:executeAwsApi) - Configures the target read capacity utilization for the DynamoDB table. • VerifyDynamoDbAutoscalingEnabled (aws:executeScript) - Verifies Application Auto Scaling is enabled for the DynamoDB table according to the values you specify. Outputs • RegisterAppAutoscalingTargetWrite.Response • PutScalingPolicyWrite.Response • RegisterAppAutoscalingTargetRead.Response • PutScalingPolicyRead.Response • VerifyDynamoDbAutoscalingEnabled.DynamoDbAutoscalingEnabledResponse AWS-RestoreDynamoDBTable Description The AWS-RestoreDynamoDBTable runbook restores the Amazon DynamoDB table that you specify using point-in-time recovery (PITR). Run this Automation (console) Document type Automation Owner Amazon AWS-RestoreDynamoDBTable 104 AWS Systems Manager Automation runbook reference User Guide Platforms Databases Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • EnablePointInTimeRecoverAsNeeded Type: Boolean Default: true Description: (Optional) Determines whether the automation
|
systems-manager-automation-runbook-guide-025
|
systems-manager-automation-runbook-guide.pdf
| 25 |
Description The AWS-RestoreDynamoDBTable runbook restores the Amazon DynamoDB table that you specify using point-in-time recovery (PITR). Run this Automation (console) Document type Automation Owner Amazon AWS-RestoreDynamoDBTable 104 AWS Systems Manager Automation runbook reference User Guide Platforms Databases Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • EnablePointInTimeRecoverAsNeeded Type: Boolean Default: true Description: (Optional) Determines whether the automation turns on point-in-time recovery as needed to restore the table. • GlobalSecondaryIndexOverride Type: String Description: (Optional) The new global secondary indexes to replace the existing secondary indexes for the new table. • LocalSecondaryIndexOverride Type: String Description: (Optional) The new local secondary indexes to replace the existing secondary indexes for the new table. • RestoreDateTime Type: String Description: (Required) The point-in-time recovery that you want to restore your table to during the last 35 days. Specify the date and time using the following format: DD/MM/YYYY HH:MM:SS 105 AWS-RestoreDynamoDBTable AWS Systems Manager Automation runbook reference User Guide • SourceTableArn Type: String Description: (Required) The ARN of the table that you want to restore. • SseSpecificationOverride Type: String Description: (Optional) The server-side encryption settings to use for the new table. • TargetTableName Type: String Description: (Required) The name of the table to restore. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • dynamodb:BatchWriteItem • dynamodb:DeleteItem • dynamodb:DescribeTable • dynamodb:GetItem • dynamodb:PutItem • dynamodb:Query • dynamodb:RestoreTableToPointInTime • dynamodb:Scan • dynamodb:UpdateItem Document Steps • aws:executeScript - Restores the DynamoDB table that you specify in the TargetTableName parameter using point-in-time recovery. AWS-RestoreDynamoDBTable 106 AWS Systems Manager Automation runbook reference User Guide Amazon EBS AWS Systems Manager Automation provides predefined runbooks for Amazon Elastic Block Store. For more information about runbooks, see Working with runbooks. For information about how to view runbook content, see View runbook content. Topics • AWSSupport-AnalyzeEBSResourceUsage • AWS-ArchiveEBSSnapshots • AWS-AttachEBSVolume • AWSSupport-CalculateEBSPerformanceMetrics • AWS-CopySnapshot • AWS-CreateSnapshot • AWS-DeleteSnapshot • AWSConfigRemediation-DeleteUnusedEBSVolume • AWS-DeregisterAMIs • AWS-DetachEBSVolume • AWSConfigRemediation-EnableEbsEncryptionByDefault • AWS-ExtendEbsVolume • AWSSupport-ModifyEBSSnapshotPermission • AWSConfigRemediation-ModifyEBSVolumeType AWSSupport-AnalyzeEBSResourceUsage Description The AWSSupport-AnalyzeEBSResourceUsage automation runbook is used to analyze resource usage on Amazon Elastic Block Store (Amazon EBS). It analyzes volume usage and identifies abandoned volumes, images, and snapshots in a given AWS Region. How does it work? The runbook performs the following four tasks: Amazon EBS 107 AWS Systems Manager Automation runbook reference User Guide 1. Verifies that an Amazon Simple Storage Service (Amazon S3) bucket exists, or creates a new Amazon S3 bucket. 2. Gathers all the Amazon EBS volumes in the available state. 3. Gathers all Amazon EBS snapshots for which source volume has been deleted. 4. Gathers all Amazon Machine Images (AMIs) which are not in use by any non-terminated Amazon Elastic Compute Cloud (Amazon EC2) instances. The runbook generates CSV reports and stores them in a user-provided Amazon S3 bucket. The provided bucket should be secured following AWS security best practices as outlined in the end. If the user provided Amazon S3 bucket does not exist in the account, the runbook creates a new Amazon S3 bucket with the name format <User-provided-name>-awssupport-YYYY-MM- DD, encrypted with a custom AWS Key Management Service (AWS KMS) key, with object versioning enabled, blocked public access, and require requests to use SSL/TLS. If you want to specify your own Amazon S3 bucket, please make sure it is configured following these best practices: • Block public access to the bucket (set IsPublic to False). • Turn on Amazon S3 access logging. • Allow only SSL requests to your bucket. • Turn on object versioning. • Use an AWS Key Management Service (AWS KMS) key to encrypt your bucket. Important Using this runbook might incur extra charges against your account for the creation of Amazon S3 buckets and objects. See Amazon S3 Pricing for more details on the charges that might incur. Document type Automation Owner Amazon AWSSupport-AnalyzeEBSResourceUsage 108 AWS Systems Manager Automation runbook reference User Guide Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • S3BucketName Type: AWS::S3::Bucket::Name Description: (Required) The Amazon S3 bucket in your account to upload the report to. Ensure the bucket policy does not grant unnecessary read/write permissions to parties that do not need access to the collected logs. If the bucket specified does not exist in the account, then automation creates a new bucket in the Region where automation is initiated with
|
systems-manager-automation-runbook-guide-026
|
systems-manager-automation-runbook-guide.pdf
| 26 |
AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • S3BucketName Type: AWS::S3::Bucket::Name Description: (Required) The Amazon S3 bucket in your account to upload the report to. Ensure the bucket policy does not grant unnecessary read/write permissions to parties that do not need access to the collected logs. If the bucket specified does not exist in the account, then automation creates a new bucket in the Region where automation is initiated with the name format <User-provided-name>-awssupport-YYYY-MM-DD, encrypted with a custom AWS KMS key. Allowed Pattern: $|^(?!(^(([0-9]{1,3}[.]){3}[0-9]{1,3}$)))^((?!xn—)(?!.*- s3alias))[a-z0-9][-.a-z0-9]{1,61}[a-z0-9]$ • CustomerManagedKmsKeyArn Type: String Description: (Optional) The custom AWS KMS key Amazon Resource Name (ARN) for encrypting the new Amazon S3 bucket that will create if the bucket specified does not exist in the account. Automation fails if the bucket creation is attempted without specifying a custom AWS KMS key ARN. Allowed Pattern: (^$|^arn:aws:kms:[-a-z0-9]:[0-9]:key/[-a-z0-9]*$) Required IAM permissions AWSSupport-AnalyzeEBSResourceUsage 109 AWS Systems Manager Automation runbook reference User Guide The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ec2:DescribeImages • ec2:DescribeInstances • ec2:DescribeSnapshots • ec2:DescribeVolumes • kms:Decrypt • kms:GenerateDataKey • s3:CreateBucket • s3:GetBucketAcl • s3:GetBucketPolicyStatus • s3:GetBucketPublicAccessBlock • s3:ListBucket • s3:ListAllMyBuckets • s3:PutObject • s3:PutBucketLogging • s3:PutBucketPolicy • s3:PutBucketPublicAccessBlock • s3:PutBucketTagging • s3:PutBucketVersioning • s3:PutEncryptionConfiguration • ssm:DescribeAutomationExecutions Example policy with minimum required IAM Permissions to run this runbook: { "Version": "2012-10-17", "Statement": [{ "Sid": "Read_Only_Permissions", "Effect": "Allow", "Action": [ "ec2:DescribeImages", AWSSupport-AnalyzeEBSResourceUsage 110 AWS Systems Manager Automation runbook reference User Guide "ec2:DescribeInstances", "ec2:DescribeSnapshots", "ec2:DescribeVolumes", "ssm:DescribeAutomationExecutions" ], "Resource": "" }, { "Sid": "KMS_Generate_Permissions", "Effect": "Allow", "Action": ["kms:GenerateDataKey", "kms:Decrypt"], "Resource": "arn:aws:kms:us- west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" }, { "Sid": "S3_Read_Only_Permissions", "Effect": "Allow", "Action": [ "s3:GetBucketAcl", "s3:GetBucketPolicyStatus", "s3:GetBucketPublicAccessBlock", "s3:ListBucket" ], "Resource": [ "arn:aws:s3:::amzn-s3-demo-bucket1", "arn:aws:s3:::amzn-s3-demo-bucket2/" ] }, { "Sid": "S3_Create_Permissions", "Effect": "Allow", "Action": [ "s3:CreateBucket", "s3:PutObject", "s3:PutBucketLogging", "s3:PutBucketPolicy", "s3:PutBucketPublicAccessBlock", "s3:PutBucketTagging", "s3:PutBucketVersioning", "s3:PutEncryptionConfiguration" ], "Resource": "*" }] } AWSSupport-AnalyzeEBSResourceUsage 111 AWS Systems Manager Automation runbook reference User Guide Instructions Follow these steps to configure the automation: 1. Navigate to the AWSSupport-AnalyzeEBSResourceUsage in the AWS Systems Manager console. 2. For the input parameters enter the following: • AutomationAssumeRole (Optional): The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • S3BucketName (Required): The Amazon S3 bucket in your account to upload the report to. • CustomerManagedKmsKeyArn (Optional): The custom AWS KMS key Amazon Resource Name (ARN) for encrypting the new Amazon S3 bucket that will create if the bucket specified does not exist in the account. 3. Select Execute. 4. The automation initiates. 5. The automation runbook performs the following steps: • checkConcurrency: Ensures there is only one initiation of this runbook in the Region. If the runbook finds another execution in progress, it returns an error and ends. AWSSupport-AnalyzeEBSResourceUsage 112 AWS Systems Manager Automation runbook reference User Guide • verifyOrCreateS3bucket: Verifies if the Amazon S3 bucket exists. If not, it creates a new Amazon S3 bucket in the Region where automation is initiated with the name format <User-provided-name>- awssupport-YYYY-MM-DD, encrypted with a custom AWS KMS key. • gatherAmiDetails: Searches for AMIs, which are not in use by any Amazon EC2 instances, generates the report with the name format <region>-images.csv, and uploads it to the Amazon S3 bucket. • gatherVolumeDetails: Verifies Amazon EBS volumes in the available state, generates the report with the name format <region>-volume.csv, and uploads it in an Amazon S3 bucket. • gatherSnapshotDetails: Looks for the Amazon EBS snapshots of the Amazon EBS volumes that are deleted already, generates the report with the name format <region>-snapshot.csv, and uploads it to Amazon S3 bucket. 6. After completed, review the Outputs section for the detailed results of the execution. References Systems Manager Automation • Run this Automation (console) • Run an automation • Setting up an Automation • Support Automation Workflows landing page AWSSupport-AnalyzeEBSResourceUsage 113 AWS Systems Manager Automation runbook reference User Guide AWS-ArchiveEBSSnapshots Description The AWS-ArchiveEBSSnapshots runbook helps you archive snapshots for Amazon Elastic Block Store (Amazon EBS) volumes by specifying the tag you've applied to your snapshots. Alternatively, you can provide the ID of a volume if your snapshots are not tagged. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • Description Type: String Description: (Optional) A description for the Amazon
|
systems-manager-automation-runbook-guide-027
|
systems-manager-automation-runbook-guide.pdf
| 27 |
volumes by specifying the tag you've applied to your snapshots. Alternatively, you can provide the ID of a volume if your snapshots are not tagged. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • Description Type: String Description: (Optional) A description for the Amazon EBS snapshot. • DryRun Type: String Valid values: Yes | No AWS-ArchiveEBSSnapshots 114 AWS Systems Manager Automation runbook reference User Guide Description: (Required) Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. • RetentionCount Type: String Description: (Optional) The number of snapshots you want to archive. Don't specify a value for this parameter if you specify a value for RetentionDays. • RetentionDays Type: String Description: (Optional) The number of previous days of snapshots you want to archive. Don't specify a value for this parameter if you specify a value for RetentionCount. • SnapshotWithTag Type: String Valid values: Yes | No Description: (Required) Specifies whether the snapshots you want to archive are tagged. • TagKey Type: String Description: (Optional) The key of the tag assigned to the snapshots you want to archive. • TagValue Type: String Description: (Optional) The value of the tag assigned to the snapshots you want to archive. • VolumeId Type: String Description: (Optional) The ID of the volume whose snapshots you want to archive. Use this parameter if your snapshots are not tagged. Required IAM permissions AWS-ArchiveEBSSnapshots 115 AWS Systems Manager Automation runbook reference User Guide The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ec2:ArchiveSnapshots • ec2:DescribeSnapshots Document Steps aws:executeScript - Archives snapshots using the tag you specify using the TagKey and TagValue parameters, or the VolumeId parameter. AWS-AttachEBSVolume Description Attach an Amazon Elastic Block Store (Amazon EBS) volume to an Amazon Elastic Compute Cloud (Amazon EC2) instance. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on AWS-AttachEBSVolume 116 AWS Systems Manager Automation runbook reference User Guide your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • Device Type: String Description: (Required) The device name (for example, /dev/sdh or xvdh ). • InstanceId Type: String Description: (Required) The ID of the instance where you want to attach the volume. • VolumeId Type: String Description: (Required) The ID of the Amazon EBS volume. The volume and instance must be in the same Availability Zone. AWSSupport-CalculateEBSPerformanceMetrics Description The AWSSupport-CalculateEBSPerformanceMetrics runbook helps diagnose Amazon EBS performance issues by calculating and publishing performance metrics to a CloudWatch dashboard. The dashboard displays the estimated average IOPS and throughput for a target Amazon EBS volume or all the volumes attached to the target Amazon Elastic Compute Cloud (Amazon EC2) instance. For Amazon EC2 instances, it also shows the instance's average IOPS and throughput. The runbook outputs the link to the newly created CloudWatch dashboard that displays the relevant calculated CloudWatch metrics. The CloudWatch dashboard is created in your account with the name: AWSSupport-<ResourceId>-EBS-Performance- <automation:EXECUTION_ID>. How does it work? The runbook performs the following steps: • Ensures that the specified timestamps are valid. • Validates if the Resource ID (Amazon EBS Volume or Amazon EC2 Instance) is valid. AWSSupport-CalculateEBSPerformanceMetrics 117 AWS Systems Manager Automation runbook reference User Guide • When you provide an Amazon EC2 as a ResourceID, it creates a CloudWatch dashboard with Actual Total IOPS/Throughput for that Amazon EC2 instance and Estimated Average IOPS/ Throughput graph for all Amazon EBS volumes attached to an Amazon EC2 instance. • When you provide an Amazon EBS Volume as a ResourceID, it creates a CloudWatch dashboard with Estimated Average IOPS/Throughput graph for that volume. • After the CloudWatch dashboard is generated, if Estimated Average IOPS or Estimated Average Throughput is more than Maximum IOPS or Maximum Throughput, respectively, then microbursting is possible for the volume or volumes attached to an Amazon EC2 instance. Note For burstable volumes (gp2, sc2, and st1), the maximum IOPS/throughput should be consider, until you have burst balance. After burst balance is completely utilized i.e. it becomes zero, consider baseline IOPS/throughput metrics. Important Creating the CloudWatch dashboard might result in your extra charges to your account. For more information, consult the Amazon CloudWatch Pricing guide. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters
|
systems-manager-automation-runbook-guide-028
|
systems-manager-automation-runbook-guide.pdf
| 28 |
Average IOPS or Estimated Average Throughput is more than Maximum IOPS or Maximum Throughput, respectively, then microbursting is possible for the volume or volumes attached to an Amazon EC2 instance. Note For burstable volumes (gp2, sc2, and st1), the maximum IOPS/throughput should be consider, until you have burst balance. After burst balance is completely utilized i.e. it becomes zero, consider baseline IOPS/throughput metrics. Important Creating the CloudWatch dashboard might result in your extra charges to your account. For more information, consult the Amazon CloudWatch Pricing guide. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters Required IAM permissions AWSSupport-CalculateEBSPerformanceMetrics 118 AWS Systems Manager Automation runbook reference User Guide The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ec2:DescribeVolumes • ec2:DescribeInstances • ec2:DescribeInstanceTypes • cloudwatch:PutDashboard Sample Policy { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": "cloudwatch:PutDashboard", "Resource": "arn:aws:cloudwatch::Account-id:dashboard/*-EBS- Performance-*" }, { "Sid": "VisualEditor1", "Effect": "Allow", "Action": [ "ec2:DescribeInstances", "ec2:DescribeVolumes", "ec2:DescribeInstanceTypes" ], "Resource": "*" } ] } Instructions Follow these steps to configure the automation: 1. Navigate to AWSSupport-CalculateEBSPerformanceMetrics in Systems Manager under Documents. AWSSupport-CalculateEBSPerformanceMetrics 119 AWS Systems Manager Automation runbook reference User Guide 2. Select Execute automation. 3. For the input parameters, enter the following: • AutomationAssumeRole (Optional): The Amazon Resource Name (ARN) of the AWS AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user who starts this runbook. • ResourceID (Required): The ID of the Amazon EC2 instance or Amazon EBS volume. • Start time (Required): The start time to view the data in CloudWatch. The time must be in the format yyyy-mm- ddThh:mm:ss and in UTC. • End time (Required): The end time to view the data in CloudWatch. The time must be in the format yyyy-mm- ddThh:mm:ss and in UTC. 4. Select Execute. 5. The automation initiates. 6. The document performs the following steps: • CheckResourceIdAndTimeStamps: Checks if end time is greater than start time by at least one minute and if the resource provided exists. • CreateCloudWatchDashboard: Calculates Amazon EBS performance and displays a graph based on your Resource ID. If you provide an Amazon EBS Volume ID for the parameter Resource ID, this runbook creates a CloudWatch dashboard with estimated average IOPS and estimated average throughput for the Amazon EBS volume. If you provide an Amazon EC2 Instance ID for the parameter AWSSupport-CalculateEBSPerformanceMetrics 120 AWS Systems Manager Automation runbook reference User Guide Resource ID, this runbook creates a CloudWatch dashboard with Average Total IOPS and Average Total Throughput for Amazon EC2 instance and with Estimated average IOPS and estimated average throughput for all Amazon EBS volumes attached to the Amazon EC2 instance. 7. After completed, review the Outputs section for the detailed results of the execution: Example CloudWatch Dashboard For Resource ID as Amazon EC2 instance AWSSupport-CalculateEBSPerformanceMetrics 121 AWS Systems Manager Automation runbook reference User Guide AWSSupport-CalculateEBSPerformanceMetrics 122 AWS Systems Manager Automation runbook reference User Guide Example CloudWatch Dashboard For Resource ID as Amazon EBS volume id References Systems Manager Automation • Run this Automation (console) • Run an automation • Setting up an Automation • Support Automation Workflows landing page AWS service documentation • How can I identify if my Amazon EBS volume is micro-bursting and then prevent this from happening? • How do I use CloudWatch to view the aggregate Amazon EBS performance metrics for an EC2 instance? AWSSupport-CalculateEBSPerformanceMetrics 123 AWS Systems Manager Automation runbook reference User Guide AWS-CopySnapshot Description Copies a point-in-time snapshot of an Amazon Elastic Block Store (Amazon EBS) volume. You can copy the snapshot within the same AWS Region or from one Region to another. Copies of encrypted Amazon EBS snapshots remain encrypted. Copies of unencrypted snapshots remain unencrypted. To copy an encrypted snapshot that was shared from another account, you must have permissions for the KMS key used to encrypt the snapshot. Snapshots created by copying another snapshot have an arbitrary volume ID that should not be used for any purpose. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • Description Type: String Description: (Optional) A description for the Amazon EBS snapshot. • SnapshotId AWS-CopySnapshot 124 AWS Systems Manager Automation runbook reference User Guide Type: String Description: (Required) The ID of the Amazon EBS snapshot to copy. • SourceRegion Type: String Description: (Required) The Region where the source snapshot currently exists. Document Steps copySnapshot - Copies a
|
systems-manager-automation-runbook-guide-029
|
systems-manager-automation-runbook-guide.pdf
| 29 |
Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • Description Type: String Description: (Optional) A description for the Amazon EBS snapshot. • SnapshotId AWS-CopySnapshot 124 AWS Systems Manager Automation runbook reference User Guide Type: String Description: (Required) The ID of the Amazon EBS snapshot to copy. • SourceRegion Type: String Description: (Required) The Region where the source snapshot currently exists. Document Steps copySnapshot - Copies a snapshot of an Amazon EBS volume. Outputs copySnapshot.SnapshotId - The ID of the new snapshot. AWS-CreateSnapshot Description Create a snapshot of an Amazon EBS volume. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String AWS-CreateSnapshot 125 AWS Systems Manager Automation runbook reference User Guide Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • Description Type: String Description: (Optional) A description for the snapshot • VolumeId Type: String Description: (Required) The ID of the volume. AWS-DeleteSnapshot Description Delete a snapshot of an Amazon EBS volume. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String AWS-DeleteSnapshot 126 AWS Systems Manager Automation runbook reference User Guide Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • SnapshotId Type: String Description: (Required) The ID of the EBS snapshot. AWSConfigRemediation-DeleteUnusedEBSVolume Description The AWSConfigRemediation-DeleteUnusedEBSVolume runbook deletes an unused Amazon Elastic Block Store (Amazon EBS) volume. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. AWSConfigRemediation-DeleteUnusedEBSVolume 127 AWS Systems Manager Automation runbook reference User Guide • CreateSnapshot Type: Boolean Description: (Optional) If set to true , the automation creates a snapshot of the Amazon EBS volume before it is deleted. • VolumeId Type: String Description: (Required) The ID of the Amazon EBS volume that you want to delete. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:GetAutomationExecution • ec2:CreateSnapshot • ec2:DeleteVolume • ec2:DescribeSnapshots • ec2:DescribeVolumes Document Steps • aws:executeScript - Verifies the Amazon EBS volume you specify in the VolumeId parameter is not in use, and creates a snapshot depending on the value you choose for the CreateSnapshot parameter. • aws:branch - Branches based on the value you chose for the CreateSnapshot parameter. • aws:waitForAwsResourceProperty - Waits for the snapshot to complete. • aws:executeAwsApi - Deletes the snapshot if the snapshot creation failed. • aws:executeAwsApi - Deletes the Amazon EBS volume you specify in the VolumeId parameter. • aws:executeScript - Verifies the Amazon EBS volume has been deleted. AWSConfigRemediation-DeleteUnusedEBSVolume 128 AWS Systems Manager Automation runbook reference User Guide AWS-DeregisterAMIs Description The AWS-DeregisterAMIs runbook helps you deregister Amazon Machine Images (AMIs) by specifying the tag that you've applied to your AMIs. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • DryRun Type: String Valid values: Yes | No Description: (Required) Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. • RetainNumber Type: String AWS-DeregisterAMIs 129 AWS Systems Manager Automation runbook reference User Guide Description: (Optional) The number of AMIs that you want to retain. Don't specify a value for this parameter if you specify a value for Age. • Age Type: String Description: (Optional) The number of previous days of AMIs that you want to retain. Don't specify a value for this parameter if you specify a value for RetainNumber. • TagKey Type: String Description: (Required) The key of the tag assigned to the AMIs that you want to deregister. • TagValue Type: String Description: (Required) The value of the tag assigned to the AMIs that you want to deregister. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to
|
systems-manager-automation-runbook-guide-030
|
systems-manager-automation-runbook-guide.pdf
| 30 |
want to retain. Don't specify a value for this parameter if you specify a value for Age. • Age Type: String Description: (Optional) The number of previous days of AMIs that you want to retain. Don't specify a value for this parameter if you specify a value for RetainNumber. • TagKey Type: String Description: (Required) The key of the tag assigned to the AMIs that you want to deregister. • TagValue Type: String Description: (Required) The value of the tag assigned to the AMIs that you want to deregister. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ec2:DeregisterImage • ec2:DescribeImages Document Steps • aws:executeAwsApi - Validates the values that you specify for the runbook input parameters. • aws:executeAwsApi - Deregisters AMIs using the tag that you specify using the TagKey and TagValue parameters. AWS-DetachEBSVolume Description AWS-DetachEBSVolume 130 AWS Systems Manager Automation runbook reference User Guide Detach an Amazon EBS volume from an Amazon Elastic Compute Cloud (Amazon EC2) instance. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • LambdaAssumeRole Type: String Description: (Optional) The ARN of the role assumed by Lambda • VolumeId Type: String Description: (Required) The ID of the EBS volume. The volume and instance must be within the same Availability Zone AWSConfigRemediation-EnableEbsEncryptionByDefault Description AWSConfigRemediation-EnableEbsEncryptionByDefault 131 AWS Systems Manager Automation runbook reference User Guide The AWSConfigRemediation-EnableEbsEncryptionByDefault runbook enables encryption on all new Amazon Elastic Block Store (Amazon EBS) volumes in the AWS account and AWS Region where you run the automation. Volumes that were created before you run the automation are not encrypted. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ec2:EnableEbsEncryptionByDefault • ec2:GetEbsEncryptionByDefault • ssm:StartAutomationExecution • ssm:GetAutomationExecution Document Steps AWSConfigRemediation-EnableEbsEncryptionByDefault 132 AWS Systems Manager Automation runbook reference User Guide • aws:executeAwsApi - Enables the default Amazon EBS encryption setting in the current account and Region. • aws:assertAwsResourceProperty - Verifies that the default Amazon EBS encryption setting has been enabled. AWS-ExtendEbsVolume Description The AWS-ExtendEbsVolume runbook increases the size of an Amazon EBS volume and extends the file system. This automation supports the xfs and ext4 file systems. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • DriveLetter Type: String Description: (Optional) The letter of the drive whose file system you want to extend. This parameter is required for Windows instances. AWS-ExtendEbsVolume 133 AWS Systems Manager Automation runbook reference User Guide • InstanceId Type: String Description: (Optional) The ID of the Amazon EC2 instance that the Amazon EBS volume you want to extend is attached to. • KeepSnapshot Type: Boolean Default: true Description: (Optional) Determines whether to keep the snapshot created before increasing the size of your Amazon EBS volume. • MountPoint Type: String Description: (Optional) The mount point of the drive whose file system you want to extend. This parameter is required for Linux instances. • SizeGib Type: String Description: (Required) The size in GiB that you want to modify your Amazon EBS volume to. • VolumeId Type: String Description: (Required) The ID of the EBS volume that you want to extend. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ec2:CreateSnapshot • ec2:CreateTags • ec2:DeleteSnapshot AWS-ExtendEbsVolume 134 AWS Systems Manager Automation runbook reference User Guide • ec2:DescribeVolumes • ec2:ModifyVolume • ssm:DescribeInstanceInformation • ssm:GetCommandInvocation • ssm:SendCommand Document Steps • aws:executeScript - Increases the size of the volume to the value that you specify in the VolumeId parameter and extends the file system. AWSSupport-ModifyEBSSnapshotPermission Description The AWSSupport-ModifyEBSSnapshotPermission runbook helps you to modify permissions for multiple Amazon Elastic Block Store (Amazon EBS) snapshots. Using this runbook, you can make snapshots Public or Private and share them with other AWS accounts. Snapshots encrypted with a default KMS key can't be shared with other accounts using this runbook. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters
|
systems-manager-automation-runbook-guide-031
|
systems-manager-automation-runbook-guide.pdf
| 31 |
• ec2:ModifyVolume • ssm:DescribeInstanceInformation • ssm:GetCommandInvocation • ssm:SendCommand Document Steps • aws:executeScript - Increases the size of the volume to the value that you specify in the VolumeId parameter and extends the file system. AWSSupport-ModifyEBSSnapshotPermission Description The AWSSupport-ModifyEBSSnapshotPermission runbook helps you to modify permissions for multiple Amazon Elastic Block Store (Amazon EBS) snapshots. Using this runbook, you can make snapshots Public or Private and share them with other AWS accounts. Snapshots encrypted with a default KMS key can't be shared with other accounts using this runbook. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String AWSSupport-ModifyEBSSnapshotPermission 135 AWS Systems Manager Automation runbook reference User Guide Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • AccountIds Type: StringList Default: none Description: (Optional) The IDs of the accounts you want to share snapshots with. This parameter is required if you enter No for the value of the Private parameter. • AccountPermissionOperation Type: String Valid values: add | remove Default: none Description: (Optional) The type of operation to perform. • Private Type: String Valid values: Yes | No Description: (Required) Enter No for the value if you want to share snapshots with specific accounts. • SnapshotIds Type: StringList Description: (Required) The IDs of Amazon EBS snapshots whose permission you want to modify. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. AWSSupport-ModifyEBSSnapshotPermission 136 AWS Systems Manager Automation runbook reference User Guide • ssm:StartAutomationExecution • ssm:GetAutomationExecution • ec2:DescribeSnapshots • ec2:ModifySnapshotAttribute Document Steps 1. aws:executeScript - Verifies the IDs of the snapshots provided in the SnapshotIds parameter. After verifying the IDs, the script checks for encrypted snapshots and outputs a list if any are found. 2. aws:branch - Branches the automation based on the value you enter for the Private parameter. 3. aws:executeScript - Modifies permissions of the snapshots specified to share it with the accounts specified. 4. aws:executeScript - Modifies permissions of the snapshots to change them from Public to Private . Outputs ValidateSnapshots.EncryptedSnapshots SharewithOtherAccounts.Result MakePrivate.Result MakePrivate.Commands AWSConfigRemediation-ModifyEBSVolumeType Description The AWSConfigRemediation-ModifyEBSVolumeType runbook modifies the volume type of an Amazon Elastic Block Store (Amazon EBS) volume. After the volume type is modified, the volume enters an optimizing state. For information about monitoring the progress of volume modifications, see Monitor the progress of volume modifications in the Amazon EC2 User Guide . Run this Automation (console) Document type AWSConfigRemediation-ModifyEBSVolumeType 137 AWS Systems Manager Automation runbook reference User Guide Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. • EbsVolumeId Type: String Description: (Required) The ID of the Amazon EBS volume that you want to modify. • EbsVolumeType Type: String Valid values: standard | io1 | io2 | gp2 | gp3 | sc1 | st1 Description: The volume type you want to change the Amazon EBS volume to. For information about Amazon EBS volume types, see Amazon EBS volume types in the Amazon EC2 User Guide . Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:GetAutomationExecution • ec2:DescribeVolumes AWSConfigRemediation-ModifyEBSVolumeType 138 AWS Systems Manager Automation runbook reference User Guide • ec2:ModifyVolume Document Steps • aws:waitForAwsResourceProperty - Verifies the state of the volume is available or in- use . • aws:executeAwsApi - Modifies the Amazon EBS volume you specify in the EbsVolumeId parameter. • aws:waitForAwsResourceProperty - Verifies the type of the volume has been changed to the value you specified in the EbsVolumeType parameter. Amazon EC2 AWS Systems Manager Automation provides predefined runbooks for Amazon Elastic Compute Cloud. Runbooks for Amazon Elastic Block Store are located in the Amazon EBS section of the runbook reference. For more information about runbooks, see Working with runbooks. For information about how to view runbook content, see View runbook content. Topics • AWS-ASGEnterStandby • AWS-ASGExitStandby • AWS-CreateImage • AWS-DeleteImage • AWS-PatchAsgInstance • AWS-PatchInstanceWithRollback • AWS-QuarantineEC2Instance • AWS-ResizeInstance • AWS-RestartEC2Instance • AWS-SetupJupyter • AWS-StartEC2Instance • AWS-StopEC2Instance • AWS-TerminateEC2Instance • AWS-UpdateLinuxAmi Amazon EC2 139 AWS Systems Manager Automation runbook reference User Guide • AWS-UpdateWindowsAmi • AWSConfigRemediation-EnableAutoScalingGroupELBHealthCheck • AWSConfigRemediation-EnforceEC2InstanceIMDSv2 • AWSEC2-CloneInstanceAndUpgradeSQLServer • AWSEC2-CloneInstanceAndUpgradeWindows • AWSEC2-ConfigureSTIG • AWSEC2-PatchLoadBalancerInstance • AWSEC2-SQLServerDBRestore • AWSSupport-ActivateWindowsWithAmazonLicense • AWSSupport-AnalyzeAWSEndpointReachabilityFromEC2 • AWSPremiumSupport-ChangeInstanceTypeIntelToAMD • AWSSupport-CheckXenToNitroMigrationRequirements • AWSSupport-ConfigureEC2Metadata • AWSSupport-ContainEC2Instance • AWSSupport-CopyEC2Instance • AWSSupport-EnableWindowsEC2SerialConsole • AWSSupport-ExecuteEC2Rescue • AWSSupport-ListEC2Resources • AWSSupport-ManageRDPSettings • AWSSupport-ManageWindowsService • AWSSupport-MigrateEC2ClassicToVPC • AWSSupport-MigrateXenToNitroLinux • AWSSupport-ResetAccess • AWSSupport-ResetLinuxUserPassword • AWSPremiumSupport-ResizeNitroInstance • AWSSupport-RestoreEC2InstanceFromSnapshot • AWSSupport-SendLogBundleToS3Bucket • AWSSupport-StartEC2RescueWorkflow • AWSPremiumSupport-TroubleshootEC2DiskUsage • AWSSupport-TroubleshootEC2InstanceConnect Amazon EC2 140 AWS Systems Manager Automation runbook reference
|
systems-manager-automation-runbook-guide-032
|
systems-manager-automation-runbook-guide.pdf
| 32 |
• AWS-PatchAsgInstance • AWS-PatchInstanceWithRollback • AWS-QuarantineEC2Instance • AWS-ResizeInstance • AWS-RestartEC2Instance • AWS-SetupJupyter • AWS-StartEC2Instance • AWS-StopEC2Instance • AWS-TerminateEC2Instance • AWS-UpdateLinuxAmi Amazon EC2 139 AWS Systems Manager Automation runbook reference User Guide • AWS-UpdateWindowsAmi • AWSConfigRemediation-EnableAutoScalingGroupELBHealthCheck • AWSConfigRemediation-EnforceEC2InstanceIMDSv2 • AWSEC2-CloneInstanceAndUpgradeSQLServer • AWSEC2-CloneInstanceAndUpgradeWindows • AWSEC2-ConfigureSTIG • AWSEC2-PatchLoadBalancerInstance • AWSEC2-SQLServerDBRestore • AWSSupport-ActivateWindowsWithAmazonLicense • AWSSupport-AnalyzeAWSEndpointReachabilityFromEC2 • AWSPremiumSupport-ChangeInstanceTypeIntelToAMD • AWSSupport-CheckXenToNitroMigrationRequirements • AWSSupport-ConfigureEC2Metadata • AWSSupport-ContainEC2Instance • AWSSupport-CopyEC2Instance • AWSSupport-EnableWindowsEC2SerialConsole • AWSSupport-ExecuteEC2Rescue • AWSSupport-ListEC2Resources • AWSSupport-ManageRDPSettings • AWSSupport-ManageWindowsService • AWSSupport-MigrateEC2ClassicToVPC • AWSSupport-MigrateXenToNitroLinux • AWSSupport-ResetAccess • AWSSupport-ResetLinuxUserPassword • AWSPremiumSupport-ResizeNitroInstance • AWSSupport-RestoreEC2InstanceFromSnapshot • AWSSupport-SendLogBundleToS3Bucket • AWSSupport-StartEC2RescueWorkflow • AWSPremiumSupport-TroubleshootEC2DiskUsage • AWSSupport-TroubleshootEC2InstanceConnect Amazon EC2 140 AWS Systems Manager Automation runbook reference User Guide • AWSSupport-TroubleshootLinuxMGNDRSAgentLogs • AWSSupport-TroubleshootRDP • AWSSupport-TroubleshootSSH • AWSSupport-TroubleshootSUSERegistration • AWSSupport-TroubleshootWindowsPerformance • AWSSupport-TroubleshootWindowsUpdate • AWSSupport-UpgradeWindowsAWSDrivers AWS-ASGEnterStandby Description Change the standby state of an Amazon Elastic Compute Cloud (Amazon EC2) instance in an Auto Scaling group. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • InstanceId AWS-ASGEnterStandby 141 AWS Systems Manager Automation runbook reference User Guide Type: String Description: (Required) ID of an Amazon EC2 instance for which you want to change the standby state within an Auto Scaling group. • LambdaRoleArn Type: String Description: (Optional) The ARN of the role that allows Lambda created by Automation to perform the actions on your behalf. If not specified a transient role will be created to run the Lambda function. AWS-ASGExitStandby Description Change the standby state of an Amazon Elastic Compute Cloud (Amazon EC2) instance in an Auto Scaling group. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on AWS-ASGExitStandby 142 AWS Systems Manager Automation runbook reference User Guide your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • InstanceId Type: String Description: (Required) ID of an EC2 instance for which you want to change the standby state within an Auto Scaling group. • LambdaRoleArn Type: String Description: (Optional) The ARN of the role that allows Lambda created by Automation to perform the actions on your behalf. If not specified a transient role will be created to run the Lambda function. AWS-CreateImage Description Create a new Amazon Machine Image (AMI) from an Amazon Elastic Compute Cloud (Amazon EC2) instance. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String AWS-CreateImage 143 AWS Systems Manager Automation runbook reference User Guide Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • InstanceId Type: String Description: (Required) The ID of the EC2 instance. • NoReboot Type: Boolean Description: (Optional) Do not reboot the instance before creating the image. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "ec2:CreateImage", "ec2:DescribeImages" ], "Resource": [ "*" ] } ] } AWS-DeleteImage Description AWS-DeleteImage 144 AWS Systems Manager Automation runbook reference User Guide Delete an Amazon Machine Image (AMI) and all associated snapshots. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • ImageId Type: String Description: (Required) The ID of the AMI. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", AWS-DeleteImage 145 AWS Systems Manager Automation runbook reference User Guide "Action": "ec2:DeleteSnapshot", "Resource": "arn:aws:ec2:{region}::snapshot/*" }, { "Effect": "Allow", "Action": "ec2:DescribeImages", "Resource": "*" }, { "Effect": "Allow", "Action": "ec2:DeregisterImage", "Resource": "*" } ] } AWS-PatchAsgInstance Description Patch Amazon Elastic Compute Cloud (Amazon EC2) instances in an Auto Scaling group. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on AWS-PatchAsgInstance 146 AWS
|
systems-manager-automation-runbook-guide-033
|
systems-manager-automation-runbook-guide.pdf
| 33 |
"Statement": [ { "Effect": "Allow", AWS-DeleteImage 145 AWS Systems Manager Automation runbook reference User Guide "Action": "ec2:DeleteSnapshot", "Resource": "arn:aws:ec2:{region}::snapshot/*" }, { "Effect": "Allow", "Action": "ec2:DescribeImages", "Resource": "*" }, { "Effect": "Allow", "Action": "ec2:DeregisterImage", "Resource": "*" } ] } AWS-PatchAsgInstance Description Patch Amazon Elastic Compute Cloud (Amazon EC2) instances in an Auto Scaling group. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on AWS-PatchAsgInstance 146 AWS Systems Manager Automation runbook reference User Guide your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • InstanceId Type: String Description: (Required) ID of the instance to patch. Don't specify an instance ID that is configured to run during a maintenance window. • LambdaRoleArn Type: String Description: (Optional) The ARN of the role that allows the Lambda created by Automation to perform the actions on your behalf. If not specified, a transient role will be created to run the Lambda function. • WaitForInstance Type: String Default: PT2M Description: (Optional) Duration that the Automation should sleep to allow the instance to come back into service. • WaitForReboot Type: String Default: PT5M Description: (Optional) Duration that the Automation should sleep to allow a patched instance to reboot. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:GetAutomationExecution AWS-PatchAsgInstance 147 AWS Systems Manager Automation runbook reference User Guide • ssm:GetCommandInvocation • ssm:GetParameter • ssm:SendCommand • cloudformation:CreateStack • cloudformation:DeleteStack • cloudformation:DescribeStacks • ec2:CreateTags • ec2:DescribeInstances • ec2:RunInstances • iam:AttachRolePolicy • iam:CreateRole • iam:DeleteRole • iam:DeleteRolePolicy • iam:DetachRolePolicy • iam:GetRole • iam:PassRole • iam:PutRolePolicy • lambda:CreateFunction • lambda:DeleteFunction • lambda:GetFunction • lambda:InvokeFunction AWS-PatchInstanceWithRollback Description Brings an EC2 instance into compliance with the applicable patch baseline. Rolls back root volume on failure. Run this Automation (console) Document type AWS-PatchInstanceWithRollback 148 AWS Systems Manager Automation runbook reference User Guide Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • InstanceId Type: String Description: (Required) EC2 InstanceId to which we apply the patch-baseline. • LambdaAssumeRole Type: String Description: (Optional) The ARN of the role that allows Lambda created by Automation to perform the actions on your behalf. If not specified a transient role will be created to run the Lambda function. • ReportS3Bucket Type: String Description: (Optional) Amazon S3 Bucket destination for the Compliance Report generated during process. Document Steps AWS-PatchInstanceWithRollback 149 AWS Systems Manager Automation runbook reference User Guide Step number Step name Automation action 1 2 3 4 5 6 7 8 9 10 11 createDocumentStack aws:createStack IdentifyRootVolume aws:invokeLambdaFu nction PrePatchSnapshot aws:executeAutomat ion installMissingUpdates aws:runCommand SleepThruInstallation aws:invokeLambdaFu nction CheckCompliance aws:invokeLambdaFu nction SaveComplianceReportToS3 aws:invokeLambdaFu nction ReportSuccessOrFailure aws:invokeLambdaFu nction RestoreFromSnapshot aws:invokeLambdaFu nction DeleteSnapshot aws:invokeLambdaFu deleteCloudFormati onTemplate nction aws:deleteStack Outputs IdentifyRootVolume.Payload PrePatchSnapshot.Output SaveComplianceReportToS3.Payload AWS-PatchInstanceWithRollback 150 AWS Systems Manager Automation runbook reference User Guide RestoreFromSnapshot.Payload CheckCompliance.Payload AWS-QuarantineEC2Instance Description With the AWS-QuarantineEC2Instance runbook, you can assign a security group to an Amazon Elastic Compute Cloud (Amazon EC2) instance that doesn't allow any inbound or outbound traffic. Important Changes to the RDP settings should be carefully reviewed before running this runbook. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. AWS-QuarantineEC2Instance 151 AWS Systems Manager Automation runbook reference User Guide • InstanceId Type: String Description: (Required) The ID of the managed instance to manage the RDP settings of. • IsolationSecurityGroup Type: String Description: (Required) The name of the security group that you want to assign to the instance to prevent inbound or outbound traffic. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • autoscaling:DescribeAutoScalingInstances • autoscaling:DetachInstances • ec2:CreateSecurityGroup • ec2:CreateSnapshot • ec2:DescribeInstances • ec2:DescribeSecurityGroups • ec2:DescribeSnapshots • ec2:ModifyInstanceAttribute • ec2:RevokeSecurityGroupEgress • ec2:RevokeSecurityGroupIngress Document Steps • aws:executeAwsApi - Gathers details about the instance. • aws:executeScript - Verifies the instance isn't part of an Auto Scaling group. • aws:executeAwsApi - Creates a snapshot of the root volume attached to the instance. • aws:waitForAwsResourceProperty - Waits for the snapshot state to be completed. AWS-QuarantineEC2Instance 152 AWS Systems Manager Automation runbook reference User Guide •
|
systems-manager-automation-runbook-guide-034
|
systems-manager-automation-runbook-guide.pdf
| 34 |
to prevent inbound or outbound traffic. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • autoscaling:DescribeAutoScalingInstances • autoscaling:DetachInstances • ec2:CreateSecurityGroup • ec2:CreateSnapshot • ec2:DescribeInstances • ec2:DescribeSecurityGroups • ec2:DescribeSnapshots • ec2:ModifyInstanceAttribute • ec2:RevokeSecurityGroupEgress • ec2:RevokeSecurityGroupIngress Document Steps • aws:executeAwsApi - Gathers details about the instance. • aws:executeScript - Verifies the instance isn't part of an Auto Scaling group. • aws:executeAwsApi - Creates a snapshot of the root volume attached to the instance. • aws:waitForAwsResourceProperty - Waits for the snapshot state to be completed. AWS-QuarantineEC2Instance 152 AWS Systems Manager Automation runbook reference User Guide • aws:executeAwsApi - Assigns the security group specified in the IsolationSecurityGroup parameter to your instance. Outputs GetEC2InstanceResources.RevokedSecurityGroupsIds GetEC2InstanceResources.RevokedSecurityGroupsNames createSnapshot.SnapId AWS-ResizeInstance Description Change the instance type of an Amazon Elastic Compute Cloud (Amazon EC2) instance. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. AWS-ResizeInstance 153 AWS Systems Manager Automation runbook reference User Guide • InstanceId Type: String Description: (Required) The ID of the instance. • InstanceType Type: String Description: (Required) The instance type. • LambdaAssumeRole Type: String Description: (Optional) The ARN of the role assumed by Lambda. AWS-RestartEC2Instance Description Restart one or more Amazon Elastic Compute Cloud (Amazon EC2) instances. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String AWS-RestartEC2Instance 154 AWS Systems Manager Automation runbook reference User Guide Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • InstanceId Type: StringList Description: (Required) The IDs of the Amazon EC2 instances to restart. AWS-SetupJupyter Description The AWS-SetupJupyter runbook helps you set up Jupyter Notebook on an Amazon Elastic Compute Cloud (Amazon EC2) instance. You can either specify an existing instance, or provide an Amazon Machine Image (AMI) ID for the automation to launch and set up a new instance. Before you begin, you must create a SecureString parameter in Parameter Store to use as the password for Jupyter Notebook. Parameter Store is a tool in AWS Systems Manager. For information about creating parameters, see Creating parameters in the AWS Systems Manager User Guide. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux Parameters • AutomationAssumeRole Type: String AWS-SetupJupyter 155 AWS Systems Manager Automation runbook reference User Guide Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • AmiId Type: String Description: (Optional) The ID of the AMI that you want to use to launch a new instance and set up Jupyter Notebook. • InstanceId Type: String Description: (Required) The ID of the instance that you want to set up Jupyter Notebook on. • InstanceType Type: String Default: t3.medium Description: (Optional) If you're launching a new instance to set up Jupyter Notebook, specify the instance type that you want to use. • JupyterPasswordSSMKey Type: String Description: (Required) The name of the SecureString parameter in Parameter Store that you want to use as the password for Jupyter Notebook. • KeyPairName Type: String Description: (Optional) The key pair that you want to associate with the newly launched instance. • RemoteAccessCidr Type: String Default: 0.0.0.0/0 AWS-SetupJupyter 156 AWS Systems Manager Automation runbook reference User Guide Description: (Optional) The CIDR range that you want to allow SSH traffic from. • RoleName Type: String Default: SSMManagedInstanceProfileRole Description: (Optional) The name of the instance profile for the newly launched instance. • StackName Type: String Default: CreateManagedInstanceStack{{automation:EXECUTION_ID}} Description: (Optional) The AWS CloudFormation stack name that you want the automation to use. • SubnetId Type: String Default: Default Description: (Optional) The subnet that you want to launch the new instance to use. • VpcId Type: String Default: Default Description: (Optional) The ID of the virtual private cloud (VPC) that you want to launch the new instance in to. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:GetAutomationExecution • ssm:GetCommandInvocation AWS-SetupJupyter 157 AWS Systems Manager Automation runbook reference User Guide • ssm:GetParameter • ssm:SendCommand • ssm:StartAutomationExecution • cloudformation:CreateStack • cloudformation:DeleteStack • cloudformation:DescribeStacks • ec2:DescribeInstances • ec2:DescribeKeyPairs • ec2:RunInstances • iam:AttachRolePolicy • iam:CreateRole • iam:DeleteRole • iam:DeleteRolePolicy • iam:DetachRolePolicy • iam:GetRole • iam:PassRole •
|
systems-manager-automation-runbook-guide-035
|
systems-manager-automation-runbook-guide.pdf
| 35 |
The subnet that you want to launch the new instance to use. • VpcId Type: String Default: Default Description: (Optional) The ID of the virtual private cloud (VPC) that you want to launch the new instance in to. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:GetAutomationExecution • ssm:GetCommandInvocation AWS-SetupJupyter 157 AWS Systems Manager Automation runbook reference User Guide • ssm:GetParameter • ssm:SendCommand • ssm:StartAutomationExecution • cloudformation:CreateStack • cloudformation:DeleteStack • cloudformation:DescribeStacks • ec2:DescribeInstances • ec2:DescribeKeyPairs • ec2:RunInstances • iam:AttachRolePolicy • iam:CreateRole • iam:DeleteRole • iam:DeleteRolePolicy • iam:DetachRolePolicy • iam:GetRole • iam:PassRole • iam:PutRolePolicy • lambda:CreateFunction • lambda:DeleteFunction • lambda:GetFunction • lambda:InvokeFunction Document Steps • aws:executeScript - Sets up Jupyter Notebook on the instance you specify, or on a newly launched instance, using the values that you specify for the runbook input parameters. AWS-StartEC2Instance Description Start one or more Amazon Elastic Compute Cloud (Amazon EC2) instances. AWS-StartEC2Instance 158 AWS Systems Manager Automation runbook reference User Guide Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • InstanceId Type: StringList Description: (Required) EC2 instances to start. AWS-StopEC2Instance Description Stops one or more Amazon Elastic Compute Cloud (Amazon EC2) instances. Run this Automation (console) Document type Automation Owner AWS-StopEC2Instance 159 AWS Systems Manager Automation runbook reference User Guide Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • InstanceId Type: StringList Description: (Required) EC2 instances to stop. AWS-TerminateEC2Instance Description Terminate one or more Amazon Elastic Compute Cloud (Amazon EC2) instances. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows AWS-TerminateEC2Instance 160 AWS Systems Manager Automation runbook reference User Guide Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • InstanceId Type: StringList Description: (Required) IDs of one or more EC2 instances to terminate. AWS-UpdateLinuxAmi Description Update an Amazon Machine Image (AMI) with Linux distribution packages and Amazon software. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux Parameters • AutomationAssumeRole Type: String AWS-UpdateLinuxAmi 161 AWS Systems Manager Automation runbook reference User Guide Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • ExcludePackages Type: String Default: none Description: (Optional) Names of packages to hold back from updates, under all conditions. By default ("none"), no package is excluded. • IamInstanceProfileName Type: String Default: ManagedInstanceProfile Description: (Required) The instance profile that enables Systems Manager to manage the instance. • IncludePackages Type: String Default: all Description: (Optional) Only update these named packages. By default ("all"), all available updates are applied. • InstanceType Type: String Default: t2.micro Description: (Optional) Type of instance to launch as the workspace host. Instance types vary by Region. • MetadataOptions Type: StringMap AWS-UpdateLinuxAmi 162 AWS Systems Manager Automation runbook reference User Guide Default: {"HttpEndpoint": "enabled", "HttpTokens": "optional"} Description: (Optional) The metadata options for the instance. For more information, see InstanceMetadataOptionsRequest. • PostUpdateScript Type: String Default: none Description: (Optional) URL of a script to run after package updates are applied. Default ("none") is to not run a script. • PreUpdateScript Type: String Default: none Description: (Optional) URL of a script to run before updates are applied. Default ("none") is to not run a script. • SecurityGroupIds Type: String Description: (Required) A comma separated list of the IDs of the security groups you want to apply to the AMI. • SourceAmiId Type: String Description: (Required) The source Amazon Machine Image ID. • SubnetId Type: String Description: (Optional) The ID of the subnet you want to launch the instance into. If you have deleted your default VPC, this parameter is required. • TargetAmiName AWS-UpdateLinuxAmi 163 AWS Systems Manager Automation runbook reference User Guide Type: String Default: UpdateLinuxAmi_from_{{SourceAmiId}}_on_{{global:DATE_TIME}} Description: (Optional) The name of the new AMI that will be created. Default is a system- generated string including the source AMI id,
|
systems-manager-automation-runbook-guide-036
|
systems-manager-automation-runbook-guide.pdf
| 36 |
Description: (Required) A comma separated list of the IDs of the security groups you want to apply to the AMI. • SourceAmiId Type: String Description: (Required) The source Amazon Machine Image ID. • SubnetId Type: String Description: (Optional) The ID of the subnet you want to launch the instance into. If you have deleted your default VPC, this parameter is required. • TargetAmiName AWS-UpdateLinuxAmi 163 AWS Systems Manager Automation runbook reference User Guide Type: String Default: UpdateLinuxAmi_from_{{SourceAmiId}}_on_{{global:DATE_TIME}} Description: (Optional) The name of the new AMI that will be created. Default is a system- generated string including the source AMI id, and the creation time and date. AWS-UpdateWindowsAmi Description Update a Microsoft Windows Amazon Machine Image (AMI). By default, this runbook installs all Windows updates, Amazon software, and Amazon drivers. It then runs Sysprep to create a new AMI. Supports Windows Server 2008 R2 or later. Important If your instances connect to AWS Systems Manager using VPC endpoints, this runbook will fail unless used in the us-east-1 Region. Instances must have TLS 1.2 enabled to use this runbook. Run this Automation (console) Document type Automation Owner Amazon Platforms Windows Parameters • AutomationAssumeRole AWS-UpdateWindowsAmi 164 AWS Systems Manager Automation runbook reference User Guide Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • Categories Type: String Description: (Optional) Specify one or more update categories. You can filter categories using comma-separated values. Options: Application, Connectors, CriticalUpdates, DefinitionUpdates, DeveloperKits, Drivers, FeaturePacks, Guidance, Microsoft, SecurityUpdates, ServicePacks, Tools, UpdateRollups, Updates. Valid formats include a single entry, for example: CriticalUpdates. Or you can specify a comma separated list: CriticalUpdates,SecurityUpdates. NOTE: There cannot be any spaces around the commas. • ExcludeKbs Type: String Description: (Optional) Specify one or more Microsoft Knowledge Base (KB) article IDs to exclude. You can exclude multiple IDs using comma-separated values. Valid formats: KB9876543 or 9876543. • IamInstanceProfileName Type: String Default: ManagedInstanceProfile Description: (Required) The name of the role that enables Systems Manager to manage the instance. • IncludeKbs Type: String Description: (Optional) Specify one or more Microsoft Knowledge Base (KB) article IDs to include. You can install multiple IDs using comma-separated values. Valid formats: KB9876543 or 9876543. AWS-UpdateWindowsAmi 165 AWS Systems Manager Automation runbook reference User Guide • InstanceType Type: String Default: t2.medium Description: (Optional) Type of instance to launch as the workspace host. Instance types vary by region. Default is t2.medium. • MetadataOptions Type: StringMap Default: {"HttpEndpoint": "enabled", "HttpTokens": "optional"} Description: (Optional) The metadata options for the instance. For more information, see InstanceMetadataOptionsRequest. • PostUpdateScript Type: String Description: (Optional) A script provided as a string. It will run after installing OS updates. • PreUpdateScript Type: String Description: (Optional) A script provided as a string. It will run prior to installing OS updates. • PublishedDateAfter Type: String Description: (Optional) Specify the date that the updates should be published after. For example, if 01/01/2017 is specified, any updates that were found during the Windows Update search that have been published on or after 01/01/2017 will be returned. • PublishedDateBefore Type: String Description: (Optional) Specify the date that the updates should be published before. For example, if 01/01/2017 is specified, any updates that were found during the Windows Update search that have been published on or before 01/01/2017 will be returned. AWS-UpdateWindowsAmi 166 AWS Systems Manager Automation runbook reference User Guide • PublishedDaysOld Type: String Description: (Optional) Specify the amount of days old the updates must be from the published date. For example, if 10 is specified, any updates that were found during the Windows Update search that have been published 10 or more days ago will be returned. • SecurityGroupIds Type: String Description: (Required) A comma separated list of the IDs of the security groups you want to apply to the AMI. • SeverityLevels Type: String Description: (Optional) Specify one or more MSRC severity levels associated with an update. You can filter severity levels using comma-separated values. By default patches for all security levels are selected. If value supplied, the update list is filtered by those values. Options: Critical, Important, Low, Moderate or Unspecified. Valid formats include a single entry, for example: Critical. Or, you can specify a comma separated list: Critical,Important,Low. • SourceAmiId Type: String Description: (Required) The source AMI ID. • SubnetId Type: String Description: (Optional) The ID of the subnet you want to launch the instance into. If you have deleted your default VPC, this parameter is required. • TargetAmiName Type: String Default: UpdateWindowsAmi_from_{{SourceAmiId}}_on_{{global:DATE_TIME}} AWS-UpdateWindowsAmi 167 AWS Systems Manager Automation runbook reference User Guide Description: (Optional) The name of the new AMI that will be created. Default is a system- generated string
|
systems-manager-automation-runbook-guide-037
|
systems-manager-automation-runbook-guide.pdf
| 37 |
those values. Options: Critical, Important, Low, Moderate or Unspecified. Valid formats include a single entry, for example: Critical. Or, you can specify a comma separated list: Critical,Important,Low. • SourceAmiId Type: String Description: (Required) The source AMI ID. • SubnetId Type: String Description: (Optional) The ID of the subnet you want to launch the instance into. If you have deleted your default VPC, this parameter is required. • TargetAmiName Type: String Default: UpdateWindowsAmi_from_{{SourceAmiId}}_on_{{global:DATE_TIME}} AWS-UpdateWindowsAmi 167 AWS Systems Manager Automation runbook reference User Guide Description: (Optional) The name of the new AMI that will be created. Default is a system- generated string including the source AMI id, and the creation time and date. AWSConfigRemediation- EnableAutoScalingGroupELBHealthCheck Description The AWSConfigRemediation-EnableAutoScalingGroupELBHealthCheck runbook enables health checks for the Amazon EC2 Auto Scaling (Auto Scaling) group you specify. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. • AutoScalingGroupARN Type: String Description: (Required) The Amazon Resource Name (ARN) of the auto scaling group that you want to enable health checks on. AWSConfigRemediation-EnableAutoScalingGroupELBHealthCheck 168 AWS Systems Manager Automation runbook reference User Guide • HealthCheckGracePeriod Type: Integer Default: 300 Description: (Optional) The amount of time, in seconds, that Auto Scaling waits before checking the health status of an Amazon Elastic Compute Cloud (Amazon EC2) instance that has come into service. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:GetAutomationExecution • ec2:DescribeAutoScalingGroups • ec2:UpdateAutoScalingGroup Document Steps • aws:executeScript - Enables health checks on the Auto Scaling group you specify in the AutoScalingGroupARN parameter. AWSConfigRemediation-EnforceEC2InstanceIMDSv2 Description The AWSConfigRemediation-EnforceEC2InstanceIMDSv2 runbook requires the Amazon Elastic Compute Cloud (Amazon EC2) instance you specify to use Instance Metadata Service Version 2 (IMDSv2). Run this Automation (console) Document type Automation AWSConfigRemediation-EnforceEC2InstanceIMDSv2 169 AWS Systems Manager Automation runbook reference User Guide Owner Amazon Platforms Linux, macOS, Windows Parameters • InstanceId Type: String Description: (Required) The ID of the Amazon EC2 instance you want to require to use IMDSv2. • AutomationAssumeRole Type: String Description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. • HttpPutResponseHopLimit Type: Integer Description: (Optional) The Hop response limit from the IMDS service back to the requester. Set to 2 or greater for EC2 instances hosting containers. Set to 0 to not change (Default). Allowed pattern: ^([1-5]?\d|6[0-4])$ Default: 0 Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:GetAutomationExecution • ec2:DescribeInstances AWSConfigRemediation-EnforceEC2InstanceIMDSv2 170 AWS Systems Manager Automation runbook reference User Guide • ec2:ModifyInstanceMetadataOptions Document Steps • aws:executeScript - Sets the HttpTokens option to required on the Amazon EC2 instance you specify in the InstanceId parameter. • aws:assertAwsResourceProperty - Verifies IMDSv2 is required on the Amazon EC2 instance. AWSEC2-CloneInstanceAndUpgradeSQLServer Description Create an AMI from an EC2 instance for Windows Server running SQL Server 2008 or later, and then upgrade the AMI to a later version of SQL Server. Only English versions of SQL Server are supported. The following upgrade paths are supported: • SQL Server 2008 to SQL Server 2017, 2016, or 2014 • SQL Server 2008 R2 to SQL Server 2017, 2016, or 2014 • SQL Server 2012 to SQL Server 2019, 2017, 2016, or 2014 • SQL Server 2014 to SQL Server 2019, 2017, or 2016 • SQL Server 2016 to SQL Server 2019 or 2017 If you are using an earlier version of Windows Server that is incompatible with SQL Server 2019, the automation document must upgrade your Windows Server version to 2016. The upgrade is a multi-step process that can take 2 hours to complete. The automation creates the AMI from the instance, and then launches a temporary instance from the new AMI in the specified SubnetID. The security groups associated with your original instance are applied to the temporary instance. The automation then performs an in-place upgrade to the TargetSQLVersion on the temporary instance. After the upgrade, the automation creates a new AMI from the temporary instance and then terminates the temporary instance. You can test application functionality by launching the new AMI in your VPC. After you finish testing, and before you perform another upgrade, schedule application downtime before completely switching over to the upgraded instance. AWSEC2-CloneInstanceAndUpgradeSQLServer 171 AWS Systems Manager Automation runbook reference User Guide Note If you want to modify the computer name of the EC2 instance launched from the new AMI , see Rename a Computer that Hosts a Stand-Alone Instance of SQL Server. Run this Automation (console) Document type Automation Owner Amazon Platforms Windows Parameters Prerequisites • TLS version 1.2. •
|
systems-manager-automation-runbook-guide-038
|
systems-manager-automation-runbook-guide.pdf
| 38 |
instance and then terminates the temporary instance. You can test application functionality by launching the new AMI in your VPC. After you finish testing, and before you perform another upgrade, schedule application downtime before completely switching over to the upgraded instance. AWSEC2-CloneInstanceAndUpgradeSQLServer 171 AWS Systems Manager Automation runbook reference User Guide Note If you want to modify the computer name of the EC2 instance launched from the new AMI , see Rename a Computer that Hosts a Stand-Alone Instance of SQL Server. Run this Automation (console) Document type Automation Owner Amazon Platforms Windows Parameters Prerequisites • TLS version 1.2. • Only English versions of SQL Server are supported. • The EC2 instance must use a version of Windows Server that is Windows Server 2008 R2 (or later) and SQL Server 2008 (or later). • Verify that SSM Agent is installed on your instance. For more information, see Installing and configuring SSM Agent on EC2 instances for Windows Server. • Configure the instance to use an AWS Identity and Access Management (IAM) instance profile role. For more information, see Create an IAM instance profile for Systems Manager. • Verify that the instance has 20 GB of free disk space in the instance boot disk. • For instances that use a Bring Your Own License (BYOL) SQL Server version, the following additional prerequisites apply: • Provide an EBS snapshot ID that includes the target SQL Server installation media. To do this: 1. Verify that the EC2 instance is running Windows Server 2008 R2 or later. AWSEC2-CloneInstanceAndUpgradeSQLServer 172 AWS Systems Manager Automation runbook reference User Guide 2. Create a 6 GB EBS volume in the same Availability Zone where the instance is running. Attach the volume to the instance. Mount it, for example, as drive D. 3. Right-click the ISO and mount it to an instance as, for example, drive E. 4. Copy the content of the ISO from drive E:\ to drive D:\ 5. Create an EBS snapshot of the 6 GB volume created in step 2. Limitations • The upgrade can be performed on only a SQL Server using Windows authentication. • Verify that no security patch updates are pending on the instances. Open Control Panel, then choose Check for updates. • SQL Server deployments in HA and mirroring mode are not supported. Parameters • IamInstanceProfile Type: String Description: (Required) The IAM instance profile. • InstanceId Type: String Description: (Required) The instance running Windows Server 2008 R2 (or later) and SQL Server 2008 (or later). • KeepPreUpgradeImageBackUp Type: String Description: (Optional) If set to true, the automation doesn't delete the AMI created from the instance before the upgrade. If set to true, then you must delete the AMI. By default, the AMI is deleted. • SubnetId Type: String AWSEC2-CloneInstanceAndUpgradeSQLServer 173 AWS Systems Manager Automation runbook reference User Guide Description: (Required) Provide a subnet for the upgrade process. Verify that the subnet has outbound connectivity to AWS services, Amazon S3, and Microsoft (to download patches). • SQLServerSnapshotId Type: String Description: (Conditional) Snapshot ID for target SQL Server installation media. This parameter is required for instances that use a BYOL SQL Server version. This parameter is optional for SQL Server license-included instances (instances launched using an AWS provided Amazon Machine Image for Windows Server with Microsoft SQL Server). • RebootInstanceBeforeTakingImage Type: String Description: (Optional) If set to true, the automation reboots the instance before creating a pre- upgrade AMI. By default, the automation doesn't reboot before upgrade. • TargetSQLVersion Type: String Description: (Optional) Select the target SQL Server version. Possible targets: • SQL Server 2019 • SQL Server 2017 • SQL Server 2016 • SQL Server 2014 Default target: SQL Server 2016 Outputs AMIId: The ID of the AMI created from the instance that was upgraded to a later version of SQL Server. AWSEC2-CloneInstanceAndUpgradeWindows Description AWSEC2-CloneInstanceAndUpgradeWindows 174 AWS Systems Manager Automation runbook reference User Guide Create an Amazon Machine Image (AMI) from a Windows Server 2008 R2, 2012 R2, 2016, or 2019 instance, and then upgrade the AMI to Windows Server 2016, 2019, or 2022. The supported upgrade paths are as follows. • Windows Server 2008 R2 to Windows Server 2016. • Windows Server 2012 R2 to Windows Server 2016. • Windows Server 2012 R2 to Windows Server 2019. • Windows Server 2012 R2 to Windows Server 2022. • Windows Server 2016 to Windows Server 2019. • Windows Server 2016 to Windows Server 2022. • Windows Server 2019 to Windows Server 2022. The upgrade operation is a multi-step process that can take 2 hours to complete. We recommend performing an operating system upgrade on instances with at least 2 vCPUs and 4GB of RAM. The automation creates an AMI from the instance and then launches a temporary instance from the newly created AMI in the SubnetId that you specify. The security groups associated
|
systems-manager-automation-runbook-guide-039
|
systems-manager-automation-runbook-guide.pdf
| 39 |
2012 R2 to Windows Server 2019. • Windows Server 2012 R2 to Windows Server 2022. • Windows Server 2016 to Windows Server 2019. • Windows Server 2016 to Windows Server 2022. • Windows Server 2019 to Windows Server 2022. The upgrade operation is a multi-step process that can take 2 hours to complete. We recommend performing an operating system upgrade on instances with at least 2 vCPUs and 4GB of RAM. The automation creates an AMI from the instance and then launches a temporary instance from the newly created AMI in the SubnetId that you specify. The security groups associated with your original instance are applied to the temporary instance. The automation then performs an in-place upgrade to the TargetWindowsVersion on the temporary instance. To upgrade your Windows Server 2008 R2 instance to Windows Server 2016, 2019, or 2022, an in-place upgrade is performed twice because directly upgrading Windows Server 2008 R2 to Windows Server 2016, 2019, or 2022 is not supported. The automation also updates or installs the AWS drivers required by the temporary instance. After the upgrade, the automation creates a new AMI from the temporary instance and then terminates the temporary instance. You can test application functionality by launching a test instance from the upgraded AMI in your Amazon Virtual Private Cloud (Amazon VPC). After you finish testing, and before you perform another upgrade, schedule application downtime before completely switching over to the upgraded AMI. Run this Automation (console) Document Type Automation Owner AWSEC2-CloneInstanceAndUpgradeWindows 175 AWS Systems Manager Automation runbook reference User Guide Amazon Platforms Windows Server 2008 R2, 2012 R2, 2016, or 2019 Standard and Datacenter editions Prerequisites • TLS version 1.2. • Verify that SSM Agent is installed on your instance. For more information, see Installing and configuring SSM Agent on EC2 instances for Windows Server. • Windows PowerShell 3.0 or later must be installed on your instance. • For instances that are joined to a Microsoft Active Directory domain, we recommend specifying a SubnetId that does not have connectivity to your domain controllers to help avoid hostname conflicts. • The instance subnet must have outbound connectivity to the internet, which provides access to AWS services such as Amazon S3 and access to download patches from Microsoft. This requirement is met if either the subnet is a public subnet and the instance has a public IP address, or if the subnet is a private subnet with a route that sends internet traffic to a public NAT device. • This Automation works only with Windows Server 2008 R2, 2012 R2, 2016, and 2019 instances. • Configure the Windows Server instance with an AWS Identity and Access Management (IAM) instance profile that provides the requisite permissions for Systems Manager. For more information, see Create an IAM instance profile for Systems Manager. • Verify that the instance has 20 GB of free disk space in the boot disk. • If the instance does not use an AWS-provided Windows license, then specify an Amazon EBS snapshot ID that includes Windows Server 2012 R2 installation media. To do this: • Verify that the EC2 instance is running Windows Server 2012 or later. • Create a 6 GB EBS volume in the same Availability Zone where the instance is running. Attach the volume to the instance. Mount it, for example, as drive D. • Right-click the ISO and mount it to an instance as, for example, drive E. • Copy the content of the ISO from drive E:\ to drive D:\ • Create an EBS snapshot of the 6 GB volume created in step 2 above. Limitations AWSEC2-CloneInstanceAndUpgradeWindows 176 AWS Systems Manager Automation runbook reference User Guide This Automation doesn't support upgrading Windows domain controllers, clusters, or Windows desktop operating systems. This Automation also doesn't support EC2 instances for Windows Server with the following roles installed. • Remote Desktop Session Host (RDSH) • Remote Desktop Connection Broker (RDCB) • Remote Desktop Virtualization Host (RDVH) • Remote Desktop Web Access (RDWA) Parameters • AlternativeKeyPairName Type: String Description: (Optional) The name of an alternative key pair to use during the upgrade process. This is useful in situations where the key pair assigned to the original instance is unavailable. If the original instance was not assigned a key pair, you must specify a value for this parameter. • BYOLWindowsMediaSnapshotId Type: String Description: (Optional) The ID of the Amazon EBS snapshot to copy that includes Windows Server 2012R2 installation media. Required only if you are upgrading a BYOL instance. • IamInstanceProfile Type: String Description: (Required) The name of the IAM instance profile that enables Systems Manager to manage the instance. • InstanceId Type: String Description: (Required) The EC2 instance running Windows Server 2008 R2, 2012 R2, 2016, or 2019. • KeepPreUpgradeImageBackUp AWSEC2-CloneInstanceAndUpgradeWindows 177 AWS Systems Manager Automation runbook reference User Guide Type: String Description: (Optional)
|
systems-manager-automation-runbook-guide-040
|
systems-manager-automation-runbook-guide.pdf
| 40 |
not assigned a key pair, you must specify a value for this parameter. • BYOLWindowsMediaSnapshotId Type: String Description: (Optional) The ID of the Amazon EBS snapshot to copy that includes Windows Server 2012R2 installation media. Required only if you are upgrading a BYOL instance. • IamInstanceProfile Type: String Description: (Required) The name of the IAM instance profile that enables Systems Manager to manage the instance. • InstanceId Type: String Description: (Required) The EC2 instance running Windows Server 2008 R2, 2012 R2, 2016, or 2019. • KeepPreUpgradeImageBackUp AWSEC2-CloneInstanceAndUpgradeWindows 177 AWS Systems Manager Automation runbook reference User Guide Type: String Description: (Optional) If set True, the Automation doesn't delete the AMI created from the EC2 instance before the upgrade. If set to True, then you must delete the AMI. By default, the AMI is deleted. • SubnetId Type: String Description: (Required) This is the subnet for the upgrade process and where your source EC2 instance resides. Verify that the subnet has outbound connectivity to AWS services, Amazon S3, and Microsoft (to download patches). • TargetWindowsVersion Type: String Description: (Required) Select the target Windows version. Default: 2022 • RebootInstanceBeforeTakingImage Type: String Description: (Optional) If set True, the Automation reboots the instance before creating a pre- upgrade AMI. By default, the Automation doesn't reboot before upgrade. AWSEC2-ConfigureSTIG Security Technical Implementation Guides (STIGs) are the configuration hardening standards created by the Defense Information Systems Agency (DISA) to secure information systems and software. To make your systems compliant with STIG standards, you must install, configure, and test a variety of security settings. Amazon EC2 provides a Systems Manager command document, AWSEC2-ConfigureSTIG, which you can use to apply STIG settings to an instance. This document helps you to quickly build compliant images for STIG standards. The STIG Systems Manager document scans for misconfigurations and runs a remediation script. It also installs InstallRoot from the Department of Defense (DoD) on Windows AMIs to install and update the DoD certificates and to remove unnecessary certificates AWSEC2-ConfigureSTIG 178 AWS Systems Manager Automation runbook reference User Guide to maintain STIG compliance. There are no additional charges for using the STIG Systems Manager document. Note AWSEC2-ConfigureSTIG is a command document. To search for AWSEC2-ConfigureSTIG in the AWS Systems Manager console, select the category Command documents. This page lists all STIGs that Amazon EC2 supports that the STIG hardening components apply to your EC2 instance. You can choose which STIG compliance category to apply. Compliance levels • High (Category I) The most severe risk. Includes any vulnerability that can result in loss of confidentiality, availability, or integrity. • Medium (Category II) Includes any vulnerability that can result in loss of confidentiality, availability, or integrity but the risk can be mitigated. • Low (Category III) Includes any vulnerability that degrades measures to protect against loss of confidentiality, availability, or integrity. Topics • STIG hardening component downloads • Windows STIG settings • Windows STIG version history • Linux STIG settings • Linux STIG version history AWSEC2-ConfigureSTIG 179 AWS Systems Manager Automation runbook reference User Guide STIG hardening component downloads Amazon groups STIG hardening components together into operating system related bundles for each release. Bundles are archive files that are appropriate for the target operating system where they download and run. Linux component bundles are stored as TAR files (.tgz file extension). Windows component bundles are stored as ZIP files (.zip file extension). Amazon stores the component bundles in the Image Builder S3 STIG bucket in each AWS Region. Use SSL/TLS to communicate with AWS resources. We require TLS 1.2 and recommend TLS 1.3. Important With few exceptions, the STIG hardening components that the Systems Manager document downloads do not install third-party packages. If third-party packages are already installed on the instance, and if there are related STIGs that Amazon EC2 supports for that package, those STIGs are applied. Patterns and examples for component storage paths and bundle file names are as follows: Component storage path s3://aws-windows-downloads-<region>/STIG/<bundle file name> Component path variables region AWS Region (Each Region has its own components bucket.) bundle file name The format is <os bundle name>_<YYYY>_Q<quarter>[_<release>].<file extension>. Note that the name has underscores between the nodes, not periods. os bundle name The standard name prefix for the operating system bundle is either LinuxAWSConfigureSTIG or AWSConfigureSTIG. To maintain backwards compatibility, the download for Windows doesn't include a platform prefix. YYYY The four digit year of the release. AWSEC2-ConfigureSTIG 180 AWS Systems Manager Automation runbook reference User Guide quarter Identifies the quarter of the year: 1, 2, 3, or 4. release Incremental number that starts at one, and increments by one for each new release. The release is not included for the first release in a quarter and is only added for subsequent releases. file extension Compressed file format tgz (Linux) or zip (Windows). Example bundle file names • LinuxAWSConfigureSTIG_2023_Q1_2.tgz • AWSConfigureSTIG_2022_Q4.zip Windows
|
systems-manager-automation-runbook-guide-041
|
systems-manager-automation-runbook-guide.pdf
| 41 |
either LinuxAWSConfigureSTIG or AWSConfigureSTIG. To maintain backwards compatibility, the download for Windows doesn't include a platform prefix. YYYY The four digit year of the release. AWSEC2-ConfigureSTIG 180 AWS Systems Manager Automation runbook reference User Guide quarter Identifies the quarter of the year: 1, 2, 3, or 4. release Incremental number that starts at one, and increments by one for each new release. The release is not included for the first release in a quarter and is only added for subsequent releases. file extension Compressed file format tgz (Linux) or zip (Windows). Example bundle file names • LinuxAWSConfigureSTIG_2023_Q1_2.tgz • AWSConfigureSTIG_2022_Q4.zip Windows STIG settings Amazon EC2 Windows STIG AMIs and hardening components are designed for standalone servers and apply Local Group Policy. STIG-compliant components install InstallRoot from the Department of Defense (DoD) on Windows AMIs to download, install and update the DoD certificates. They also remove unnecessary certificates to maintain STIG compliance. Currently, Amazon EC2 supports STIG baselines for the following versions of Windows Server: 2012 R2, 2016, 2019, and 2022. This section lists current STIG settings that Amazon EC2 supports for your Windows infrastructure, followed by a version history log. You can apply low, medium, or high STIG settings. Windows STIG Low (Category III) The following list contains STIG settings that Amazon EC2 supports to your infrastructure. If a supported setting isn't applicable for your infrastructure, Amazon EC2 skips that setting, and moves on. For example, some STIG hardening settings might not apply to standalone servers. Organization-specific policies can also affect which settings apply, such as a requirement for administrators to review document settings. For a complete list of Windows STIGs, see the STIGs Document Library. For information about how to view the complete list, see STIG Viewing Tools. AWSEC2-ConfigureSTIG 181 AWS Systems Manager Automation runbook reference User Guide • Windows Server 2022 STIG Version 2 Release 2 V-254335, V-254336, V-254337, V-254338, V-254351, V-254357, V-254363, and V-254481 • Windows Server 2019 STIG Version 3 Release 2 V-205691, V-205819, V-205858, V-205859, V-205860, V-205870, V-205871, and V-205923 • Windows Server 2016 STIG Version 2 Release 9 V-224916, V-224917, V-224918, V-224919, V-224931, V-224942, and V-225060 • Windows Server 2012 R2 MS STIG Version 3 Release 5 V-225537, V-225536, V-225526, V-225525, V-225514, V-225511, V-225490, V-225489, V-225488, V-225487, V-225485, V-225484, V-225483, V-225482, V-225481, V-225480, V-225479, V-225476, V-225473, V-225468, V-225462, V-225460, V-225459, V-225412, V-225394, V-225392, V-225376, V-225363, V-225362, V-225360, V-225359, V-225358, V-225357, V-225355, V-225343, V-225342, V-225336, V-225335, V-225334, V-225333, V-225332, V-225331, V-225330, V-225328, V-225327, V-225324, V-225319, V-225318, and V-225250 • Microsoft .NET Framework 4.0 STIG Version 2 Release 2 No STIG settings apply to the Microsoft .NET Framework for Category III vulnerabilities. • Windows Firewall STIG Version 2 Release 2 V-241994, V-241995, V-241996, V-241999, V-242000, V-242001, V-242006, V-242007, and V-242008 • Internet Explorer 11 STIG Version 2 Release 5 V-46477, V-46629, and V-97527 • Microsoft Edge STIG Version 2 Release 2 (Windows Server 2022 only) V-235727, V-235731, V-235751, V-235752, and V-235765 Windows STIG Medium (Category II) The following list contains STIG settings that Amazon EC2 supports to your infrastructure. If a supported setting isn't applicable for your infrastructure, Amazon EC2 skips that setting, and moves on. For example, some STIG hardening settings might not apply to standalone servers. AWSEC2-ConfigureSTIG 182 AWS Systems Manager Automation runbook reference User Guide Organization-specific policies can also affect which settings apply, such as a requirement for administrators to review document settings. For a complete list of Windows STIGs, see the STIGs Document Library. For information about how to view the complete list, see STIG Viewing Tools. Note The Windows STIG Medium category includes all of the listed STIG hardening settings that apply to Windows STIG low (Category III), in addition to the STIG hardening settings that Amazon EC2 supports for Category II vulnerabilities. • Windows Server 2022 STIG Version 2 Release 2 Includes all STIG hardening settings that Amazon EC2 supports for Category III (Low) vulnerabilities, plus: V-254247, V-254265, V-254269, V-254270, V-254271, V-254272, V-254273, V-254274, V-254276, V-254277, V-254278, V-254285, V-254286, V-254287, V-254288, V-254289, V-254290, V-254291, V-254292, V-254300, V-254301, V-254302, V-254303, V-254304, V-254305, V-254306, V-254307, V-254308, V-254309, V-254310, V-254311, V-254312, V-254313, V-254314, V-254315, V-254316, V-254317, V-254318, V-254319, V-254320, V-254321, V-254322, V-254323, V-254324, V-254325, V-254326, V-254327, V-254328, V-254329, V-254330, V-254331, V-254332, V-254333, V-254334, V-254339, V-254341, V-254342, V-254344, V-254345, V-254346, V-254347, V-254348, V-254349, V-254350, V-254355, V-254356, V-254356, V-254358, V-254359, V-254360, V-254361, V-254362, V-254364, V-254365, V-254366, V-254367, V-254368, V-254369, V-254370, V-254371, V-254372, V-254373, V-254375, V-254376, V-254377, V-254379, V-254380, V-254382, V-254383, V-254384, V-254431, V-254432, V-254433, V-254434, V-254435, V-254436, V-254438, V-254439, V-254442, V-254443, V-254444, V-254445, V-254449, V-254450, V-254451, V-254452, V-254453, V-254454, V-254455, V-254456, V-254459, V-254460, V-254461, V-254462, V-254463, V-254464, V-254468, V-254470, V-254471, V-254472, V-254473, V-254476, V-254477, V-254478, V-254479, V-254480, V-254482, V-254483, V-254484, V-254485, V-254486, V-254487, V-254488, V-254489, V-254490, V-254493, V-254494, V-254495, V-254497, V-254499, V-254501, V-254502, V-254503, V-254504, V-254505, V-254507, V-254508, V-254509, V-254510, V-254511, and V-254512 • Windows Server
|
systems-manager-automation-runbook-guide-042
|
systems-manager-automation-runbook-guide.pdf
| 42 |
V-254341, V-254342, V-254344, V-254345, V-254346, V-254347, V-254348, V-254349, V-254350, V-254355, V-254356, V-254356, V-254358, V-254359, V-254360, V-254361, V-254362, V-254364, V-254365, V-254366, V-254367, V-254368, V-254369, V-254370, V-254371, V-254372, V-254373, V-254375, V-254376, V-254377, V-254379, V-254380, V-254382, V-254383, V-254384, V-254431, V-254432, V-254433, V-254434, V-254435, V-254436, V-254438, V-254439, V-254442, V-254443, V-254444, V-254445, V-254449, V-254450, V-254451, V-254452, V-254453, V-254454, V-254455, V-254456, V-254459, V-254460, V-254461, V-254462, V-254463, V-254464, V-254468, V-254470, V-254471, V-254472, V-254473, V-254476, V-254477, V-254478, V-254479, V-254480, V-254482, V-254483, V-254484, V-254485, V-254486, V-254487, V-254488, V-254489, V-254490, V-254493, V-254494, V-254495, V-254497, V-254499, V-254501, V-254502, V-254503, V-254504, V-254505, V-254507, V-254508, V-254509, V-254510, V-254511, and V-254512 • Windows Server 2019 STIG Version 3 Release 2 AWSEC2-ConfigureSTIG 183 AWS Systems Manager Automation runbook reference User Guide Includes all STIG hardening settings that Amazon EC2 supports for Category III (Low) vulnerabilities, plus: V-205625, V-205626, V-205627, V-205629, V-205630, V-205633, V-205634, V-205635, V-205636, V-205637, V-205638, V-205639, V-205643, V-205644, V-205648, V-205649, V-205650, V-205651, V-205652, V-205655, V-205656, V-205659, V-205660, V-205662, V-205671, V-205672, V-205673, V-205675, V-205676, V-205678, V-205679, V-205680, V-205681, V-205682, V-205683, V-205684, V-205685, V-205686, V-205687, V-205688, V-205689, V-205690, V-205692, V-205693, V-205694, V-205697, V-205698, V-205708, V-205709, V-205712, V-205714, V-205716, V-205717, V-205718, V-205719, V-205720, V-205722, V-205729, V-205730, V-205733, V-205747, V-205751, V-205752, V-205754, V-205756, V-205758, V-205759, V-205760, V-205761, V-205762, V-205764, V-205765, V-205766, V-205767, V-205768, V-205769, V-205770, V-205771, V-205772, V-205773, V-205774, V-205775, V-205776, V-205777, V-205778, V-205779, V-205780, V-205781, V-205782, V-205783, V-205784, V-205795, V-205796, V-205797, V-205798, V-205801, V-205808, V-205809, V-205810, V-205811, V-205812, V-205813, V-205814, V-205815, V-205816, V-205817, V-205821, V-205822, V-205823, V-205824, V-205825, V-205826, V-205827, V-205828, V-205830, V-205832, V-205833, V-205834, V-205835, V-205836, V-205837, V-205838, V-205839, V-205840, V-205841, V-205842, V-205861, V-205863, V-205865, V-205866, V-205867, V-205868, V-205869, V-205872, V-205873, V-205874, V-205911, V-205912, V-205915, V-205916, V-205917, V-205918, V-205920, V-205921, V-205922, V-205924, V-205925, V-236001, and V-257503 • Windows Server 2016 STIG Version 2 Release 9 Includes all STIG hardening settings that Amazon EC2 supports for Category III (Low) vulnerabilities, plus: V-224850, V-224852, V-224853, V-224854, V-224855, V-224856, V-224857, V-224858, V-224859, V-224866, V-224867, V-224868, V-224869, V-224870, V-224871, V-224872, V-224873, V-224881, V-224882, V-224883, V-224884, V-224885, V-224886, V-224887, V-224888, V-224889, V-224890, V-224891, V-224892, V-224893, V-224894, V-224895, V-224896, V-224897, V-224898, V-224899, V-224900, V-224901, V-224902, V-224903, V-224904, V-224905, V-224906, V-224907, V-224908, V-224909, V-224910, V-224911, V-224912, V-224913, V-224914, V-224915, V-224920, V-224922, V-224924, V-224925, V-224926, V-224927, V-224928, V-224929, V-224930, V-224935, V-224936, V-224937, V-224938, V-224939, V-224940, V-224941, V-224943, V-224944, V-224945, V-224946, V-224947, V-224948, V-224949, V-224951, V-224952, V-224953, V-224955, V-224956, AWSEC2-ConfigureSTIG 184 AWS Systems Manager Automation runbook reference User Guide V-224957, V-224959, V-224960, V-224962, V-224963, V-225010, V-225013, V-225014, V-225015, V-225016, V-225017, V-225018, V-225019, V-225021, V-225022, V-225023, V-225024, V-225028, V-225029, V-225030, V-225031, V-225032, V-225033, V-225034, V-225035, V-225038, V-225039, V-225040, V-225041, V-225042, V-225043, V-225047, V-225049, V-225050, V-225051, V-225052, V-225055, V-225056, V-225057, V-225058, V-225059, V-225061, V-225062, V-225063, V-225064, V-225065, V-225066, V-225067, V-225068, V-225069, V-225072, V-225073, V-225074, V-225076, V-225078, V-225080, V-225081, V-225082, V-225083, V-225084, V-225086, V-225087, V-225088, V-225089, V-225092, V-225093, V-236000, and V-257502 • Windows Server 2012 R2 MS STIG Version 3 Release 5 Includes all STIG hardening settings that Amazon EC2 supports for Category III (Low) vulnerabilities, plus: V-225574, V-225573, V-225572, V-225571, V-225570, V-225569, V-225568, V-225567, V-225566, V-225565, V-225564, V-225563, V-225562, V-225561, V-225560, V-225559, V-225558, V-225557, V-225555, V-225554, V-225553, V-225551, V-225550, V-225549, V-225548, V-225546, V-225545, V-225544, V-225543, V-225542, V-225541, V-225540, V-225539, V-225538, V-225535, V-225534, V-225533, V-225532, V-225531, V-225530, V-225529, V-225528, V-225527, V-225524, V-225523, V-225522, V-225521, V-225520, V-225519, V-225518, V-225517, V-225516, V-225515, V-225513, V-225510, V-225509, V-225508, V-225506, V-225504, V-225503, V-225502, V-225501, V-225500, V-225494, V-225486, V-225478, V-225477, V-225475, V-225474, V-225472, V-225471, V-225470, V-225469, V-225464, V-225463, V-225461, V-225458, V-225457, V-225456, V-225455, V-225454, V-225453, V-225452, V-225448, V-225443, V-225442, V-225441, V-225415, V-225414, V-225413, V-225411, V-225410, V-225409, V-225408, V-225407, V-225406, V-225405, V-225404, V-225402, V-225401, V-225400, V-225398, V-225397, V-225395, V-225393, V-225391, V-225389, V-225386, V-225385, V-225384, V-225383, V-225382, V-225381, V-225380, V-225379, V-225378, V-225377, V-225375, V-225374, V-225373, V-225372, V-225371, V-225370, V-225369, V-225368, V-225367, V-225356, V-225353, V-225352, V-225351, V-225350, V-225349, V-225348, V-225347, V-225346, V-225345, V-225344, V-225341, V-225340, V-225339, V-225338, V-225337, V-225329, V-225326, V-225325, V-225317, V-225316, V-225315, V-225314, V-225305, V-225304, V-225303, V-225302, V-225301, V-225300, V-225299, V-225298, V-225297, V-225296, V-225295, V-225294, V-225293, V-225292, V-225291, V-225290, V-225289, V-225288, V-225287, V-225286, V-225285, V-225284, V-225283, V-225282, V-225281, V-225280, V-225279, V-225278, V-225277, V-225276, V-225275, V-225273, V-225272, V-225271, V-225270, AWSEC2-ConfigureSTIG 185 AWS Systems Manager Automation runbook reference User Guide V-225269, V-225268, V-225267, V-225266, V-225265, V-225264, V-225263, V-225261, V-225260, V-225259, and V-225239 • Microsoft .NET Framework STIG 4.0 Version 2 Release 2 Includes all STIG hardening settings that Amazon EC2 supports for Category III (Low) vulnerabilities, plus: V-225238 • Windows Firewall STIG Version 2 Release 2 Includes all STIG hardening settings that Amazon EC2 supports for Category III (Low) vulnerabilities, plus: V-241989, V-241990, V-241991, V-241993, V-241993, V-241998, V-241998, V-242003, and V-242003 • Internet Explorer 11 STIG Version 2 Release 5 Includes all STIG hardening settings that Amazon EC2 supports for Category III (Low) vulnerabilities, plus: V-46473, V-46475, V-46481, V-46483, V-46501, V-46507, V-46509, V-46511, V-46513, V-46515, V-46517, V-46521, V-46523, V-46525, V-46543, V-46545, V-46547, V-46549, V-46553, V-46555, V-46573,
|
systems-manager-automation-runbook-guide-043
|
systems-manager-automation-runbook-guide.pdf
| 43 |
STIG 4.0 Version 2 Release 2 Includes all STIG hardening settings that Amazon EC2 supports for Category III (Low) vulnerabilities, plus: V-225238 • Windows Firewall STIG Version 2 Release 2 Includes all STIG hardening settings that Amazon EC2 supports for Category III (Low) vulnerabilities, plus: V-241989, V-241990, V-241991, V-241993, V-241993, V-241998, V-241998, V-242003, and V-242003 • Internet Explorer 11 STIG Version 2 Release 5 Includes all STIG hardening settings that Amazon EC2 supports for Category III (Low) vulnerabilities, plus: V-46473, V-46475, V-46481, V-46483, V-46501, V-46507, V-46509, V-46511, V-46513, V-46515, V-46517, V-46521, V-46523, V-46525, V-46543, V-46545, V-46547, V-46549, V-46553, V-46555, V-46573, V-46575, V-46577, V-46579, V-46581, V-46583, V-46587, V-46589, V-46591, V-46593, V-46597, V-46599, V-46601, V-46603, V-46605, V-46607, V-46609, V-46615, V-46617, V-46619, V-46621, V-46625, V-46633, V-46635, V-46637, V-46639, V-46641, V-46643, V-46645, V-46647, V-46649, V-46653, V-46663, V-46665, V-46669, V-46681, V-46685, V-46689, V-46691, V-46693, V-46695, V-46701, V-46705, V-46709, V-46711, V-46713, V-46715, V-46717, V-46719, V-46721, V-46723, V-46725, V-46727, V-46729, V-46731, V-46733, V-46779, V-46781, V-46787, V-46789, V-46791, V-46797, V-46799, V-46801, V-46807, V-46811, V-46815, V-46819, V-46829, V-46841, V-46847, V-46849, V-46853, V-46857, V-46859, V-46861, V-46865, V-46869, V-46879, V-46883, V-46885, V-46889, V-46893, V-46895, V-46897, V-46903, V-46907, V-46921, V-46927, V-46939, V-46975, V-46981, V-46987, V-46995, V-46997, V-46999, V-47003, V-47005, V-47009, V-64711, V-64713, V-64715, V-64717, V-64719, V-64721, V-64723, V-64725, V-64729, V-72757, V-72759, V-72761, V-72763, V-75169, and V-75171 • Microsoft Edge STIG Version 2 Release 2 (Windows Server 2022 only) AWSEC2-ConfigureSTIG 186 AWS Systems Manager Automation runbook reference User Guide V-235720, V-235721, V-235723, V-235724, V-235725, V-235726, V-235728, V-235729, V-235730, V-235732, V-235733, V-235734, V-235735, V-235736, V-235737, V-235738, V-235739, V-235740, V-235741, V-235742, V-235743, V-235744, V-235745, V-235746, V-235747, V-235748, V-235749, V-235750, V-235754, V-235756, V-235760, V-235761, V-235763, V-235764, V-235766, V-235767, V-235768, V-235769, V-235770, V-235771, V-235772, V-235773, V-235774, and V-246736 • Defender STIG Version 2 Release 4 V-213427, V-213429, V-213430, V-213431, V-213432, V-213433, V-213434, V-213435, V-213436, V-213437, V-213438, V-213439, V-213440, V-213441, V-213442, V-213443, V-213444, V-213445, V-213446, V-213447, V-213448, V-213449, V-213450, V-213451, V-213455, V-213464, V-213465, and V-213466 Windows STIG High (Category I) The following list contains STIG settings that Amazon EC2 supports to your infrastructure. If a supported setting isn't applicable for your infrastructure, Amazon EC2 skips that setting, and moves on. For example, some STIG hardening settings might not apply to standalone servers. Organization-specific policies can also affect which settings apply, such as a requirement for administrators to review document settings. For a complete list of Windows STIGs, see the STIGs Document Library. For information about how to view the complete list, see STIG Viewing Tools. Note The Windows STIG High category includes all of the listed STIG hardening settings that apply for Windows STIG Medium and Low categories, in addition to the STIG hardening settings that Amazon EC2 supports for Category I vulnerabilities. • Windows Server 2022 STIG Version 2 Release 2 V-254293, V-254352, V-254353, V-254354, V-254374, V-254378, V-254381, V-254446, V-254465, V-254466, V-254467, V-254469, V-254474, V-254475, and V-254500 • Windows Server 2019 STIG Version 3 Release 2 AWSEC2-ConfigureSTIG 187 AWS Systems Manager Automation runbook reference User Guide Includes all STIG hardening settings that Amazon EC2 supports for Categories II and III (Medium and Low) vulnerabilities, plus: V-205653, V-205654, V-205711, V-205713, V-205724, V-205725, V-205757, V-205802, V-205804, V-205805, V-205806, V-205849, V-205908, V-205913, V-205914, and V-205919 • Windows Server 2016 STIG Version 2 Release 9 Includes all STIG hardening settings that Amazon EC2 supports for Categories II and III (Medium and Low) vulnerabilities, plus: V-224874, V-224932, V-224933, V-224934, V-224954, V-224958, V-224961, V-225025, V-225044, V-225045, V-225046, V-225048, V-225053, V-225054, and V-225079 • Windows Server 2012 R2 MS STIG Version 3 Release 5 Includes all STIG hardening settings that Amazon EC2 supports for Categories II and III (Medium and Low) vulnerabilities, plus: V-225556, V-225552, V-225547, V-225507, V-225505, V-225498, V-225497, V-225496, V-225493, V-225492, V-225491, V-225449, V-225444, V-225399, V-225396, V-225390, V-225366, V-225365, V-225364, V-225354, and V-225274 • Microsoft .NET Framework STIG 4.0 Version 2 Release 2 Includes all STIG hardening settings that Amazon EC2 supports for Categories II and III (Medium and Low) vulnerabilities for the Microsoft .NET Framework. No additional STIG settings apply for Category I vulnerabilities. • Windows Firewall STIG Version 2 Release 2 Includes all STIG hardening settings that Amazon EC2 supports for Categories II and III (Medium and Low) vulnerabilities, plus: V-241992, V-241997, and V-242002 • Internet Explorer 11 STIG Version 2 Release 5 Includes all STIG hardening settings that Amazon EC2 supports for Categories II and III (Medium and Low) vulnerabilities for Internet Explorer 11. No additional STIG settings apply for Category I vulnerabilities. • Microsoft Edge STIG Version 2 Release 2 (Windows Server 2022 only) AWSEC2-ConfigureSTIG 188 AWS Systems Manager Automation runbook reference User Guide Includes all STIG hardening settings that Amazon EC2 supports for Categories II and III (Medium and Low) vulnerabilities, plus: V-235758 and V-235759 • Defender STIG Version 2 Release 4 Includes all STIG hardening settings that Amazon EC2 supports for Categories II and III (Medium
|
systems-manager-automation-runbook-guide-044
|
systems-manager-automation-runbook-guide.pdf
| 44 |
2 Release 5 Includes all STIG hardening settings that Amazon EC2 supports for Categories II and III (Medium and Low) vulnerabilities for Internet Explorer 11. No additional STIG settings apply for Category I vulnerabilities. • Microsoft Edge STIG Version 2 Release 2 (Windows Server 2022 only) AWSEC2-ConfigureSTIG 188 AWS Systems Manager Automation runbook reference User Guide Includes all STIG hardening settings that Amazon EC2 supports for Categories II and III (Medium and Low) vulnerabilities, plus: V-235758 and V-235759 • Defender STIG Version 2 Release 4 Includes all STIG hardening settings that Amazon EC2 supports for Categories II and III (Medium and Low) vulnerabilities, plus: V-213426, V-213426, V-213452, V-213452, V-213452, V-213453, V-213453, and V-213453 Windows STIG version history This section logs Windows component version history for the quarterly STIG updates. To see the changes and published versions for a quarter, choose the title to expand the information. 2024 Q4 changes - 12/10/2024: Updated STIG versions and applied STIGS for the 2024 Q4 release as follows: STIG-Build-Windows-Low version 2024.4.0 • Windows Server 2022 STIG Version 2 Release 2 • Windows Server 2019 STIG Version 3 Release 2 • Windows Server 2016 STIG Version 2 Release 9 • Windows Server 2012 R2 MS STIG Version 3 Release 5 • Microsoft .NET Framework 4.0 STIG Version 2 Release 2 • Windows Firewall STIG Version 2 Release 2 • Internet Explorer 11 STIG Version 2 Release 5 • Microsoft Edge STIG Version 2 Release 2 (Windows Server 2022 only) STIG-Build-Windows-Medium version 2024.4.0 • Windows Server 2022 STIG Version 2 Release 2 • Windows Server 2019 STIG Version 3 Release 2 • Windows Server 2016 STIG Version 2 Release 9 AWSEC2-ConfigureSTIG 189 AWS Systems Manager Automation runbook reference User Guide • Windows Server 2012 R2 MS STIG Version 3 Release 5 • Microsoft .NET Framework 4.0 STIG Version 2 Release 2 • Windows Firewall STIG Version 2 Release 2 • Internet Explorer 11 STIG Version 2 Release 5 • Microsoft Edge STIG Version 2 Release 2 (Windows Server 2022 only) • Defender STIG Version 2 Release 4 STIG-Build-Windows-High version 2024.4.0 • Windows Server 2022 STIG Version 2 Release 2 • Windows Server 2019 STIG Version 3 Release 2 • Windows Server 2016 STIG Version 2 Release 9 • Windows Server 2012 R2 MS STIG Version 3 Release 5 • Microsoft .NET Framework 4.0 STIG Version 2 Release 2 • Windows Firewall STIG Version 2 Release 2 • Internet Explorer 11 STIG Version 2 Release 5 • Microsoft Edge STIG Version 2 Release 2 (Windows Server 2022 only) • Defender STIG Version 2 Release 4 2024 Q3 changes - 10/04/2024 (no changes): There were no changes for Windows component STIGS for the 2024 third quarter release. 2024 Q2 changes - 05/10/2024 (no changes): There were no changes for Windows component STIGS for the 2024 second quarter release. 2024 Q1 changes - 02/23/2024 (no changes): There were no changes for Windows component STIGS for the 2024 first quarter release. 2023 Q4 changes - 12/07/2023 (no changes): There were no changes for Windows component STIGS for the 2023 fourth quarter release. AWSEC2-ConfigureSTIG 190 AWS Systems Manager Automation runbook reference User Guide 2023 Q3 changes - 10/04/2023 (no changes): There were no changes for Windows component STIGS for the 2023 third quarter release. 2023 Q2 changes - 05/03/2023 (no changes): There were no changes for Windows component STIGS for the 2023 second quarter release. 2023 Q1 changes - 03/27/2023 (no changes): There were no changes for Windows component STIGS for the 2023 first quarter release. 2022 Q4 changes - 02/01/2023: Updated STIG versions and applied STIGS for the 2022 Q4 release as follows: STIG-Build-Windows-Low version 2022.4.0 • Windows Server 2022 STIG Version 1 Release 1 • Windows Server 2019 STIG Version 2 Release 5 • Windows Server 2016 STIG Version 2 Release 5 • Windows Server 2012 R2 MS STIG Version 3 Release 5 • Microsoft .NET Framework 4.0 STIG Version 2 Release 2 • Windows Firewall STIG Version 2 Release 1 • Internet Explorer 11 STIG Version 2 Release 3 • Microsoft Edge STIG Version 1 Release 6 (Windows Server 2022 only) STIG-Build-Windows-Medium version 2022.4.0 • Windows Server 2022 STIG Version 1 Release 1 • Windows Server 2019 STIG Version 2 Release 5 • Windows Server 2016 STIG Version 2 Release 5 • Windows Server 2012 R2 MS STIG Version 3 Release 5 • Microsoft .NET Framework 4.0 STIG Version 2 Release 2 • Windows Firewall STIG Version 2 Release 1 • Internet Explorer 11 STIG Version 2 Release 3 • Microsoft Edge STIG Version 1 Release 6 (Windows Server 2022 only) AWSEC2-ConfigureSTIG 191 AWS Systems Manager Automation runbook reference User Guide • Defender STIG Version 2 Release 4 (Windows Server 2022 only) STIG-Build-Windows-High version 2022.4.0 • Windows Server 2022 STIG Version 1 Release 1 • Windows Server 2019
|
systems-manager-automation-runbook-guide-045
|
systems-manager-automation-runbook-guide.pdf
| 45 |
Version 2 Release 5 • Windows Server 2016 STIG Version 2 Release 5 • Windows Server 2012 R2 MS STIG Version 3 Release 5 • Microsoft .NET Framework 4.0 STIG Version 2 Release 2 • Windows Firewall STIG Version 2 Release 1 • Internet Explorer 11 STIG Version 2 Release 3 • Microsoft Edge STIG Version 1 Release 6 (Windows Server 2022 only) AWSEC2-ConfigureSTIG 191 AWS Systems Manager Automation runbook reference User Guide • Defender STIG Version 2 Release 4 (Windows Server 2022 only) STIG-Build-Windows-High version 2022.4.0 • Windows Server 2022 STIG Version 1 Release 1 • Windows Server 2019 STIG Version 2 Release 5 • Windows Server 2016 STIG Version 2 Release 5 • Windows Server 2012 R2 MS STIG Version 3 Release 5 • Microsoft .NET Framework 4.0 STIG Version 2 Release 2 • Windows Firewall STIG Version 2 Release 1 • Internet Explorer 11 STIG Version 2 Release 3 • Microsoft Edge STIG Version 1 Release 6 (Windows Server 2022 only) • Defender STIG Version 2 Release 4 (Windows Server 2022 only) 2022 Q3 changes - 09/30/2022 (no changes): There were no changes for Windows component STIGS for the 2022 third quarter release. 2022 Q2 changes - 08/02/2022: Updated STIG versions and applied STIGS for the 2022 Q2 release. STIG-Build-Windows-Low version 1.5.0 • Windows Server 2019 STIG Version 2 Release 4 • Windows Server 2016 STIG Version 2 Release 4 • Windows Server 2012 R2 MS STIG Version 3 Release 3 • Microsoft .NET Framework 4.0 STIG Version 2 Release 1 • Windows Firewall STIG Version 2 Release 1 • Internet Explorer 11 STIG Version 1 Release 19 STIG-Build-Windows-Medium version 1.5.0 • Windows Server 2019 STIG Version 2 Release 4 • Windows Server 2016 STIG Version 2 Release 4 AWSEC2-ConfigureSTIG 192 AWS Systems Manager Automation runbook reference User Guide • Windows Server 2012 R2 MS STIG Version 3 Release 3 • Microsoft .NET Framework 4.0 STIG Version 2 Release 1 • Windows Firewall STIG Version 2 Release 1 • Internet Explorer 11 STIG Version 1 Release 19 STIG-Build-Windows-High version 1.5.0 • Windows Server 2019 STIG Version 2 Release 4 • Windows Server 2016 STIG Version 2 Release 4 • Windows Server 2012 R2 MS STIG Version 3 Release 3 • Microsoft .NET Framework 4.0 STIG Version 2 Release 1 • Windows Firewall STIG Version 2 Release 1 • Internet Explorer 11 STIG Version 1 Release 19 2022 Q1 changes - 08/02/2022 (no changes): There were no changes for Windows component STIGS for the 2022 first quarter release. 2021 Q4 changes - 12/20/2021: Updated STIG versions and applied STIGS for the 2021 fourth quarter release. STIG-Build-Windows-Low version 1.5.0 • Windows Server 2019 STIG Version 2 Release 3 • Windows Server 2016 STIG Version 2 Release 3 • Windows Server 2012 R2 MS STIG Version 3 Release 3 • Microsoft .NET Framework 4.0 STIG Version 2 Release 1 • Windows Firewall STIG Version 2 Release 1 • Internet Explorer 11 STIG Version 1 Release 19 STIG-Build-Windows-Medium version 1.5.0 • Windows Server 2019 STIG Version 2 Release 3 • Windows Server 2016 STIG Version 2 Release 3 AWSEC2-ConfigureSTIG 193 AWS Systems Manager Automation runbook reference User Guide • Windows Server 2012 R2 MS STIG Version 3 Release 3 • Microsoft .NET Framework 4.0 STIG Version 2 Release 1 • Windows Firewall STIG Version 2 Release 1 • Internet Explorer 11 STIG Version 1 Release 19 STIG-Build-Windows-High version 1.5.0 • Windows Server 2019 STIG Version 2 Release 3 • Windows Server 2016 STIG Version 2 Release 3 • Windows Server 2012 R2 MS STIG Version 3 Release 3 • Microsoft .NET Framework 4.0 STIG Version 2 Release 1 • Windows Firewall STIG Version 2 Release 1 • Internet Explorer 11 STIG Version 1 Release 19 2021 Q3 changes - 09/30/2021: Updated STIG versions and applied STIGS for the 2021 third quarter release. STIG-Build-Windows-Low version 1.4.0 • Windows Server 2019 STIG Version 2 Release 2 • Windows Server 2016 STIG Version 2 Release 2 • Windows Server 2012 R2 MS STIG Version 3 Release 2 • Microsoft .NET Framework 4.0 STIG Version 2 Release 1 • Windows Firewall STIG Version 1 Release 7 • Internet Explorer 11 STIG Version 1 Release 19 STIG-Build-Windows-Medium version 1.4.0 • Windows Server 2019 STIG Version 2 Release 2 • Windows Server 2016 STIG Version 2 Release 2 • Windows Server 2012 R2 MS STIG Version 3 Release 2 • Microsoft .NET Framework 4.0 STIG Version 2 Release 1 • Windows Firewall STIG Version 1 Release 7 AWSEC2-ConfigureSTIG 194 AWS Systems Manager Automation runbook reference User Guide • Internet Explorer 11 STIG Version 1 Release 19 STIG-Build-Windows-High version 1.4.0 • Windows Server 2019 STIG Version 2 Release 2 • Windows Server 2016 STIG Version 2 Release 2 • Windows Server 2012 R2 MS STIG Version 3 Release
|
systems-manager-automation-runbook-guide-046
|
systems-manager-automation-runbook-guide.pdf
| 46 |
STIG-Build-Windows-Medium version 1.4.0 • Windows Server 2019 STIG Version 2 Release 2 • Windows Server 2016 STIG Version 2 Release 2 • Windows Server 2012 R2 MS STIG Version 3 Release 2 • Microsoft .NET Framework 4.0 STIG Version 2 Release 1 • Windows Firewall STIG Version 1 Release 7 AWSEC2-ConfigureSTIG 194 AWS Systems Manager Automation runbook reference User Guide • Internet Explorer 11 STIG Version 1 Release 19 STIG-Build-Windows-High version 1.4.0 • Windows Server 2019 STIG Version 2 Release 2 • Windows Server 2016 STIG Version 2 Release 2 • Windows Server 2012 R2 MS STIG Version 3 Release 2 • Microsoft .NET Framework 4.0 STIG Version 2 Release 1 • Windows Firewall STIG Version 1 Release 7 • Internet Explorer 11 STIG Version 1 Release 19 Linux STIG settings This section contains information about the Linux STIG hardening settings that Amazon EC2 supports, followed by a version history log. If the Linux distribution doesn't have STIG hardening settings of its own, Amazon EC2 uses RHEL settings. Supported STIG hardening settings apply to Amazon EC2 Linux AMIs and components based on the Linux distribution, as follows: • Red Hat Enterprise Linux (RHEL) 7 STIG settings • RHEL 7 • CentOS 7 • Amazon Linux 2 (AL2) • RHEL 8 STIG settings • RHEL 8 • CentOS 8 • Amazon Linux 2023 (AL 2023) • RHEL 9 STIG settings • RHEL 9 • CentOS Stream 9 Linux STIG Low (Category III) The following list contains STIG settings that Amazon EC2 supports to your infrastructure. If a supported setting isn't applicable for your infrastructure, Amazon EC2 skips that setting, and AWSEC2-ConfigureSTIG 195 AWS Systems Manager Automation runbook reference User Guide moves on. For example, some STIG hardening settings might not apply to standalone servers. Organization-specific policies can also affect which settings apply, such as a requirement for administrators to review document settings. For a complete list, see the STIGs Document Library. For information about how to view the complete list, see STIG Viewing Tools. RHEL 7 STIG Version 3 Release 14 • RHEL 7/CentOS 7/AL2 V-204452, V-204576, and V-204605 RHEL 8 STIG Version 2 Release 1 • RHEL 8/CentOS 8/AL 2023 V-230241, V-230269, V-230270, V-230281, V-230285, V-230346, V-230381, V-230395, V-230468, V-230469, V-230485, V-230486, V-230491, V-230494, V-230495, V-230496, V-230497, V-230498, V-230499, and V-244527 RHEL 9 STIG Version 2 Release 2 • RHEL 9/CentOS Stream 9 V-257782, V-257795, V-257796, V-257824, V-257880, V-257946, V-257947, V-258037, V-258067, V-258069, V-258076, V-258138, and V-258173 Ubuntu 18.04 STIG Version 2 Release 15 V-219163, V-219164, V-219165, V-219172, V-219173, V-219174, V-219175, V-219178, V-219180, V-219210, V-219301, V-219327, V-219332, and V-219333 Ubuntu 20.04 STIG Version 2 Release 1 V-238202, V-238221, V-238222, V-238223, V-238224, V-238226, V-238234, V-238235, V-238237, V-238308, V-238323, V-238357, V-238362, and V-238373 Ubuntu 22.04 STIG Version 2 Release 2 AWSEC2-ConfigureSTIG 196 AWS Systems Manager Automation runbook reference User Guide V-260472, V-260476, V-260479, V-260480, V-260481, V-260520, V-260521, V-260549, V-260550, V-260551, V-260552, V-260581, and V-260596 Linux STIG Medium (Category II) The following list contains STIG settings that Amazon EC2 supports to your infrastructure. If a supported setting isn't applicable for your infrastructure, Amazon EC2 skips that setting, and moves on. For example, some STIG hardening settings might not apply to standalone servers. Organization-specific policies can also affect which settings apply, such as a requirement for administrators to review document settings. For a complete list, see the STIGs Document Library. For information about how to view the complete list, see STIG Viewing Tools. Note The Linux STIG Medium category includes all of the listed STIG hardening settings that apply for Linux STIG Low (Category III), in addition to the STIG hardening settings that Amazon EC2 supports for Category II vulnerabilities. RHEL 7 STIG Version 3 Release 15 Includes all STIG hardening settings that Amazon EC2 supports for Category III (Low) vulnerabilities, plus: • RHEL 7/CentOS 7/AL2 V-204405, V-204406, V-204407, V-204408, V-204409, V-204410, V-204411, V-204412, V-204413, V-204414, V-204415, V-204416, V-204417, V-204418, V-204422, V-204423, V-204426, V-204427, V-204431, V-204434, V-204435, V-204437, V-204449, V-204450, V-204451, V-204457, V-204466, V-204490, V-204491, V-204503, V-204507, V-204508, V-204510, V-204511, V-204512, V-204514, V-204515, V-204516, V-204517, V-204521, V-204524, V-204531, V-204536, V-204537, V-204538, V-204539, V-204540, V-204541, V-204542, V-204543, V-204544, V-204545, V-204546, V-204547, V-204548, V-204549, V-204550, V-204551, V-204552, V-204553, V-204554, V-204555, V-204556, V-204557, V-204558, V-204559, V-204560, V-204562, V-204563, V-204564, V-204565, V-204566, V-204567, V-204568, V-204572, V-204578, V-204579, V-204584, V-204585, V-204587, V-204588, V-204589, V-204590, V-204591, V-204592, V-204593, V-204595, V-204596, AWSEC2-ConfigureSTIG 197 AWS Systems Manager Automation runbook reference User Guide V-204597, V-204598, V-204599, V-204600, V-204601, V-204602, V-204609, V-204610, V-204611, V-204612, V-204613, V-204614, V-204615, V-204616, V-204617, V-204619, V-204622, V-204625, V-204630, V-204631, V-204633, V-233307, V-237634, V-237635, V-251703, V-255925, V-255927, V-255928, and V-25697 RHEL 8 STIG Version 2 Release 1 Includes all STIG hardening settings that Amazon EC2 supports for Category III (Low) vulnerabilities, plus: • RHEL 8/CentOS 8/AL 2023 V-230228, V-230231, V-230233, V-230236, V-230237, V-230238, V-230239, V-230240, V-230244, V-230245, V-230246, V-230247, V-230248,
|
systems-manager-automation-runbook-guide-047
|
systems-manager-automation-runbook-guide.pdf
| 47 |
V-204563, V-204564, V-204565, V-204566, V-204567, V-204568, V-204572, V-204578, V-204579, V-204584, V-204585, V-204587, V-204588, V-204589, V-204590, V-204591, V-204592, V-204593, V-204595, V-204596, AWSEC2-ConfigureSTIG 197 AWS Systems Manager Automation runbook reference User Guide V-204597, V-204598, V-204599, V-204600, V-204601, V-204602, V-204609, V-204610, V-204611, V-204612, V-204613, V-204614, V-204615, V-204616, V-204617, V-204619, V-204622, V-204625, V-204630, V-204631, V-204633, V-233307, V-237634, V-237635, V-251703, V-255925, V-255927, V-255928, and V-25697 RHEL 8 STIG Version 2 Release 1 Includes all STIG hardening settings that Amazon EC2 supports for Category III (Low) vulnerabilities, plus: • RHEL 8/CentOS 8/AL 2023 V-230228, V-230231, V-230233, V-230236, V-230237, V-230238, V-230239, V-230240, V-230244, V-230245, V-230246, V-230247, V-230248, V-230249, V-230250, V-230255, V-230257, V-230258, V-230259, V-230262, V-230266, V-230267, V-230268, V-230273, V-230275, V-230277, V-230278, V-230280, V-230282, V-230286, V-230287, V-230288, V-230290, V-230291, V-230296, V-230298, V-230310, V-230311, V-230312, V-230313, V-230314, V-230315, V-230324, V-230330, V-230332, V-230333, V-230335, V-230337, V-230339, V-230341, V-230343, V-230345, V-230348, V-230353, V-230356, V-230357, V-230358, V-230359, V-230360, V-230361, V-230362, V-230363, V-230365, V-230366, V-230368, V-230369, V-230370, V-230373, V-230375, V-230376, V-230377, V-230378, V-230382, V-230383, V-230386, V-230387, V-230390, V-230392, V-230393, V-230394, V-230396, V-230397, V-230398, V-230399, V-230400, V-230401, V-230402, V-230403, V-230404, V-230405, V-230406, V-230407, V-230408, V-230409, V-230410, V-230411, V-230412, V-230413, V-230418, V-230419, V-230421, V-230422, V-230423, V-230424, V-230425, V-230426, V-230427, V-230428, V-230429, V-230430, V-230431, V-230432, V-230433, V-230434, V-230435, V-230436, V-230437, V-230438, V-230439, V-230444, V-230446, V-230447, V-230448, V-230449, V-230455, V-230456, V-230462, V-230463, V-230464, V-230465, V-230466, V-230467, V-230471, V-230472, V-230473, V-230474, V-230478, V-230480, V-230483, V-230488, V-230489, V-230502, V-230503, V-230507, V-230526, V-230527, V-230532, V-230535, V-230536, V-230537, V-230538, V-230539, V-230540, V-230541, V-230542, V-230543, V-230544, V-230545, V-230546, V-230547, V-230548, V-230549, V-230550, V-230555, V-230556, V-230559, V-230560, V-230561, V-237640, V-237642, V-237643, V-244523, V-244524, V-244525, V-244526, V-244528, V-244533, V-244542, V-244550, V-244551, V-244552, V-244553, V-244554, V-250315, V-250316, V-250317, V-251711, V-251713, V-251714, V-251715, V-251716, V-251717, V-251718, V-256974, and V-257258 AWSEC2-ConfigureSTIG 198 AWS Systems Manager Automation runbook reference User Guide RHEL 9 STIG Version 2 Release 2 Includes all STIG hardening settings that Amazon EC2 supports for Category III (Low) vulnerabilities, plus: • RHEL 9/CentOS Stream 9 V-257780, V-257781, V-257783, V-257786, V-257788, V-257790, V-257791, V-257792, V-257793, V-257794, V-257797, V-257798, V-257799, V-257800, V-257801, V-257802, V-257803, V-257804, V-257805, V-257806, V-257807, V-257808, V-257809, V-257810, V-257811, V-257812, V-257813, V-257814, V-257815, V-257816, V-257817, V-257818, V-257825, V-257827, V-257828, V-257829, V-257830, V-257831, V-257832, V-257833, V-257834, V-257836, V-257838, V-257839, V-257840, V-257841, V-257842, V-257849, V-257882, V-257883, V-257884, V-257885, V-257886, V-257887, V-257888, V-257889, V-257890, V-257891, V-257892, V-257893, V-257894, V-257895, V-257896, V-257897, V-257898, V-257899, V-257900, V-257901, V-257902, V-257903, V-257904, V-257905, V-257906, V-257907, V-257908, V-257909, V-257910, V-257911, V-257912, V-257913, V-257914, V-257915, V-257916, V-257917, V-257918, V-257919, V-257920, V-257921, V-257922, V-257923, V-257924, V-257925, V-257926, V-257927, V-257928, V-257929, V-257930, V-257933, V-257934, V-257935, V-257936, V-257939, V-257940, V-257942, V-257943, V-257944, V-257948, V-257949, V-257951, V-257952, V-257953, V-257954, V-257957, V-257958, V-257959, V-257960, V-257961, V-257962, V-257963, V-257964, V-257965, V-257966, V-257967, V-257968, V-257969, V-257970, V-257971, V-257972, V-257973, V-257974, V-257975, V-257976, V-257977, V-257978, V-257979, V-257980, V-257981, V-257982, V-257983, V-257985, V-257987, V-257988, V-257989, V-257991, V-257992, V-257993, V-257994, V-257995, V-257996, V-257997, V-257998, V-257999, V-258000, V-258001, V-258002, V-258003, V-258004, V-258005, V-258006, V-258007, V-258008, V-258009, V-258010, V-258011, V-258028, V-258034, V-258035, V-258036, V-258038, V-258040, V-258041, V-258043, V-258046, V-258049, V-258052, V-258054, V-258055, V-258056, V-258057, V-258060, V-258063, V-258064, V-258065, V-258066, V-258068, V-258070, V-258071, V-258072, V-258073, V-258074, V-258075, V-258077, V-258079, V-258080, V-258081, V-258082, V-258083, V-258084, V-258085, V-258088, V-258089, V-258091, V-258092, V-258093, V-258095, V-258097, V-258098, V-258099, V-258100, V-258101, V-258102, V-258103, V-258104, V-258105, V-258107, V-258108, V-258109, V-258110, V-258111, V-258112, V-258113, V-258114, V-258115, V-258116, V-258117, V-258118, V-258119, V-258120, V-258122, V-258123, V-258124, V-258125, V-258126, V-258128, V-258129, V-258130, V-258133, V-258134, V-258137, V-258140, V-258141, V-258142, V-258144, V-258145, V-258146, V-258147, V-258148, V-258150, AWSEC2-ConfigureSTIG 199 AWS Systems Manager Automation runbook reference User Guide V-258151, V-258152, V-258153, V-258154, V-258156, V-258157, V-258158, V-258159, V-258160, V-258161, V-258162, V-258163, V-258164, V-258165, V-258166, V-258167, V-258168, V-258169, V-258170, V-258171, V-258172, V-258175, V-258176, V-258177, V-258178, V-258179, V-258180, V-258181, V-258182, V-258183, V-258184, V-258185, V-258186, V-258187, V-258188, V-258189, V-258190, V-258191, V-258192, V-258193, V-258194, V-258195, V-258196, V-258197, V-258198, V-258199, V-258200, V-258201, V-258202, V-258203, V-258204, V-258205, V-258206, V-258207, V-258208, V-258209, V-258210, V-258211, V-258212, V-258213, V-258214, V-258215, V-258216, V-258217, V-258218, V-258219, V-258220, V-258221, V-258222, V-258223, V-258224, V-258225, V-258226, V-258227, V-258228, V-258229, V-258232, V-258233, V-258234, V-258237, V-258239, and V-258240 Ubuntu 18.04 STIG Version 2 Release 15 V-219149, V-219155, V-219156, V-219160, V-219166, V-219168, V-219176, V-219181, V-219184, V-219186, V-219188, V-219189, V-219190, V-219191, V-219192, V-219193, V-219194, V-219195, V-219196, V-219197, V-219198, V-219199, V-219200, V-219201, V-219202, V-219203, V-219204, V-219205, V-219206, V-219207, V-219208, V-219209, V-219213, V-219214, V-219215, V-219216, V-219217, V-219218, V-219219, V-219220, V-219221, V-219222, V-219223, V-219224, V-219225, V-219226, V-219227, V-219228, V-219229, V-219230, V-219231, V-219232, V-219233, V-219234, V-219235, V-219236, V-219238, V-219239, V-219240, V-219241, V-219242, V-219243, V-219244, V-219250, V-219254, V-219257, V-219263, V-219264, V-219265, V-219266, V-219267, V-219268, V-219269, V-219270, V-219271, V-219272, V-219273, V-219274, V-219275, V-219276, V-219277, V-219279, V-219281, V-219287, V-219291, V-219297, V-219298, V-219299, V-219300, V-219303, V-219304, V-219306, V-219309, V-219310, V-219311, V-219312, V-219315, V-219318, V-219319, V-219323, V-219326, V-219328, V-219330, V-219331, V-219335, V-219336, V-219337, V-219338, V-219339, V-219342, V-219344, V-233779, V-233780, and V-255906 Ubuntu 20.04 STIG Version 2 Release 1 V-238200, V-238205, V-238207, V-238209, V-238210, V-238211, V-238212, V-238213, V-238216, V-238220,
|
systems-manager-automation-runbook-guide-048
|
systems-manager-automation-runbook-guide.pdf
| 48 |
V-219213, V-219214, V-219215, V-219216, V-219217, V-219218, V-219219, V-219220, V-219221, V-219222, V-219223, V-219224, V-219225, V-219226, V-219227, V-219228, V-219229, V-219230, V-219231, V-219232, V-219233, V-219234, V-219235, V-219236, V-219238, V-219239, V-219240, V-219241, V-219242, V-219243, V-219244, V-219250, V-219254, V-219257, V-219263, V-219264, V-219265, V-219266, V-219267, V-219268, V-219269, V-219270, V-219271, V-219272, V-219273, V-219274, V-219275, V-219276, V-219277, V-219279, V-219281, V-219287, V-219291, V-219297, V-219298, V-219299, V-219300, V-219303, V-219304, V-219306, V-219309, V-219310, V-219311, V-219312, V-219315, V-219318, V-219319, V-219323, V-219326, V-219328, V-219330, V-219331, V-219335, V-219336, V-219337, V-219338, V-219339, V-219342, V-219344, V-233779, V-233780, and V-255906 Ubuntu 20.04 STIG Version 2 Release 1 V-238200, V-238205, V-238207, V-238209, V-238210, V-238211, V-238212, V-238213, V-238216, V-238220, V-238225, V-238227, V-238228, V-238230, V-238231, V-238232, V-238236, V-238238, V-238239, V-238240, V-238241, V-238242, V-238244, V-238245, V-238246, V-238247, V-238248, V-238249, V-238250, V-238251, V-238252, V-238253, V-238254, V-238255, V-238256, V-238257, V-238258, V-238264, V-238268, V-238271, V-238277, V-238278, V-238279, V-238280, V-238281, V-238282, V-238283, V-238284, AWSEC2-ConfigureSTIG 200 AWS Systems Manager Automation runbook reference User Guide V-238285, V-238286, V-238287, V-238288, V-238289, V-238290, V-238291, V-238292, V-238293, V-238294, V-238295, V-238297, V-238299, V-238300, V-238301, V-238302, V-238303, V-238304, V-238309, V-238310, V-238315, V-238316, V-238317, V-238318, V-238319, V-238320, V-238324, V-238325, V-238329, V-238330, V-238333, V-238334, V-238337, V-238338, V-238339, V-238340, V-238341, V-238342, V-238343, V-238344, V-238345, V-238346, V-238347, V-238348, V-238349, V-238350, V-238351, V-238352, V-238353, V-238355, V-238356, V-238359, V-238360, V-238369, V-238370, V-238371, V-238376, V-238377, V-238378, V-251505, and V-255912 Ubuntu 22.04 STIG Version 2 Release 2 Includes all STIG hardening settings that Amazon EC2 supports for Category III (Low) vulnerabilities, plus: V-260471, V-260473, V-260474, V-260475, V-260477, V-260478, V-260485, V-260486, V-260487, V-260488, V-260489, V-260490, V-260491, V-260492, V-260493, V-260494, V-260495, V-260496, V-260497, V-260498, V-260499, V-260500, V-260505, V-260506, V-260507, V-260508, V-260509, V-260510, V-260511, V-260512, V-260513, V-260514, V-260522, V-260527, V-260528, V-260530, V-260531, V-260532, V-260533, V-260534, V-260535, V-260537, V-260538, V-260540, V-260542, V-260543, V-260545, V-260546, V-260547, V-260553, V-260554, V-260555, V-260556, V-260557, V-260560, V-260561, V-260562, V-260563, V-260564, V-260565, V-260566, V-260567, V-260569, V-260572, V-260573, V-260574, V-260576, V-260582, V-260584, V-260585, V-260586, V-260588, V-260589, V-260590, V-260591, V-260594, V-260597, V-260598, V-260599, V-260600, V-260601, V-260602, V-260603, V-260604, V-260605, V-260606, V-260607, V-260608, V-260609, V-260610, V-260611, V-260612, V-260613, V-260614, V-260615, V-260616, V-260617, V-260618, V-260619, V-260620, V-260621, V-260622, V-260623, V-260624, V-260625, V-260626, V-260627, V-260628, V-260629, V-260630, V-260631, V-260632, V-260633, V-260634, V-260635, V-260636, V-260637, V-260638, V-260639, V-260640, V-260641, V-260642, V-260643, V-260644, V-260645, V-260646, V-260647, V-260648, and V-260649 Linux STIG High (Category I) The following list contains STIG settings that Amazon EC2 supports to your infrastructure. If a supported setting isn't applicable for your infrastructure, Amazon EC2 skips that setting, and moves on. For example, some STIG hardening settings might not apply to standalone servers. Organization-specific policies can also affect which settings apply, such as a requirement for administrators to review document settings. AWSEC2-ConfigureSTIG 201 AWS Systems Manager Automation runbook reference User Guide For a complete list, see the STIGs Document Library. For information about how to view the complete list, see STIG Viewing Tools. Note The Linux STIG High category includes all of the listed STIG hardening settings that apply for Linux STIG Medium and Low categories, in addition to the STIG hardening settings that Amazon EC2 supports for Category I vulnerabilities. RHEL 7 STIG Version 3 Release 15 Includes all STIG hardening settings that Amazon EC2 supports for Categories II and III (Medium and Low) vulnerabilities, plus: • RHEL 7/CentOS 7/AL2 V-204424, V-204425, V-204442, V-204443, V-204447, V-204448, V-204455, V-204497, V-204502, V-204594, V-204620, and V-204621 RHEL 8 STIG Version 2 Release 1 Includes all STIG hardening settings that Amazon EC2 supports for Categories II and III (Medium and Low) vulnerabilities, plus: • RHEL 8/CentOS 8/AL 2023 V-230223, V-230264, V-230265, V-230487, V-230492, V-230529, V-230531, V-230533, V-230558, and V-244540 RHEL 9 STIG Version 2 Release 2 Includes all STIG hardening settings that Amazon EC2 supports for Categories II and III (Medium and Low) vulnerabilities, plus: • RHEL 9/CentOS Stream 9 V-257784, V-257785, V-257820, V-257821, V-257826, V-257835, V-257955, V-257956, V-257984, V-257986, V-258059, V-258078, V-258094, and V-258235 AWSEC2-ConfigureSTIG 202 AWS Systems Manager Automation runbook reference User Guide Ubuntu 18.04 STIG Version 2 Release 15 V-219157, V-219158, V-219177, V-219212, V-219308, V-219314, V-219316, V-251507, and V-264388 Ubuntu 20.04 STIG Version 2 Release 1 V-238201, V-238218, V-238219, V-238326, V-238327, V-238380, and V-251504 Ubuntu 22.04 STIG Version 2 Release 2 Includes all STIG hardening settings that Amazon EC2 supports for Categories II and III (Medium and Low) vulnerabilities, plus: V-260469, V-260482, V-260483, V-260523, V-260524, V-260526, V-260529, V-260539, V-260570, V-260571, and V-260579 Linux STIG version history This section logs Linux component version history for the quarterly STIG updates. To see the changes and published versions for a quarter, choose the title to expand the information. 2024 Q4 changes - 12/10/2024: Updated the following STIG versions, applied STIGS for the 2024 fourth quarter release, and added information about two new input parameters for the Linux components: STIG-Build-Linux-Low version 2024.4.x • RHEL 7 STIG Version 3 Release 15 • RHEL 8 STIG Version 2 Release 1 • RHEL 9 STIG Version 2 Release 2 • Ubuntu
|
systems-manager-automation-runbook-guide-049
|
systems-manager-automation-runbook-guide.pdf
| 49 |
V-260524, V-260526, V-260529, V-260539, V-260570, V-260571, and V-260579 Linux STIG version history This section logs Linux component version history for the quarterly STIG updates. To see the changes and published versions for a quarter, choose the title to expand the information. 2024 Q4 changes - 12/10/2024: Updated the following STIG versions, applied STIGS for the 2024 fourth quarter release, and added information about two new input parameters for the Linux components: STIG-Build-Linux-Low version 2024.4.x • RHEL 7 STIG Version 3 Release 15 • RHEL 8 STIG Version 2 Release 1 • RHEL 9 STIG Version 2 Release 2 • Ubuntu 18.04 STIG Version 2 Release 15 • Ubuntu 20.04 STIG Version 2 Release 1 • Ubuntu 22.04 STIG Version 2 Release 2 STIG-Build-Linux-Medium version 2024.4.x • RHEL 7 STIG Version 3 Release 15 • RHEL 8 STIG Version 2 Release 1 AWSEC2-ConfigureSTIG 203 AWS Systems Manager Automation runbook reference User Guide • RHEL 9 STIG Version 2 Release 2 • Ubuntu 18.04 STIG Version 2 Release 15 • Ubuntu 20.04 STIG Version 2 Release 1 • Ubuntu 22.04 STIG Version 2 Release 2 STIG-Build-Linux-High version 2024.4.x • RHEL 7 STIG Version 3 Release 15 • RHEL 8 STIG Version 2 Release 1 • RHEL 9 STIG Version 2 Release 2 • Ubuntu 18.04 STIG Version 2 Release 15 • Ubuntu 20.04 STIG Version 2 Release 1 • Ubuntu 22.04 STIG Version 2 Release 2 2024 Q3 changes - 10/04/2024 (no changes): There were no changes for Linux component STIGS for the 2024 third quarter release. 2024 Q2 changes - 05/10/2024: Updated STIG versions and applied STIGS for the 2024 second quarter release. Also added support for RHEL 9, CentOS Stream 9, and Ubuntu 22.04, as follows: STIG-Build-Linux-Low version 2024.2.x • RHEL 7 STIG Version 3 Release 14 • RHEL 8 STIG Version 1 Release 14 • RHEL 9 STIG Version 1 Release 3 • Ubuntu 18.04 STIG Version 2 Release 14 • Ubuntu 20.04 STIG Version 1 Release 12 • Ubuntu 22.04 STIG Version 1 Release 1 STIG-Build-Linux-Medium version 2024.2.x • RHEL 7 STIG Version 3 Release 14 • RHEL 8 STIG Version 1 Release 14 AWSEC2-ConfigureSTIG 204 AWS Systems Manager Automation runbook reference User Guide • RHEL 9 STIG Version 1 Release 3 • Ubuntu 18.04 STIG Version 2 Release 14 • Ubuntu 20.04 STIG Version 1 Release 12 • Ubuntu 22.04 STIG Version 1 Release 1 STIG-Build-Linux-High version 2024.2.x • RHEL 7 STIG Version 3 Release 14 • RHEL 8 STIG Version 1 Release 14 • RHEL 9 STIG Version 1 Release 3 • Ubuntu 18.04 STIG Version 2 Release 14 • Ubuntu 20.04 STIG Version 1 Release 12 • Ubuntu 22.04 STIG Version 1 Release 1 2024 Q1 changes - 02/06/2024: Updated STIG versions and applied STIGS for the 2024 first quarter release as follows: STIG-Build-Linux-Low version 2024.1.x • RHEL 7 STIG Version 3 Release 14 • RHEL 8 STIG Version 1 Release 13 • Ubuntu 18.04 STIG Version 2 Release 13 • Ubuntu 20.04 STIG Version 1 Release 11 STIG-Build-Linux-Medium version 2024.1.x • RHEL 7 STIG Version 3 Release 14 • RHEL 8 STIG Version 1 Release 13 • Ubuntu 18.04 STIG Version 2 Release 13 • Ubuntu 20.04 STIG Version 1 Release 11 STIG-Build-Linux-High version 2024.1.x • RHEL 7 STIG Version 3 Release 14 AWSEC2-ConfigureSTIG 205 AWS Systems Manager Automation runbook reference User Guide • RHEL 8 STIG Version 1 Release 13 • Ubuntu 18.04 STIG Version 2 Release 13 • Ubuntu 20.04 STIG Version 1 Release 11 2023 Q4 changes - 12/07/2023: Updated STIG versions and applied STIGS for the 2023 fourth quarter release as follows: STIG-Build-Linux-Low version 2023.4.x • RHEL 7 STIG Version 3 Release 13 • RHEL 8 STIG Version 1 Release 12 • Ubuntu 18.04 STIG Version 2 Release 12 • Ubuntu 20.04 STIG Version 1 Release 10 STIG-Build-Linux-Medium version 2023.4.x • RHEL 7 STIG Version 3 Release 13 • RHEL 8 STIG Version 1 Release 12 • Ubuntu 18.04 STIG Version 2 Release 12 • Ubuntu 20.04 STIG Version 1 Release 10 STIG-Build-Linux-High version 2023.4.x • RHEL 7 STIG Version 3 Release 13 • RHEL 8 STIG Version 1 Release 12 • Ubuntu 18.04 STIG Version 2 Release 12 • Ubuntu 20.04 STIG Version 1 Release 10 2023 Q3 changes - 10/04/2023: Updated STIG versions and applied STIGS for the 2023 third quarter release as follows: Linux STIG Low (Category III) • RHEL 7 STIG Version 3 Release 12 AWSEC2-ConfigureSTIG 206 AWS Systems Manager Automation runbook reference User Guide • RHEL 8 STIG Version 1 Release 11 • Ubuntu 18.04 STIG Version 2 Release 11 • Ubuntu 20.04 STIG Version 1 Release 9 Linux STIG Medium (Category II) • RHEL 7 STIG Version 3 Release 12 • RHEL 8 STIG Version 1 Release 11 • Ubuntu 18.04 STIG Version 2
|
systems-manager-automation-runbook-guide-050
|
systems-manager-automation-runbook-guide.pdf
| 50 |
Ubuntu 20.04 STIG Version 1 Release 10 2023 Q3 changes - 10/04/2023: Updated STIG versions and applied STIGS for the 2023 third quarter release as follows: Linux STIG Low (Category III) • RHEL 7 STIG Version 3 Release 12 AWSEC2-ConfigureSTIG 206 AWS Systems Manager Automation runbook reference User Guide • RHEL 8 STIG Version 1 Release 11 • Ubuntu 18.04 STIG Version 2 Release 11 • Ubuntu 20.04 STIG Version 1 Release 9 Linux STIG Medium (Category II) • RHEL 7 STIG Version 3 Release 12 • RHEL 8 STIG Version 1 Release 11 • Ubuntu 18.04 STIG Version 2 Release 11 • Ubuntu 20.04 STIG Version 1 Release 9 Linux STIG High (Category I) • RHEL 7 STIG Version 3 Release 12 • RHEL 8 STIG Version 1 Release 11 • Ubuntu 18.04 STIG Version 2 Release 11 • Ubuntu 20.04 STIG Version 1 Release 9 2023 Q2 changes - 05/03/2023: Updated STIG versions and applied STIGS for the 2023 second quarter release as follows: Linux STIG Low (Category III) • RHEL 7 STIG Version 3 Release 11 • RHEL 8 STIG Version 1 Release 10 • Ubuntu 18.04 STIG Version 2 Release 11 • Ubuntu 20.04 STIG Version 1 Release 8 Linux STIG Medium (Category II) • RHEL 7 STIG Version 3 Release 11 • RHEL 8 STIG Version 1 Release 10 • Ubuntu 18.04 STIG Version 2 Release 11 • Ubuntu 20.04 STIG Version 1 Release 8 AWSEC2-ConfigureSTIG 207 AWS Systems Manager Automation runbook reference User Guide Linux STIG High (Category I) • RHEL 7 STIG Version 3 Release 11 • RHEL 8 STIG Version 1 Release 10 • Ubuntu 18.04 STIG Version 2 Release 11 • Ubuntu 20.04 STIG Version 1 Release 8 2023 Q1 changes - 03/27/2023: Updated STIG versions and applied STIGS for the 2023 first quarter release as follows: Linux STIG Low (Category III) • RHEL 7 STIG Version 3 Release 10 • RHEL 8 STIG Version 1 Release 9 • Ubuntu 18.04 STIG Version 2 Release 10 • Ubuntu 20.04 STIG Version 1 Release 7 Linux STIG Medium (Category II) • RHEL 7 STIG Version 3 Release 10 • RHEL 8 STIG Version 1 Release 9 • Ubuntu 18.04 STIG Version 2 Release 10 • Ubuntu 20.04 STIG Version 1 Release 7 Linux STIG High (Category I) • RHEL 7 STIG Version 3 Release 10 • RHEL 8 STIG Version 1 Release 9 • Ubuntu 18.04 STIG Version 2 Release 10 • Ubuntu 20.04 STIG Version 1 Release 7 2022 Q4 changes - 02/01/2023: Updated STIG versions and applied STIGS for the 2022 fourth quarter release as follows: AWSEC2-ConfigureSTIG 208 AWS Systems Manager Automation runbook reference User Guide Linux STIG Low (Category III) • RHEL 7 STIG Version 3 Release 9 • RHEL 8 STIG Version 1 Release 8 • Ubuntu 18.04 STIG Version 2 Release 9 • Ubuntu 20.04 STIG Version 1 Release 6 Linux STIG Medium (Category II) • RHEL 7 STIG Version 3 Release 9 • RHEL 8 STIG Version 1 Release 8 • Ubuntu 18.04 STIG Version 2 Release 9 • Ubuntu 20.04 STIG Version 1 Release 6 Linux STIG High (Category I) • RHEL 7 STIG Version 3 Release 9 • RHEL 8 STIG Version 1 Release 8 • Ubuntu 18.04 STIG Version 2 Release 9 • Ubuntu 20.04 STIG Version 1 Release 6 2022 Q3 changes - 09/30/2022 (no changes): There were no changes for Linux component STIGS for the 2022 third quarter release. 2022 Q2 changes - 08/02/2022: Introduced Ubuntu support, updated STIG versions and applied STIGS for the 2022 second quarter release as follows: Linux STIG Low (Category III) • RHEL 7 STIG Version 3 Release 7 • RHEL 8 STIG Version 1 Release 6 • Ubuntu 18.04 STIG Version 2 Release 6 (new) AWSEC2-ConfigureSTIG 209 AWS Systems Manager Automation runbook reference User Guide • Ubuntu 20.04 STIG Version 1 Release 4 (new) Linux STIG Medium (Category II) • RHEL 7 STIG Version 3 Release 7 • RHEL 8 STIG Version 1 Release 6 • Ubuntu 18.04 STIG Version 2 Release 6 (new) • Ubuntu 20.04 STIG Version 1 Release 4 (new) Linux STIG High (Category I) • RHEL 7 STIG Version 3 Release 7 • RHEL 8 STIG Version 1 Release 6 • Ubuntu 18.04 STIG Version 2 Release 6 (new) • Ubuntu 20.04 STIG Version 1 Release 4 (new) 2022 Q1 changes - 04/26/2022: Refactored to include better support for containers. Combined the previous AL2 script with RHEL 7. Updated STIG versions and applied STIGS for the 2022 first quarter release as follows: Linux STIG Low (Category III) • RHEL 7 STIG Version 3 Release 6 • RHEL 8 STIG Version 1 Release 5 Linux STIG Medium (Category II) • RHEL 7 STIG Version 3 Release 6 • RHEL 8 STIG Version
|
systems-manager-automation-runbook-guide-051
|
systems-manager-automation-runbook-guide.pdf
| 51 |
7 • RHEL 8 STIG Version 1 Release 6 • Ubuntu 18.04 STIG Version 2 Release 6 (new) • Ubuntu 20.04 STIG Version 1 Release 4 (new) 2022 Q1 changes - 04/26/2022: Refactored to include better support for containers. Combined the previous AL2 script with RHEL 7. Updated STIG versions and applied STIGS for the 2022 first quarter release as follows: Linux STIG Low (Category III) • RHEL 7 STIG Version 3 Release 6 • RHEL 8 STIG Version 1 Release 5 Linux STIG Medium (Category II) • RHEL 7 STIG Version 3 Release 6 • RHEL 8 STIG Version 1 Release 5 Linux STIG High (Category I) • RHEL 7 STIG Version 3 Release 6 • RHEL 8 STIG Version 1 Release 5 AWSEC2-ConfigureSTIG 210 AWS Systems Manager Automation runbook reference User Guide 2021 Q4 changes - 12/20/2021: Updated STIG versions, and applied STIGS for the 2021 fourth quarter release as follows: Linux STIG Low (Category III) • RHEL 7 STIG Version 3 Release 5 • RHEL 8 STIG Version 1 Release 4 Linux STIG Medium (Category II) • RHEL 7 STIG Version 3 Release 5 • RHEL 8 STIG Version 1 Release 4 Linux STIG High (Category I) • RHEL 7 STIG Version 3 Release 5 • RHEL 8 STIG Version 1 Release 4 2021 Q3 changes - 09/30/2021: Updated STIG versions, and applied STIGS for the 2021 third quarter release as follows: Linux STIG Low (Category III) • RHEL 7 STIG Version 3 Release 4 • RHEL 8 STIG Version 1 Release 3 Linux STIG Medium (Category II) • RHEL 7 STIG Version 3 Release 4 • RHEL 8 STIG Version 1 Release 3 Linux STIG High (Category I) • RHEL 7 STIG Version 3 Release 4 • RHEL 8 STIG Version 1 Release 3 AWSEC2-ConfigureSTIG 211 AWS Systems Manager Automation runbook reference User Guide AWSEC2-PatchLoadBalancerInstance Description Upgrade and patch minor version of an Amazon EC2 instance (Windows or Linux) attached to any load balancer (classic, ALB, or NLB). The default connection draining time is applied before the instance is patched. You can override the wait time by entering your custom draining time in minutes (1-59) for the ConnectionDrainTime parameter. The automation workflow is as follows: 1. The load balancer or target group to which the instance is attached is determined, and the instance is verified as healthy. 2. The instance is removed from the load balancer or target group. 3. The automation waits for the period of time specified for the connection draining time. 4. The AWS-RunPatchBaseline automation is called to patch the instance. 5. The instance is reattached to the load balancer or target group. Run this Automation (console) Document Type Automation Owner Amazon Prerequisites • Verify that SSM Agent is installed on your instance. For more information, see Working with SSM Agent on EC2 instances for Windows Server. Parameters • InstanceId Type: String AWSEC2-PatchLoadBalancerInstance 212 AWS Systems Manager Automation runbook reference User Guide Description: (Required) ID of the instance to patch that is associated with a load balancer (classic, ALB, or NLB). • ConnectionDrainTime Type: String Description: (Optional) The connection draining time of the load balancer, in minutes (1-59). • S3BucketLog Type: String Description: (Optional) The name of the Amazon S3 bucket to use to store the command output responses. You can specify a bucket that you own or a bucket that is shared with you. If you provide this parameter, you must also provide runCommandAssumeRole. • runCommandAssumeRole Type: String Description: (Optional) The ARN of the IAM role to use to run the command on the instance. The role must have a trust relationship with the ssm.amazonaws.com service principal, it must have the AmazonSSMManagedInstanceCore policy attached, and it must have write permissions for the Amazon S3 bucket specified for S3BucketLog. AWSEC2-SQLServerDBRestore Description The AWSEC2-SQLServerDBRestore runbook restores Microsoft SQL Server database backups stored in Amazon S3 to SQL Server 2017 running on an Amazon Elastic Compute Cloud (EC2) Linux instance. You may provide your own EC2 instance running SQL Server 2017 Linux. If an EC2 instance is not provided, the automation launches and configures a new Ubuntu 16.04 EC2 instance with SQL Server 2017. The automation supports restoring full, differential, and transactional log backups. This automation accepts multiple database backup files and automatically restores the most recent valid backup of each database in the files provided. To automate both backup and restore of an on-premises SQL Server database to an EC2 instance running SQL Server 2017 Linux, you can use the AWS-signed PowerShell script MigrateSQLServerToEC2Linux. AWSEC2-SQLServerDBRestore 213 AWS Systems Manager Automation runbook reference User Guide Important This runbook resets the SQL Server server administrator (SA) user password every time the automation runs. After the automation is complete, you must set your own SA user password again before you connect to the SQL Server instance. Run
|
systems-manager-automation-runbook-guide-052
|
systems-manager-automation-runbook-guide.pdf
| 52 |
automation accepts multiple database backup files and automatically restores the most recent valid backup of each database in the files provided. To automate both backup and restore of an on-premises SQL Server database to an EC2 instance running SQL Server 2017 Linux, you can use the AWS-signed PowerShell script MigrateSQLServerToEC2Linux. AWSEC2-SQLServerDBRestore 213 AWS Systems Manager Automation runbook reference User Guide Important This runbook resets the SQL Server server administrator (SA) user password every time the automation runs. After the automation is complete, you must set your own SA user password again before you connect to the SQL Server instance. Run this Automation (console) Document Type Automation Owner Amazon Platforms Linux Prerequisites To run this automation, you must meet the following prerequisites: • The IAM user or role that runs this automation must have an inline policy attached with the permissions outlined in Required IAM permissions. • If you provide your own EC2 instance: • The EC2 instance that you provide must be a Linux instance running Microsoft SQL Server 2017. • The EC2 instance that you provide must be configured with an AWS Identity and Access Management (IAM) instance profile that has the AmazonSSMManagedInstanceCore managed policy attached. For more information, see Create an IAM instance profile for Systems Manager. • The SSM Agent must be installed on your EC2 instance. For more information, see Installing and configuring SSM Agent on EC2 instances for Linux. • The EC2 instance must have enough free disk space to download and restore the SQL Server backups. AWSEC2-SQLServerDBRestore 214 AWS Systems Manager Automation runbook reference User Guide Limitations This automation does not support restoring to SQL Server running on EC2 instances for Windows Server. This automation only restores database backups that are compatible with SQL Server Linux 2017. For more information, see Editions and Supported Features of SQL Server 2017 on Linux. Parameters This automation has the following parameters: • DatabaseNames Type: String Description: (Optional) Comma-separated list of the names of databases to restore. • DataDirectorySize Type: String Description: (Optional) Desired volume size (GiB) of the SQL Server Data directory for the new EC2 instance. Default value: 100 • KeyPair Type: String Description: (Optional) Key pair to use when creating the new EC2 instance. • IamInstanceProfileName Type: String Description: (Optional) The IAM instance profile to attach to the new EC2 instance. The IAM instance profile must have the AmazonSSMManagedInstanceCore managed policy attached. • InstanceId Type: String Description: (Optional) The instance running SQL Server 2017 on Linux. If no InstanceId is provided, the automation launches a new EC2 instance using the InstanceType and SQLServerEdition provided. AWSEC2-SQLServerDBRestore 215 AWS Systems Manager Automation runbook reference User Guide • InstanceType Type: String Description: (Optional) The instance type of the EC2 instance to be launched. • IsS3PresignedUrl Type: String Description: (Optional) If S3Input is a pre-signed S3 URL, indicate yes. Default value: no Valid values: yes | no • LogDirectorySize Type: String Description: (Optional) Desired volume size (GiB) of the SQL Server Log directory for the new EC2 instance. Default value: 100 • S3Input Type: String Description: (Required) S3 bucket name, comma-separated list of S3 object keys, or comma- separated list of pre-signed S3 URLs containing the SQL backup files to be restored. • SQLServerEdition Type: String Description: (Optional) The edition of SQL Server 2017 to be installed on the newly created EC2 instance. Valid values: Standard | Enterprise | Web | Express • SubnetId Type: String AWSEC2-SQLServerDBRestore 216 AWS Systems Manager Automation runbook reference User Guide Description: (Optional) The subnet in which to launch the new EC2 instance. The subnet must have outbound connectivity to AWS services. If a value for SubnetId is not provided, the automation uses the default subnet. • TempDbDirectorySize Type: String Description: (Optional) Desired volume size (GiB) of the SQL Server TempDB directory for the new EC2 instance. Default value: 100 Required IAM permissions The AutomationAssumeRole parameter requires the following actions to successfully use the runbook. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "ec2:CreateTags", "ec2:DescribeImages", "ec2:DescribeInstanceStatus", "ec2:DescribeInstances", "ec2:RebootInstances", "ec2:RunInstances", "ssm:DescribeInstanceInformation", "ssm:GetAutomationExecution", "ssm:ListCommandInvocations", "ssm:ListCommands", "ssm:SendCommand", "ssm:StartAutomationExecution" ], "Resource": "*" }, { "Effect": "Allow", "Action": "iam:PassRole", AWSEC2-SQLServerDBRestore 217 AWS Systems Manager Automation runbook reference User Guide "Resource": "arn:aws:iam::ACCOUNTID:role/ROLENAME" } ] } Document Steps To use this automation, follow the steps that apply to your instance type: For new EC2 instances: 1. aws:executeAwsApi - Retrieve the AMI ID for SQL Server 2017 on Ubuntu 16.04. 2. aws:runInstances - Launch a new EC2 instance for Linux. 3. aws:waitForAwsResourceProperty - Wait for the newly created EC2 instance to be ready. 4. aws:executeAwsApi - Reboot the instance if the instance is not ready. 5. aws:assertAwsResourceProperty - Verify that SSM Agent is installed. 6. aws:runCommand - Run the SQL Server restore script in PowerShell. For existing EC2 instances: 1. aws:waitForAwsResourceProperty - Verify that the EC2 instance is ready. 2.
|
systems-manager-automation-runbook-guide-053
|
systems-manager-automation-runbook-guide.pdf
| 53 |
use this automation, follow the steps that apply to your instance type: For new EC2 instances: 1. aws:executeAwsApi - Retrieve the AMI ID for SQL Server 2017 on Ubuntu 16.04. 2. aws:runInstances - Launch a new EC2 instance for Linux. 3. aws:waitForAwsResourceProperty - Wait for the newly created EC2 instance to be ready. 4. aws:executeAwsApi - Reboot the instance if the instance is not ready. 5. aws:assertAwsResourceProperty - Verify that SSM Agent is installed. 6. aws:runCommand - Run the SQL Server restore script in PowerShell. For existing EC2 instances: 1. aws:waitForAwsResourceProperty - Verify that the EC2 instance is ready. 2. aws:executeAwsApi - Reboot the instance if the instance is not ready. 3. aws:assertAwsResourceProperty - Verify that SSM Agent is installed. 4. aws:runCommand - Run the SQL Server restore script in PowerShell. Outputs getInstance.InstanceId restoreToNewInstance.Output restoreToExistingInstance.Output AWSSupport-ActivateWindowsWithAmazonLicense Description AWSSupport-ActivateWindowsWithAmazonLicense 218 AWS Systems Manager Automation runbook reference User Guide The AWSSupport-ActivateWindowsWithAmazonLicense runbook activates an Amazon Elastic Compute Cloud (Amazon EC2) instance for Windows Server with a license provided by Amazon. The automation verifies and configures required key management service operating system settings and attempts activation. This includes operating system routes to Amazon's key management servers and key management service operating system settings. Setting the AllowOffline parameter to true allows the automation to successfully target instances that are not managed by AWS Systems Manager, but requires a stop and start of the instance. Note This runbook cannot be used on Bring Your Own License (BYOL) model Windows Server instances. For information about using your own license, see Microsoft Licensing on AWS. Run this Automation (console) Document type Automation Owner Amazon Platforms Windows Parameters • AllowOffline Type: String Valid values: true | false Default: false Description: (Optional) Set it to true if you allow an offline Windows activation remediation in case the online troubleshooting fails, or if the provided instance is not a managed instance. AWSSupport-ActivateWindowsWithAmazonLicense 219 AWS Systems Manager Automation runbook reference User Guide Important The offline method requires that the provided EC2 instance be stopped and then started. Data stored in instance store volumes will be lost. The public IP address will change if you are not using an Elastic IP. • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • ForceActivation Type: String Valid values: true | false Default: false Description: (Optional) Set it to true if you want to proceed even if Windows is already activated. • InstanceId Type: String Description: (Required) ID of your managed EC2 instance for Windows Server. • SubnetId Type: String Default: CreateNewVPC Description: (Optional) Offline only - The subnet ID for the EC2Rescue instance used to perform the offline troubleshooting. Use SelectedInstanceSubnet to use the same subnet as your instance, or use CreateNewVPC to create a new VPC. IMPORTANT: The subnet must be in the same Availability Zone as InstanceId, and it must allow access to the SSM endpoints. AWSSupport-ActivateWindowsWithAmazonLicense 220 AWS Systems Manager Automation runbook reference User Guide Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. We recommend that the EC2 instance receiving the command has an IAM role with the AmazonSSMManagedInstanceCore Amazon managed policy attached. You must have at least ssm:StartAutomationExecution and ssm:SendCommand to run the automation and send the command to the instance, plus ssm:GetAutomationExecution to be able to read the automation output. For the offline remediation, see the permissions needed by AWSSupport- StartEC2RescueWorkflow. Document Steps 1. aws:assertAwsResourceProperty - Check the provided instance's platform is Windows. 2. aws:assertAwsResourceProperty - Confirm the provided instance is a managed instance: a. (Online activation fix) If the input instance is a managed instance, then run aws:runCommand to run the PowerShell script to attempt to fix Windows activation. b. (Offline activation fix) If the input instance is not a managed instance: i. aws:assertAwsResourceProperty - Verifies the AllowOffline flag is set to true. If so, the offline fix starts; otherwise the automation ends. ii. aws:executeAutomation - Invoke AWSSupport-StartEC2RescueWorkflow with the Windows activation offline fix script. The script uses either EC2Config or EC2Launch, depending on the OS version. iii. aws:executeAwsApi - Read the result from AWSSupport-StartEC2RescueWorkflow. Outputs activateWindows.Output getActivateWindowsOfflineResult.Output AWSSupport-AnalyzeAWSEndpointReachabilityFromEC2 Description The AWSSupport-AnalyzeAWSEndpointReachabilityFromEC2 runbook analyzes connectivity from an Amazon Elastic Compute Cloud (Amazon EC2) instance or elastic network interface to AWSSupport-AnalyzeAWSEndpointReachabilityFromEC2 221 AWS Systems Manager Automation runbook reference User Guide an AWS service endpoint. IPv6 is not supported. The runbook uses the value that you specify for the ServiceEndpoint parameter to analyze connectivity to an endpoint. If an AWS PrivateLink endpoint can't be found in your VPC, the runbook uses a public IP address for the service in the current AWS
|
systems-manager-automation-runbook-guide-054
|
systems-manager-automation-runbook-guide.pdf
| 54 |
or EC2Launch, depending on the OS version. iii. aws:executeAwsApi - Read the result from AWSSupport-StartEC2RescueWorkflow. Outputs activateWindows.Output getActivateWindowsOfflineResult.Output AWSSupport-AnalyzeAWSEndpointReachabilityFromEC2 Description The AWSSupport-AnalyzeAWSEndpointReachabilityFromEC2 runbook analyzes connectivity from an Amazon Elastic Compute Cloud (Amazon EC2) instance or elastic network interface to AWSSupport-AnalyzeAWSEndpointReachabilityFromEC2 221 AWS Systems Manager Automation runbook reference User Guide an AWS service endpoint. IPv6 is not supported. The runbook uses the value that you specify for the ServiceEndpoint parameter to analyze connectivity to an endpoint. If an AWS PrivateLink endpoint can't be found in your VPC, the runbook uses a public IP address for the service in the current AWS Region. This automation uses Reachability Analyzer from Amazon Virtual Private Cloud. For more information, see What is Reachability Analyzer?, in Reachability Analyzer. This automation checks the following: • Checks whether your virtual private cloud (VPC) is configured to use the Amazon provided DNS server. • Checks whether an AWS PrivateLink endpoint exists in the VPC for the AWS service that you specify. If an endpoint is found, the automation verifies that the privateDns attribute is turned on. • Checks if the AWS PrivateLink endpoint is using the default endpoint policy. Considerations • You are charged per analysis run between a source and destination. For more information, see Amazon VPC Pricing. • During the automation, a network insights path and network insights analysis are created. If the automation completes successfully, the runbook deletes these resources . If the cleanup step fails, the network insights path is not deleted by the runbook and you will need to delete it manually. If you don't delete the network insights path manually, it continues to count towards the quota for your AWS account. For more information about quotas for Reachability Analyzer, see Quotas for Reachability Analyzer in Reachability Analyzer. • Operating system-level configurations such as the use of a proxy, local DNS resolver, or hosts file can affect connectivity even if the Reachability Analyzer returns PASS. • Review the evaluation of all checks performed by the Reachability Analyzer. If any of the checks return with a status of FAIL, that might affect connectivity even if the overall reachability check returns a status of PASS. Run this Automation (console) Document type Automation AWSSupport-AnalyzeAWSEndpointReachabilityFromEC2 222 AWS Systems Manager Automation runbook reference User Guide Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • Source Type: String Description: (Required) The ID of the Amazon EC2 instance or the network interface from which you want to analyze reachability. • ServiceEndpoint Type: String Description: (Required) The hostname of the service endpoint that you want to analyze reachability to. • RetainVpcReachabilityAnalysis Type: String Default: false Description: (Optional) Determines whether the network insight path and related analysis created are retained. By default, the resources used for analyze reachability are deleted after successful analysis. If you choose to retain the analysis, the runbook does not delete the analysis and you can visualize it in the Amazon VPC console. A console link is available in the automation output. AWSSupport-AnalyzeAWSEndpointReachabilityFromEC2 223 AWS Systems Manager Automation runbook reference User Guide Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ec2:CreateNetworkInsightsPath • ec2:DeleteNetworkInsightsAnalysis • ec2:DeleteNetworkInsightsPath • ec2:DescribeAvailabilityZones • ec2:DescribeCustomerGateways • ec2:DescribeDhcpOptions • ec2:DescribeInstances • ec2:DescribeInternetGateways • ec2:DescribeManagedPrefixLists • ec2:DescribeNatGateways • ec2:DescribeNetworkAcls • ec2:DescribeNetworkInsightsAnalyses • ec2:DescribeNetworkInsightsPaths • ec2:DescribeNetworkInterfaces • ec2:DescribePrefixLists • ec2:DescribeRegions • ec2:DescribeRouteTables • ec2:DescribeSecurityGroups • ec2:DescribeSubnets • ec2:DescribeTransitGatewayAttachments • ec2:DescribeTransitGatewayPeeringAttachments • ec2:DescribeTransitGatewayConnects • ec2:DescribeTransitGatewayRouteTables • ec2:DescribeTransitGateways • ec2:DescribeTransitGatewayVpcAttachments AWSSupport-AnalyzeAWSEndpointReachabilityFromEC2 224 AWS Systems Manager Automation runbook reference User Guide • ec2:DescribeVpcAttribute • ec2:DescribeVpcEndpoints • ec2:DescribeVpcEndpointServiceConfigurations • ec2:DescribeVpcPeeringConnections • ec2:DescribeVpcs • ec2:DescribeVpnConnections • ec2:DescribeVpnGateways • ec2:GetManagedPrefixListEntries • ec2:GetTransitGatewayRouteTablePropagations • ec2:SearchTransitGatewayRoutes • ec2:StartNetworkInsightsAnalysis • elasticloadbalancing:DescribeListeners • elasticloadbalancing:DescribeLoadBalancerAttributes • elasticloadbalancing:DescribeLoadBalancers • elasticloadbalancing:DescribeRules • elasticloadbalancing:DescribeTags • elasticloadbalancing:DescribeTargetGroups • elasticloadbalancing:DescribeTargetHealth • tiros:CreateQuery • tiros:GetQueryAnswer • tiros:GetQueryExplanation Document Steps 1. aws:executeScript: Validates the service endpoint by attempting to resolve the hostname. 2. aws:executeScript: Gathers details about the VPC and subnet. 3. aws:executeScript: Evaluates the DNS configuration of the VPC. 4. aws:executeScript: Evaluates the VPC endpoint checks. 5. aws:executeScript: Locates an internet gateway to connect to the public service endpoint. 6. aws:executeScript: Determines the destination to be used for reachability analysis. AWSSupport-AnalyzeAWSEndpointReachabilityFromEC2 225 AWS Systems Manager Automation runbook reference User Guide 7. aws:executeScript: Analyzes the reachability from source to the endpoint using Reachability Analyzer and cleans up the resources if the analysis is successful. 8. aws:executeScript: Generates a reachability evaluation report. 9. aws:executeScript: Generates the output in JSON. Outputs • generateReport.EvalReport - The results of the checks performed by the automation in text format. • generateJsonOutput.Output - A minimal
|
systems-manager-automation-runbook-guide-055
|
systems-manager-automation-runbook-guide.pdf
| 55 |
VPC. 4. aws:executeScript: Evaluates the VPC endpoint checks. 5. aws:executeScript: Locates an internet gateway to connect to the public service endpoint. 6. aws:executeScript: Determines the destination to be used for reachability analysis. AWSSupport-AnalyzeAWSEndpointReachabilityFromEC2 225 AWS Systems Manager Automation runbook reference User Guide 7. aws:executeScript: Analyzes the reachability from source to the endpoint using Reachability Analyzer and cleans up the resources if the analysis is successful. 8. aws:executeScript: Generates a reachability evaluation report. 9. aws:executeScript: Generates the output in JSON. Outputs • generateReport.EvalReport - The results of the checks performed by the automation in text format. • generateJsonOutput.Output - A minimal version of the results in JSON format. AWSPremiumSupport-ChangeInstanceTypeIntelToAMD Description TheAWSPremiumSupport-ChangeInstanceTypeIntelToAMD runbook automates migrations from Intel powered Amazon Elastic Compute Cloud (Amazon EC2) instances to the equivalent AMD powered instance types. This runbook supports general purpose (M), burstable general purpose (T), compute optimized (C), and memory optimized (R) instances built on the Nitro system. This runbook can be used on instances that aren't managed by Systems Manager. To reduce the potential risk of data loss and downtime, the runbook checks the instance's stop behavior, whether the instance is in an Amazon EC2 Auto Scaling group, the health of the instance, and that the equivalent AMD powered instance type is available in the same Availability Zone. By default, this runbook will not change the instance type if instance store volumes are attached, or if the instance is part of an AWS CloudFormation stack. If you want to change this behavior, specify yes for either of the AllowInstanceStoreInstances and AllowCloudFormationInstances parameters. Important Access to AWSPremiumSupport-* runbooks requires either an Enterprise or Business Support Subscription. For more information, see Compare Support Plans. Considerations AWSPremiumSupport-ChangeInstanceTypeIntelToAMD 226 AWS Systems Manager Automation runbook reference User Guide • We recommend backing up your instance before using this runbook. • Changing the instance type requires the runbook to stop your instance. When an instance is stopped, any data stored in the RAM or the instance store volumes is lost, and the automatic public IPv4 address is released. For more information, see Stop and start your instance. • If you don't specify a value for the TargetInstanceType parameter, the runbook attempts to identify the equivalent AMD instance in terms of virtual CPUs and memory within the same instance family. The runbook ends if it is not able to identify an equivalent AMD instance type. • By using the DryRun option, you can capture the equivalent AMD instance type, and validate requirements without actually changing the instance type. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • Acknowledge Type: String Description: (Required) Enter yes to acknowledge that your target instance will be stopped if it's running. AWSPremiumSupport-ChangeInstanceTypeIntelToAMD 227 AWS Systems Manager Automation runbook reference User Guide • InstanceId Type: String Description: (Required) The ID of Amazon EC2 instance whose type you want to change. • TargetInstanceType Type: String Default: automatic Description: (Optional) The AMD instance type you want to change your instance to. The default automatic value uses the equivalent instance type in terms of virtual CPUs and memory. For example, an m5.large would be changed to m5a.large. • AllowInstanceStoreInstances Type: String Valid values: no | yes Default: no Description: (Optional) If you specify yes, the runbook runs on instances that have instance store volumes attached. • AllowCloudFormationInstances Type: String Valid values: no | yes Default: no Description: (Optional) If set to yes, the runbook runs on instances that are part of a AWS CloudFormation stack. • AllowCrossGeneration Type: String Valid values: no | yes AWSPremiumSupport-ChangeInstanceTypeIntelToAMD Default: no 228 AWS Systems Manager Automation runbook reference User Guide Description: (Optional) If set to yes, the runbook attempts to find the newest equivalent AMD instance type within the same instance family. • DryRun Type: String Valid values: no | yes Default: no Description: (Optional) If set to yes, the runbook returns the equivalent AMD instance type and validates migration requirements without making changes to the instance type. • SleepWait Type: String Default: PT3S Description: (Optional) The time the runbook should wait before starting a new automation. The value you provide for this parameter must match the ISO 8601 standard. For more information about creating ISO 8601 strings, see Formatting date and time strings for Systems Manager. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:DescribeAutomationExecutions • ssm:GetAutomationExecution • ssm:StartAutomationExecution • ec2:GetInstanceTypesFromInstanceRequirements • ec2:DescribeInstanceAttribute • ec2:DescribeInstances • ec2:DescribeInstanceStatus • ec2:DescribeInstanceTypeOfferings • ec2:DescribeInstanceTypes AWSPremiumSupport-ChangeInstanceTypeIntelToAMD 229 AWS Systems Manager Automation runbook reference
|
systems-manager-automation-runbook-guide-056
|
systems-manager-automation-runbook-guide.pdf
| 56 |
validates migration requirements without making changes to the instance type. • SleepWait Type: String Default: PT3S Description: (Optional) The time the runbook should wait before starting a new automation. The value you provide for this parameter must match the ISO 8601 standard. For more information about creating ISO 8601 strings, see Formatting date and time strings for Systems Manager. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:DescribeAutomationExecutions • ssm:GetAutomationExecution • ssm:StartAutomationExecution • ec2:GetInstanceTypesFromInstanceRequirements • ec2:DescribeInstanceAttribute • ec2:DescribeInstances • ec2:DescribeInstanceStatus • ec2:DescribeInstanceTypeOfferings • ec2:DescribeInstanceTypes AWSPremiumSupport-ChangeInstanceTypeIntelToAMD 229 AWS Systems Manager Automation runbook reference User Guide • ec2:DescribeTags • ec2:ModifyInstanceAttribute • ec2:StartInstances • ec2:StopInstances Document Steps 1. aws:assertAwsResourceProperty: Confirms the status of the target Amazon EC2 instance is running, pending, stopped, or stopping. Otherwise, the automation ends. 2. aws:executeAwsApi: Gathers properties from the target Amazon EC2 instance. 3. aws:branch: Branches the automation based on the state of the Amazon EC2 instance. a. If stopped or stopping, the automation runs aws:waitForAwsResourceProperty until the Amazon EC2 instance is fully stopped. b. If running or pending, the automation runs aws:waitForAwsResourceProperty until the Amazon EC2 instance passes status checks. 4. aws:assertAwsResourceProperty: Confirms the Amazon EC2 instance is not part of an Auto Scaling group by checking if the aws:autoscaling:groupName tag is applied. 5. aws:executeAwsApi: Gathers the current instance type properties to find the equivalent AMD instance type. 6. aws:assertAwsResourceProperty: Confirms a AWS Marketplace product code is not associated with the Amazon EC2 instance. Some products are not available on all instance types. 7. aws:branch: Branches the automation depending on whether you want the automation to check if the Amazon EC2 instance is part of a AWS CloudFormation stack a. If the aws:cloudformation:stack-name tag is applied to the instance, the automation runs aws:assertAwsResourceProperty to confirm the instance is not part of a AWS CloudFormation stack. 8. aws:branch: Branches the automation based on whether the instance root volume type is Amazon Elastic Block Store (Amazon EBS). 9. aws:assertAwsResourceProperty: Confirms the instance shutdown behavior is stop and not terminate. 10.aws:executeScript: Confirms there is only one automation of this runbook targeting the current instance. If another automation is already in progress targeting the same instance, it returns an error and ends. AWSPremiumSupport-ChangeInstanceTypeIntelToAMD 230 AWS Systems Manager Automation runbook reference User Guide 11.aws:executeAwsApi: Returns a list of the AMD instance types with same amount of memory and vCPUs. 12.aws:executeScript: Checks if the current instance type is supported and returns its equivalent AMD instance type. If there is no equivalent, the automation ends. 13.aws:executeScript: Confirms the AMD instance type is available in the same Availability Zone, and verifies the provided IAM permissions. 14.aws:branch: Branches the automation based on whether the DryRun parameter value is yes. 15.aws:branch: Checks if the original and the target instance type are the same. If they're the same, the automation ends. 16.aws:executeAwsApi: Gets the current instance state. 17.aws:changeInstanceState: Stops the Amazon EC2 instance. 18.aws:changeInstanceState: Forces the instance to stop if it's stuck in stopping state. 19.aws:executeAwsApi: Changes the instance type to the target AMD instance type. 20.aws:sleep: Waits 3 seconds after changing the instance type for eventual consistency. 21.aws:branch: Branches the automation based on the previous instance state. If it was running, the instance is started. a. aws:changeInstanceState: Starts the Amazon EC2 instance if it was running before changing the instance type. b. aws:waitForAwsResourceProperty: Waits for the Amazon EC2 instance to pass status checks. If the instance doesn't pass status checks, the instance is changed back to its original instance type. i. aws:changeInstanceState: Stops the Amazon EC2 instance before changing it to its original instance type. ii. aws:changeInstanceState: Forces the Amazon EC2 instance to stop before changing it to its original instance type in case it gets stuck in a stopping state. iii. aws:executeAwsApi: Changes Amazon EC2 instance to its original type. iv. aws:sleep: Waits 3 seconds after changing instance type for eventual consistency. v. aws:changeInstanceState: Starts the Amazon EC2 instance if it was running before changing the instance type. vi. aws:waitForAwsResourceProperty: Waits for the Amazon EC2 instance to pass status checks. 22.aws:sleep: Waits before ending the runbook. AWSPremiumSupport-ChangeInstanceTypeIntelToAMD 231 AWS Systems Manager Automation runbook reference User Guide AWSSupport-CheckXenToNitroMigrationRequirements Description The AWSSupport-CheckXenToNitroMigrationRequirements runbook verifies that an Amazon Elastic Compute Cloud (Amazon EC2) instance meets the prerequistes to successfully change the instance type from a Xen type instance to Nitro-based instance type. This automation checks the following: • The root device is an Amazon Elastic Block Store (Amazon EBS) volume. • The enaSupport attribute is enabled. • The ENA module is installed on the instance. • The NVMe module is installed on the instance. If yes, the module is installed and a script verifies that the module is loaded in the initramfs image. • Analyzes /etc/fstab and looks for block devices being mounted using device names. • Determines whether the operating
|
systems-manager-automation-runbook-guide-057
|
systems-manager-automation-runbook-guide.pdf
| 57 |
(Amazon EC2) instance meets the prerequistes to successfully change the instance type from a Xen type instance to Nitro-based instance type. This automation checks the following: • The root device is an Amazon Elastic Block Store (Amazon EBS) volume. • The enaSupport attribute is enabled. • The ENA module is installed on the instance. • The NVMe module is installed on the instance. If yes, the module is installed and a script verifies that the module is loaded in the initramfs image. • Analyzes /etc/fstab and looks for block devices being mounted using device names. • Determines whether the operating system (OS) uses predictable network interface names by default. This runbook supports the following operating systems: • Red Hat Enterprise Linux • CentOS • Amazon Linux 2 • Amazon Linux • Debian Server • Ubuntu Server • SUSE Linux Enterprise Server 15 SP2 • SUSE Linux Enterprise Server 12 SP5 Run this Automation (console) Document type Automation AWSSupport-CheckXenToNitroMigrationRequirements 232 AWS Systems Manager Automation runbook reference User Guide Owner Amazon Platforms Linux Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • InstanceId Type: String Default: false Description: (Required) The ID of the Amazon EC2 instance which you want to check prerequisites for before migrating to a Nitro-based instance type. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:DescribeAutomationExecutions • ssm:DescribeAutomationStepExecutions • ssm:DescribeAutomationStepExecutions • ssm:DescribeInstanceInformation • ssm:DescribeInstanceProperties • ssm:StartAutomationExecution AWSSupport-CheckXenToNitroMigrationRequirements 233 AWS Systems Manager Automation runbook reference User Guide • ssm:GetAutomationExecution • ssm:GetDocument • ssm:ListCommands • ssm:ListCommandInvocations • ssm:ListDocuments • ssm:StartAutomationExecution • ssm:SendCommand • iam:ListRoles • ec2:DescribeInstances • ec2:DescribeInstancesTypes Document Steps • aws:executeAwsApi - Gathers details about the instance. • aws:executeAwsApi - Gathers information about the hypervisor for the instance. • aws:branch - Branches based on whether the target instance is already running a Nitro-based instance type. • aws:branch - Checks whether the instance's OS is supported by Nitro-based instances. • aws:assertAwsResourceProperty - Verifies the instance you specified is managed by Systems Manager, and that the status is Online. • aws:branch - Branches based on whether the root device of the instance is an Amazon EBS volume. • aws:branch - Branches based on whether the ENA attribute is enabled for the instance. • aws:runCommand - Checks for ENA drivers on the instance. • aws:runCommand - Checks for NVMe drivers on the instance. • aws:runCommand - Checks the fstab file for unrecognized formats. • aws:runCommand - Checks for predictable interface name configuration on the instance. • aws:executeScript - Generates output based on previous steps. Outputs AWSSupport-CheckXenToNitroMigrationRequirements 234 AWS Systems Manager Automation runbook reference User Guide finalOutput.output - The results of the checks performed by the automation. AWSSupport-ConfigureEC2Metadata Description This runbook helps you configure instance metadata service (IMDS) options for Amazon Elastic Compute Cloud (Amazon EC2) instances. Using this runbook, you can configure the following: • Enforce the use of IMDSv2 for instance metadata. • Configure the HttpPutResponseHopLimit value. • Allow or deny instance metadata access. For more information about instance metadata, see Configuring the Instance Metadata Service in the Amazon EC2 User Guide. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. AWSSupport-ConfigureEC2Metadata 235 AWS Systems Manager Automation runbook reference User Guide • EnforceIMDSv2 Type: String Valid values: required | optional Default: optional Description: (Optional) Enforce IMDSv2. If you choose required, the Amazon EC2 instance will only use IMDSv2. If you choose optional, you can choose between IMDSv1 and IMDSv2 for metadata access. Important If you enforce IMDSv2, applications that use IMDSv1 might not function correctly. Before enforcing IMDSv2, make sure your applications that use IMDS are upgraded to a version that support IMDSv2. For information about Instance Metadata Service Version 2 (IMDSv2), see Configuring the Instance Metadata Service in the Amazon EC2 User Guide. • HttpPutResponseHopLimit Type: Integer Valid values: 0-64 Default: 0 Description: (Optional) The desired HTTP PUT response hop limit value (1-64) for instance metadata requests. This value controls the number of hops that the PUT response can traverse. To prevent the response from traveling outside of the instance, specify 1 for the parameter value. • InstanceId Type: String Description: (Required) The ID of the Amazon EC2 instance whose metadata settings you want to configure. • MetadataAccess Type: String AWSSupport-ConfigureEC2Metadata 236 AWS Systems Manager
|
systems-manager-automation-runbook-guide-058
|
systems-manager-automation-runbook-guide.pdf
| 58 |
Instance Metadata Service Version 2 (IMDSv2), see Configuring the Instance Metadata Service in the Amazon EC2 User Guide. • HttpPutResponseHopLimit Type: Integer Valid values: 0-64 Default: 0 Description: (Optional) The desired HTTP PUT response hop limit value (1-64) for instance metadata requests. This value controls the number of hops that the PUT response can traverse. To prevent the response from traveling outside of the instance, specify 1 for the parameter value. • InstanceId Type: String Description: (Required) The ID of the Amazon EC2 instance whose metadata settings you want to configure. • MetadataAccess Type: String AWSSupport-ConfigureEC2Metadata 236 AWS Systems Manager Automation runbook reference User Guide Valid values: enabled | disabled Default: enabled Description: (Optional) Allow or deny instance metadata access in the Amazon EC2 instance. If you specify disabled, all other parameters will be ignored and the metadata access will be denied for the instance. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ec2:DescribeInstances • ec2:ModifyInstanceMetadataOptions • ssm:GetAutomationExecution • ssm:StartAutomationExecution Document Steps 1. branchOnMetadataAccess - Branches automation based on the value of MetadataAccess parameter. 2. disableMetadataAccess - Calls the ModifyInstanceMetadataOptions API action to disable metadata endpoint access. 3. branchOnHttpPutResponseHopLimit - Branches automation based on the value of HttpPutResponseHopLimit parameter. 4. maintainHopLimitAndConfigureImdsVersion - If HttpPutResponseHopLimit is 0, maintains current hop limit and changes other metadata options. 5. waitBeforeAssertingIMDSv2State - Waits 30 seconds before asserting IMDSv2 status. 6. setHopLimitAndConfigureImdsVersion - If HttpPutResponseHopLimit is greater than 0, configures the metadata options using the given input parameters. 7. waitBeforeAssertingHopLimit - Waits 30 seconds before asserting metadata options. 8. assertHopLimit - Asserts the HttpPutResponseHopLimit property is set to the value you specified. AWSSupport-ConfigureEC2Metadata 237 AWS Systems Manager Automation runbook reference User Guide 9. branchVerificationOnIMDSv2Option - Branches verification based on the value of EnforceIMDSv2 parameter. 10.assertIMDSv2IsOptional - Asserts HttpTokens value set to optional. 11.assertIMDSv2IsEnforced - Asserts HttpTokens value set to required. 12.waitBeforeAssertingMetadataState - Waits 30 seconds before asserting the metadata state is disabled. 13.assertMetadataIsDisabled - Asserts metadata is disabled. 14.describeMetadataOptions - Gets the metadata options after the changes you've specified have been applied. Outputs describeMetadataOptions.State describeMetadataOptions.MetadataAccess describeMetadataOptions.IMDSv2 describeMetadataOptions.HttpPutResponseHopLimit AWSSupport-ContainEC2Instance Description The AWSSupport-ContainEC2Instance runbook provides an automated solution for the procedure outlined in the article How do I isolate the Amazon EC2 Instance when faced with a potentially compromised or suspicious? The automation branches depending on the values you specify. How does it work? This Automation runbook AWSSupport-ContainEC2Instance performs network containment of an Amazon EC2 Instance through a series of coordinated steps. When executed in Contain mode, it first validates the input parameters and checks if the instance is not terminated. It then backs up the current security group configuration to an Amazon S3 bucket for later restoration. The runbook creates two security groups: a temporary "all access" security group and a final "containment" security group. It gradually transitions the instance's network interfaces from their original security groups to the all-access security group, and finally to the containment security group. If specified, AWSSupport-ContainEC2Instance 238 AWS Systems Manager Automation runbook reference User Guide it creates both unencrypted and encrypted AMI backups of the instance. For instances in an Auto Scaling group, it handles the necessary Auto Scaling group modifications and brings the instance to standby state. When executed in Release mode, it restores the instance to its original network configuration using the backed-up settings from Amazon S3. The runbook supports a DryRun parameter to preview actions without making actual changes, and includes comprehensive error handling and reporting mechanisms throughout the containment and release workflows. Important • This runbook performs various operations that require elevated privileges, such as modifying security groups, creating AMIs, and interacting with Auto Scaling groups. These actions could potentially lead to privilege escalation or impact other workloads in your account. You should review the permissions granted to the role specified by the AutomationAssumeRole parameter and ensure they are appropriate for the intended use case. You can refer to the following AWS documentation for more information on IAM permissions: AWS Identity and Access Management (IAM) Permissions AWS Systems Manager Automation Permissions. • This runbook performs mutative actions that could potentially cause unavailability or disruption to your workloads. Specifically, it modifies the security groups associated with the target Amazon EC2 Instance, which could impact network connectivity. Additionally, if the instance is part of an Auto Scaling group, the runbook may modify the group's configuration, potentially affecting its scaling behavior. • During the containment process, this runbook creates additional resources, such as security groups and AMIs. While these resources are tagged for identification, you should be aware of their creation and ensure proper cleanup or management after the containment process is complete. • If the Action parameter is set to Release, this runbook attempts to restore the Amazon EC2 Instance's configuration to its original state. However, there is a risk
|
systems-manager-automation-runbook-guide-059
|
systems-manager-automation-runbook-guide.pdf
| 59 |
EC2 Instance, which could impact network connectivity. Additionally, if the instance is part of an Auto Scaling group, the runbook may modify the group's configuration, potentially affecting its scaling behavior. • During the containment process, this runbook creates additional resources, such as security groups and AMIs. While these resources are tagged for identification, you should be aware of their creation and ensure proper cleanup or management after the containment process is complete. • If the Action parameter is set to Release, this runbook attempts to restore the Amazon EC2 Instance's configuration to its original state. However, there is a risk that the restoration process may fail, leaving the instance in an inconsistent state. The runbook provides instructions for manual restoration in case of such failures, but you should be prepared to handle potential issues during the restoration process. It is recommended to review the runbook thoroughly, understand its potential impacts, and test it in a non-production environment before executing it in your production environment. AWSSupport-ContainEC2Instance 239 AWS Systems Manager Automation runbook reference User Guide Run this Automation (console) Document type Automation Owner Amazon Platforms / Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • autoscaling:CreateOrUpdateTags • autoscaling:DeleteTags • autoscaling:DescribeAutoScalingGroups • autoscaling:DescribeAutoScalingInstances • autoscaling:DescribeTags • autoscaling:EnterStandby • autoscaling:ExitStandby • autoscaling:UpdateAutoScalingGroup • ec2:AuthorizeSecurityGroupEgress • ec2:AuthorizeSecurityGroupIngress • ec2:CopyImage • ec2:CreateImage • ec2:CreateSecurityGroup • ec2:CreateSnapshot • ec2:CreateTags • ec2:DeleteSecurityGroup AWSSupport-ContainEC2Instance 240 AWS Systems Manager Automation runbook reference User Guide • ec2:DeleteTags • ec2:DescribeImages • ec2:DescribeInstances • ec2:DescribeSecurityGroups • ec2:DescribeSnapshots • ec2:DescribeTags • ec2:ModifyNetworkInterfaceAttribute • ec2:RevokeSecurityGroupEgress • kms:CreateGrant • kms:DescribeKey • kms:GenerateDataKeyWithoutPlaintext • kms:ReEncryptFrom • kms:ReEncryptTo • s3:CreateBucket • s3:DeleteObjectTagging • s3:GetAccountPublicAccessBlock • s3:GetBucketAcl • s3:GetBucketLocation • s3:GetBucketOwnershipControls • s3:GetBucketPolicy • s3:GetBucketPolicyStatus • s3:GetBucketPublicAccessBlock • s3:GetObject • s3:ListBucket • s3:PutAccountPublicAccessBlock • s3:PutBucketPolicy • s3:PutBucketVersioning • s3:PutObject • s3:PutObjectTagging AWSSupport-ContainEC2Instance 241 AWS Systems Manager Automation runbook reference User Guide Example Policy: { "Version": "2012-10-17", "Statement": [ { "Sid": "ReadOperations", "Effect": "Allow", "Action": [ "autoscaling:DescribeAutoScalingGroups", "autoscaling:DescribeAutoScalingInstances", "autoscaling:DescribeTags", "ec2:DescribeImages", "ec2:DescribeInstances", "ec2:DescribeSecurityGroups", "ec2:DescribeSnapshots", "ec2:DescribeTags", "kms:DescribeKey", "s3:GetAccountPublicAccessBlock", "s3:GetBucketAcl", "s3:GetBucketLocation", "s3:GetBucketOwnershipControls", "s3:GetBucketPolicy", "s3:GetBucketPolicyStatus", "s3:GetBucketPublicAccessBlock", "s3:GetObject", "s3:ListBucket" ], "Resource": "*" }, { "Sid": "WriteOperations", "Effect": "Allow", "Action": [ "autoscaling:CreateOrUpdateTags", "autoscaling:DeleteTags", "autoscaling:EnterStandby", "autoscaling:ExitStandby", "autoscaling:UpdateAutoScalingGroup", "ec2:AuthorizeSecurityGroupEgress", "ec2:AuthorizeSecurityGroupIngress", "ec2:CopyImage", "ec2:CreateImage", AWSSupport-ContainEC2Instance 242 AWS Systems Manager Automation runbook reference User Guide "ec2:CreateSecurityGroup", "ec2:CreateSnapshot", "ec2:CreateTags", "ec2:DeleteSecurityGroup", "ec2:DeleteTags", "ec2:ModifyNetworkInterfaceAttribute", "ec2:RevokeSecurityGroupEgress", "kms:CreateGrant", "kms:GenerateDataKeyWithoutPlaintext", "kms:ReEncryptFrom", "kms:ReEncryptTo", "s3:CreateBucket", "s3:DeleteObjectTagging", "s3:PutAccountPublicAccessBlock", "s3:PutBucketPolicy", "s3:PutBucketVersioning", "s3:PutObject", "s3:PutObjectTagging" ], "Resource": "*" } ] } Instructions Follow these steps to configure the automation: 1. Navigate to AWSSupport-ContainEC2Instance in Systems Manager under Documents. 2. Select Execute automation. 3. For the input parameters, enter the following: • AutomationAssumeRole (Optional): • Description: (Optional) The Amazon Resource Name (ARN) of the AWS AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user who starts this runbook. • Type: AWS::IAM::Role::Arn • Action (Required): AWSSupport-ContainEC2Instance 243 AWS Systems Manager Automation runbook reference User Guide • Description: (Required) Select Contain to isolate the Amazon EC2 instance or Restore to try to restore the Amazon EC2 instance configuration original configuration from a previous backup. • Type: String • Allowed Pattern: Contain|Restore • DryRun (Optional): • Description: (Optional) When set to true, the automation will not execute any of the commands, instead it will report on what it would have attempted to do, detailing out each step. Default value: true. • Type: Boolean • Allowed Values: true|false • CreateAMIBackup (Optional): • Description: (Optional) When set to true, an AMI of the Amazon EC2 Instance will be created before performing the containment actions. • Type: Boolean • Allowed Values: true|false • KmsKey (Optional): • Description: (Optional) The ID of the AWS KMS key that will be used to create an encrypted AMI of target Amazon EC2 instance. Default is set to alias/aws/ebs. • Type: String • Allowed Pattern: ^(((arn:(aws|aws-cn|aws-us-gov):kms:([a-z]{2}|[a-z] {2}-gov)-[a-z]+-[0-9]{1}:[0-9]{12}:key/)?([a-f0-9]{8}-[a-f0-9]{4}- [a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|mrk-[a-f0-9]{32}))|(arn:(aws| aws-cn|aws-us-gov):kms:([a-z]{2}|[a-z]{2}-gov)-[a-z]+-[0-9]{1}:[0-9] {12}:)?alias/.{1,})$ • BackupS3BucketName (Conditional): • Description: (Conditional) Amazon Amazon S3 bucket to upload the configuration when Action is Contain or to restore the configuration when Action is Release. Note: If the provided bucket doesn't exist in the account, the automation will create a Amazon S3 bucket on your behalf. • Type: AWS::S3::Bucket::Name • TagIdentifier (Optional): AWSSupport-ContainEC2Instance 244 AWS Systems Manager Automation runbook reference User Guide • Description: (Optional) A tag in the format Key=BatchId,Value=78925 that will be added to the AWS resources created or modified by this runbook during the containment workflow. This tag can be used to identify and manage resources associated during containment process. During the restore workflow, the tag specified by this parameter will be removed from the resources. Note: Tag keys and values are case-sensitive. • Type: String • Allowed Pattern: ^$|^[Kk][Ee][Yy]=[\\+\\-\\=\\.\\_\\:\\/@a-zA-Z0-9] {1,128},[Vv][Aa][Ll][Uu][Ee]=[\\+\\-\\=\\.\\_\\:\\/@a-zA-Z0-9] {0,128}$ • BackupS3BucketAccess (Conditional): • Description: (Conditional) The ARN of the IAM users or roles that will
|
systems-manager-automation-runbook-guide-060
|
systems-manager-automation-runbook-guide.pdf
| 60 |
(Optional): AWSSupport-ContainEC2Instance 244 AWS Systems Manager Automation runbook reference User Guide • Description: (Optional) A tag in the format Key=BatchId,Value=78925 that will be added to the AWS resources created or modified by this runbook during the containment workflow. This tag can be used to identify and manage resources associated during containment process. During the restore workflow, the tag specified by this parameter will be removed from the resources. Note: Tag keys and values are case-sensitive. • Type: String • Allowed Pattern: ^$|^[Kk][Ee][Yy]=[\\+\\-\\=\\.\\_\\:\\/@a-zA-Z0-9] {1,128},[Vv][Aa][Ll][Uu][Ee]=[\\+\\-\\=\\.\\_\\:\\/@a-zA-Z0-9] {0,128}$ • BackupS3BucketAccess (Conditional): • Description: (Conditional) The ARN of the IAM users or roles that will be allowed access to the backup Amazon S3 bucket after running the containment actions. This parameter is required when Action is Contain. The AutomationAssumeRole, or in its absence the user under whose context the automation is running is automatically added to the list. • Type: String • Allowed Pattern: ^$|^arn:(aws|aws-cn|aws-us-gov|aws-iso(-[a-z])?):iam:: [0-9]{12}:(role|user)\\/[\\w+\\/=,.@-]+$ • IngressTrafficRules (Optional): • Description: (Optional) A comma separated map of security group ingress rules with Cidr, IpProtocol, FromPort and ToPort in the format [{"Cidr": "1.2.3.4/32", "IpProtocol": "tcp", "FromPort":"22", "ToPort":"22"}] to be applied to the Amazon EC2 instance. If no rules are provided, a security group without any ingress rules will be attached to the Amazon EC2 instance, effectively isolating it from any incoming traffic. • Type: MapList • Allowed Pattern: ^\\{\\}$|^\\{\"Cidr\":\"[\\x00-\\x7F+]{1,128}\", \"IpProtocol\":\"[\\x00-\\x7F+]{1,128}\",\"FromPort\":\"[\\x00-\\x7F +]{1,128}\",\"ToPort\":\"[\\x00-\\x7F+]{0,255}\"\\} • EgressTrafficRules (Optional): • Description: (Optional) A comma separated map of security group egress rules with Cidr, IpProtocol, FromPort and ToPort in the format [{"Cidr": "1.2.3.4/32", "IpProtocol": "tcp", "FromPort":"22", "ToPort":"22"}] to be applied to the Amazon Amazon EC2 instance. If no rules are provided, a security group without any egress AWSSupport-ContainEC2Instance 245 AWS Systems Manager Automation runbook reference User Guide rules will be attached to the Amazon EC2 instance, effectively preventing all outgoing traffic. • Type: MapList • Allowed Pattern: ^\\{\\}$|^\\{\"Cidr\":\"[\\x00-\\x7F+]{1,128}\", \"IpProtocol\":\"[\\x00-\\x7F+]{1,128}\",\"FromPort\":\"[\\x00-\\x7F +]{1,128}\",\"ToPort\":\"[\\x00-\\x7F+]{0,255}\"\\} • BackupS3KeyName (Optional): • Description: (Optional) If Action is set to Restore, this specifies the Amazon S3 key the automation will use to try to restore the target Amazon EC2 instance configuration. The Amazon S3 key typically follows this format: {year}/{month}/{day}/{hour}/ {minute}/{automation_execution_id}.json. The key can be obtained from the output of a previous containment automation execution. • Type: String • Allowed Pattern: ^[a-zA-Z0-9\\.\\-_\\\\!*'()/]{0,1024}$ 4. Select Execute. 5. The automation initiates. 6. The document performs the following steps: • ValidateRequiredInputs Validates that all required inputs are provided. • AssertInstanceIsNotTerminated Checks if the target Amazon EC2 Instance is not in terminated (deleted). • GetAutoScalingInstanceInfo Gets the Amazon EC2 instance lifecycle and group name if the target Amazon EC2 instance is part of an Auto Scaling group. • CheckBackupS3BucketName Checks if the target Amazon S3 bucket potentially grants read or write public access to its objects. A new Amazon S3 bucket is created if the BackupS3BucketName bucket doesn't exist. • BranchOnActionAndMode AWSSupport-ContainEC2Instance Branches the automation based on the input parameters Action and DryRun. 246 AWS Systems Manager Automation runbook reference User Guide • BranchOnAutoScalingGroupMembership Branches the automation based on if the target Amazon EC2 Instance is part of Auto Scaling group and its lifecycle state. • DescribeAutoScalingGroups Gets and stores the associated Amazon EC2 Auto Scaling group configuration. • ModifyAutoScalingGroup Modifies the associated Amazon EC2 Auto Scaling group configuration for the containment actions, setting the Amazon EC2 instance to the Standby state and adjusting the Auto Scaling group MinSize capacity. • BackupInstanceSecurityGroups Gets and stores the configuration of the target Amazon EC2 Instance security groups. • CreateAllAccessSecurityGroup Creates a temporary security group allowing all ingress traffic that replaces the target Amazon EC2 Instance's security groups. • CreateContainmentSecurityGroup Creates a restrictive containment security group with the specified ingress and egress rules, and replaces the temporary all-access group with it. • BranchOnCreateAMIBackup Branches the automation based on the CreateAMIBackup input parameter. • AssertSourceInstanceRootVolumeIsEbs Checks if the target Amazon EC2 Instance root volume is Amazon EBS. • CreateImage Creates an AMI of the target Amazon EC2 Instance. • RestoreInstanceConfiguration Restores the target Amazon EC2 Instance configuration from the backup. • ReportContain AWSSupport-ContainEC2Instance Outputs dry run details for the containment actions. 247 AWS Systems Manager Automation runbook reference User Guide • ReportRestore Outputs dry run details for the restoring actions. • ReportRestoreFailure Provides instructions to restore the target Amazon EC2 Instance original configuration during a restore workflow failure scenario. • ReportContainmentFailure Provides instructions to restore the target Amazon EC2 Instance original configuration during a containment workflow failure scenario. • FinalOutput Outputs the details of the containment actions. 7. After the execution completes, review the Outputs section for the detailed results of the execution: • FinalOutput.Output Outputs the details of the containment actions performed by this runbook when DryRun is set to False. • RestoreInstanceConfiguration.Output Outputs the restore actions performed by this runbook when DryRun is set to False. • ReportContain.Output Outputs the details of the containment actions performed by
|
systems-manager-automation-runbook-guide-061
|
systems-manager-automation-runbook-guide.pdf
| 61 |
EC2 Instance original configuration during a restore workflow failure scenario. • ReportContainmentFailure Provides instructions to restore the target Amazon EC2 Instance original configuration during a containment workflow failure scenario. • FinalOutput Outputs the details of the containment actions. 7. After the execution completes, review the Outputs section for the detailed results of the execution: • FinalOutput.Output Outputs the details of the containment actions performed by this runbook when DryRun is set to False. • RestoreInstanceConfiguration.Output Outputs the restore actions performed by this runbook when DryRun is set to False. • ReportContain.Output Outputs the details of the containment actions performed by this runbook when DryRun is set to True. • ReportRestore.Output Outputs the details of the restore actions performed by this runbook when DryRun is set to True. • ReportContainmentFailure.Output Provides instructions to restore the target Amazon EC2 Instance original configuration during a containment workflow failure scenario. • ReportRestoreFailure.Output AWSSupport-ContainEC2Instance 248 AWS Systems Manager Automation runbook reference User Guide Provides instructions to restore the target Amazon EC2 Instance original configuration during a restore workflow failure scenario. References Systems Manager Automation • Run this Automation (console) • Running a simple automation • Setting up Automation • Support Automation Workflows AWSSupport-CopyEC2Instance Description The AWSSupport-CopyEC2Instance runbook provides an automated solution for the procedure outlined in the Knowledge Center article How do I move my EC2 instance to another subnet, Availability Zone, or VPC? The automation branches depending on the values you specify for the Region and SubnetId parameters. If you specify a value for the SubnetId parameter but not a value for the Region parameter, the automation creates an Amazon Machine Image (AMI) of the target instance and launches a new instance from the AMI in the subnet you specified. If you specify a value for the SubnetId parameter and the Region parameter, the automation creates an AMI of the target instance, copies the AMI to the AWS Region you specified, and launches a new instance from the AMI in the subnet you specified. If you specify a value for the Region parameter but not a value for the SubnetId parameter, the automation creates an AMI of the target instance, copies the AMI to the Region you specified, and launches a new instance from the AMI in the default subnet of your virtual private cloud (VPC) in the destination Region. If no value is specified for either the Region or SubnetId parameters, the automation creates an AMI of the target instance, and launches a new instance from the AMI in the default subnet of your VPC. AWSSupport-CopyEC2Instance 249 AWS Systems Manager Automation runbook reference User Guide To copy an AMI to a different Region, you must provide a value for the AutomationAssumeRole parameter. If the automation times out during the waitForAvailableDestinationAmi step, the AMI might still be copying. If this is the case, you can wait for the copy to complete and launch the instance manually. Before running this automation, note the following: • AMIs are based on Amazon Elastic Block Store (Amazon EBS) snapshots. For large file systems without a previous snapshot, AMI creation can take several hours. To decrease the AMI creation time, create an Amazon EBS snapshot before you create the AMI. • Creating an AMI doesn't create a snapshot for instance store volumes on the instance. For information about backing up instance store volumes to Amazon EBS, see How do I back up an instance store volume on my Amazon EC2 instance to Amazon EBS? • The new Amazon EC2 instance has a different private IPv4 or public IPv6 IP address. You must update all references to the old IP addresses (for example, in DNS entries) with the new IP addresses that are assigned to the new instance. If you're using an Elastic IP address on your source instance, be sure to attach it to the new instance. • Domain security identifier (SID) conflict issues can occur when the copy launches and tries to contact the domain. Before you capture the AMI, use Sysprep or remove the domain-joined instance from the domain to prevent conflict issues. For more information, see How can I use Sysprep to create and install custom reusable Windows AMIs? Run this Automation (console) Important We do not recommend using this runbook to copy Microsoft Active Directory Domain Controller instances. Document type Automation Owner Amazon Platforms AWSSupport-CopyEC2Instance 250 AWS Systems Manager Automation runbook reference User Guide Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • InstanceId Type: String Description: (Required) The ID of the instance that you want to copy. •
|
systems-manager-automation-runbook-guide-062
|
systems-manager-automation-runbook-guide.pdf
| 62 |
not recommend using this runbook to copy Microsoft Active Directory Domain Controller instances. Document type Automation Owner Amazon Platforms AWSSupport-CopyEC2Instance 250 AWS Systems Manager Automation runbook reference User Guide Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • InstanceId Type: String Description: (Required) The ID of the instance that you want to copy. • KeyPair Type: String Description: (Optional) The key pair you want to associate with the new copied instance. If you're copying the instance to a different Region, make sure the key pair exists in the specified Region. • Region Type: String Description: (Optional) The Region you want to copy the instance to. If you specify a value for this parameter, but do not specify values for the SubnetId and SecurityGroupIds parameters, the automation attempts to launch the instance in the default VPC with the default security group. If EC2-Classic is enabled in the destination Region, the launch will fail. • SubnetId Type: String Description: (Optional) The ID of the subnet you want to copy the instance to. If EC2-Classic is enabled in the destination Region, you must provide a value for this parameter. • InstanceType Type: String AWSSupport-CopyEC2Instance 251 AWS Systems Manager Automation runbook reference User Guide Description: (Optional) The instance type the copied instance should be launched as. If you do not specify a value for this parameter, the source instance type is used. If the source instance type is not supported in the Region the instance is being copied to, the automation fails. • SecurityGroupIds Type: String Description: (Optional) A comma-separated list of security group IDs you want to associate with the copied instance. If you do not specify a value for this parameter, and the instance is not being copied to a different Region, the security groups associated with the source instance are used. If you're copying the instance to a different Region, the default security group for the default VPC in the destination Region is used. • KeepImageSourceRegion Type: Boolean Valid values: true | false Default: true Description: (Optional) If you specify true for this parameter, the automation does not delete the AMI of the source instance. If you specify false for this parameter, the automation deregisters the AMI and deletes the associated snapshots. • KeepImageDestinationRegion Type: Boolean Valid values: true | false Default: true Description: (Optional) If you specify true for this parameter, the automation does not delete the AMI that is copied to the Region you specified. If you specify false for this parameter, the automation deregisters the AMI and deletes the associated snapshots. • NoRebootInstanceBeforeTakingImage Type: Boolean Valid values: true | false AWSSupport-CopyEC2Instance 252 AWS Systems Manager Automation runbook reference User Guide Default: false Description: (Optional) If you specify true for this parameter, the source instance will not be restarted before creating the AMI. When this option is used, file system integrity on the created image can't be guaranteed. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ec2:CreateImage • ec2:DeleteSnapshot • ec2:DeregisterImage • ec2:DescribeInstances • ec2:DescribeImages • ec2:RunInstances If you're copying the instance to a different Region, you will also need the following permissions. • ec2:CopyImage Document Steps • describeOriginalInstanceDetails - Gathers details from the instance to be copied. • assertRootVolumeIsEbs - Checks if the root volume device type is ebs, and if not, ends the automation. • evalInputParameters - Evaluates the values provided for the input parameters. • createLocalAmi - Creates an AMI of the source instance. • tagLocalAmi - Tags the AMI created in the previous step. • branchAssertRegionIsSame - Branches based on whether the instance is being copied within the same Region or to a different Region. • branchAssertSameRegionWithKeyPair - Branches based on whether a value was provided for the KeyPair parameter for an instance that's being copied within the same Region. AWSSupport-CopyEC2Instance 253 AWS Systems Manager Automation runbook reference User Guide • sameRegionLaunchInstanceWithKeyPair - Launches an Amazon EC2 instance from the AMI of the source instance in the same subnet or the subnet you specify using the key pair that you specified. • sameRegionLaunchInstanceWithoutKeyPair - Launches an Amazon EC2 instance from the AMI of the source instance in the same subnet or the subnet you specify without a key pair. • copyAmiToRegion - Copies the AMI to the destination Region. • waitForAvailableDestinationAmi - Waits for the copied AMI state to become available. • destinationRegionLaunchInstance - Launches an Amazon EC2 Instance using the copied AMI. • branchAssertDestinationAmiToDelete - Branches based on the value you provided for the KeepImageDestinationRegion parameter. • deregisterDestinationAmiAndDeleteSnapshots - Deregisters
|
systems-manager-automation-runbook-guide-063
|
systems-manager-automation-runbook-guide.pdf
| 63 |
of the source instance in the same subnet or the subnet you specify using the key pair that you specified. • sameRegionLaunchInstanceWithoutKeyPair - Launches an Amazon EC2 instance from the AMI of the source instance in the same subnet or the subnet you specify without a key pair. • copyAmiToRegion - Copies the AMI to the destination Region. • waitForAvailableDestinationAmi - Waits for the copied AMI state to become available. • destinationRegionLaunchInstance - Launches an Amazon EC2 Instance using the copied AMI. • branchAssertDestinationAmiToDelete - Branches based on the value you provided for the KeepImageDestinationRegion parameter. • deregisterDestinationAmiAndDeleteSnapshots - Deregisters the copied AMI and deletes associated snapshots. • branchAssertSourceAmiTodelete - Branches based on the value you provided for the KeepImageSourceRegion parameter. • deregisterSourceAmiAndDeleteSnapshots - Deregisters the AMI created from the source instance and deletes associated snapshots. • sleep - Sleeps the automation for 2 seconds. This is a terminal step. Outputs sameRegionLaunchInstanceWithKeyPair.InstanceIds sameRegionLaunchInstanceWithoutKeyPair.InstanceIds destinationRegionLaunchInstance.DestinationInstanceId AWSSupport-EnableWindowsEC2SerialConsole Description The runbook AWSSupport-EnableWindowsEC2SerialConsole helps you enable Amazon EC2 Serial Console, Special Admin Console (SAC), and boot menu on your Amazon EC2 Windows instance. With Amazon Elastic Compute Cloud (Amazon EC2) Serial Console feature, you have access to your Amazon EC2 instance's serial port to troubleshoot boot, network configuration, and other issues. The runbook automates the steps required to enable the feature on instances in running state and managed by AWS Systems Manager, as well as ones in stopped state or not managed by AWS Systems Manager. AWSSupport-EnableWindowsEC2SerialConsole 254 AWS Systems Manager Automation runbook reference User Guide How does it work? The AWSSupport-EnableWindowsEC2SerialConsole automation runbook helps to enable SAC and boot menu on Amazon EC2 instances running Microsoft Windows Server. For instances in running state and managed by AWS Systems Manager, the runbook runs an AWS Systems Manager Run Command PowerShell script to enable SAC and boot menu. For instances in stopped state or not managed by AWS Systems Manager, the runbook uses the AWSSupport- StartEC2RescueWorkflow to create a temporary Amazon EC2 instance to perform the required changes offline. For more information see Amazon EC2 Serial Console for Windows instances. Important • If you enable SAC on an instance, the Amazon EC2 services that rely on password retrieval will not work from the Amazon EC2 console. For more information, see Use SAC to troubleshoot your Windows instance. • To configure access to the serial console, you must grant serial console access at the account level and then configure AWS Identity and Access Management (IAM) policies to grant access to your users. You must also configure a password-based user on every instance so that your users can use the serial console for troubleshooting. For more information see Configure access to the Amazon EC2 Serial Console. • To see if the serial console is enabled on your account see View account access status to the serial console. • Serial console access is only supported on virtualized instances built on the Nitro System. For more information, see the Amazon EC2 Serial Console Prerequisites. Document type Automation Owner Amazon Platforms Windows AWSSupport-EnableWindowsEC2SerialConsole 255 AWS Systems Manager Automation runbook reference User Guide Parameters Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "autoscaling:DescribeAutoScalingInstances", "ec2:GetSerialConsoleAccessStatus", "ec2:Describe*", "ec2:createTags", "ec2:createImage", "ssm:DescribeAutomationExecutions", "ssm:DescribeInstanceInformation", "ssm:GetAutomationExecution", "ssm:ListCommandInvocations", "ssm:ListCommands" ], "Resource": "*" }, { "Effect": "Allow", "Action": [ "ec2:AttachVolume", "ec2:DetachVolume", "ec2:ModifyInstanceAttribute", "ec2:RebootInstances", "ec2:StartInstances", "ec2:StopInstances", "iam:GetInstanceProfile", "ssm:GetParameters", "ssm:SendCommand", "ssm:StartAutomationExecution" ], "Resource": [ "arn:${Partition}:ec2:${Region}:${AccountId}:instance/ ${InstanceId}", AWSSupport-EnableWindowsEC2SerialConsole 256 AWS Systems Manager Automation runbook reference User Guide "arn:${Partition}:ec2:${Region}:${AccountId}:volume/ ${VolumeId}", "arn:${Partition}:iam::${AccountId}:instance-profile/ ${InstanceProfileName}", "arn:${Partition}:ssm:${Region}::parameter/aws/service/*", "arn:${Partition}:ssm:${Region}::automation-definition/ AWSSupport-StartEC2RescueWorkflow:*", "arn:${Partition}:ssm:${Region}::document/AWS- ConfigureAWSPackage", "arn:${Partition}:ssm:${Region}::document/AWS- RunPowerShellScript" ] }, { "Effect": "Allow", "Action": [ "cloudformation:CreateStack" ], "Resource": "*", "Condition": { "StringLike": { "aws:RequestTag/Name": "AWSSupport-EC2Rescue: *" }, "ForAllValues:StringEquals": { "aws:TagKeys": [ "AWSSupport-EC2Rescue-AutomationExecution", "Name" ] } } }, { "Effect": "Allow", "Action": [ "cloudformation:DeleteStack", "cloudformation:DescribeStackEvents", "cloudformation:DescribeStackResource", "cloudformation:DescribeStacks", "ec2:AttachVolume", "ec2:DetachVolume", "ec2:RebootInstances", "ec2:StopInstances", "ec2:TerminateInstances", "ssm:SendCommand" AWSSupport-EnableWindowsEC2SerialConsole 257 AWS Systems Manager Automation runbook reference User Guide ], "Resource": "*", "Condition": { "StringLike": { "aws:ResourceTag/Name": "AWSSupport-EC2Rescue: *" } } }, { "Effect": "Allow", "Action": [ "ec2:CreateLaunchTemplate", "ec2:DeleteLaunchTemplate", "ec2:RunInstances" ], "Resource": "*", "Condition": { "ForAnyValue:StringEquals": { "aws:CalledVia": [ "cloudformation.amazonaws.com" ] } } }, { "Effect": "Allow", "Action": [ "iam:PassRole" ], "Resource": "*", "Condition": { "StringLikeIfExists": { "iam:PassedToService": [ "ssm.amazonaws.com", "ec2.amazonaws.com" ] } } } ] } AWSSupport-EnableWindowsEC2SerialConsole 258 AWS Systems Manager Automation runbook reference User Guide Instructions Follow these steps to configure the automation: 1. Navigate to the AWSSupport-EnableWindowsEC2SerialConsole in the AWS Systems Manager console. 2. Select Execute automation. 3. For the input parameters, enter the following: • InstanceId: (Required) The ID of the Amazon EC2 instance that you want to enable Amazon EC2 serial console, (SAC), and boot menu. • AutomationAssumeRole: (Optional) The Amazon Resource Name (ARN) of the IAM role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager
|
systems-manager-automation-runbook-guide-064
|
systems-manager-automation-runbook-guide.pdf
| 64 |
} } } ] } AWSSupport-EnableWindowsEC2SerialConsole 258 AWS Systems Manager Automation runbook reference User Guide Instructions Follow these steps to configure the automation: 1. Navigate to the AWSSupport-EnableWindowsEC2SerialConsole in the AWS Systems Manager console. 2. Select Execute automation. 3. For the input parameters, enter the following: • InstanceId: (Required) The ID of the Amazon EC2 instance that you want to enable Amazon EC2 serial console, (SAC), and boot menu. • AutomationAssumeRole: (Optional) The Amazon Resource Name (ARN) of the IAM role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user who starts this runbook. • HelperInstanceType: (Conditional) The type of Amazon EC2 instance that the runbook provisions to configure Amazon EC2 serial console for an offline instance. • HelperInstanceProfileName: (Conditional) The name of an existing IAM instance profile for the helper instance. If you are enabling SAC and boot menu on an instance that is in stopped state or not managed by AWS Systems Manager, this is required. If an IAM instance profile is not specified, the automation creates one on your behalf. • SubnetId: (Conditional) The subnet ID for a helper instance. By default, it uses the the same subnet where the provided instance resides. Important If you provide a custom subnet, it must be in the same Availability Zone as InstanceId, and it must allow access to the Systems Manager endpoints. This is only required if the target instance is in stopped state or is not managed by AWS Systems Manager. AWSSupport-EnableWindowsEC2SerialConsole 259 AWS Systems Manager Automation runbook reference User Guide • CreateInstanceBackupBeforeScriptExecution: (Optional) Specify True to create an Amazon Machine Images (AMI) backup of the Amazon EC2 instance before enabling SAC and boot menu. The AMI will persist after the automation completes. It is your responsibility to secure access to the AMI or delete it. • BackupAmazonMachineImagePrefix: (Conditional) A prefix for the Amazon Machine Image (AMI) that is created if the CreateInstanceBackupBeforeScriptExecution parameter is set to True. 4. Select Execute. 5. The automation initiates. 6. The document performs the following steps: • CheckIfEc2SerialConsoleAccessEnabled: Checks if Amazon EC2 Serial Console access is enabled at the account level. Note: Access to the serial console is not available by default. For more information see Configure access to the Amazon EC2 Serial Console. • CheckIfEc2InstanceIsWindows: Asserts if the target instance platform is Windows. • GetInstanceType: Retrieves the instance type of the target instance. • CheckIfInstanceTypeIsNitro: Checks if the instance type hypervisor is Nitro-based. Serial Console Access is only supported on virtualized instances built on the Nitro System. • CheckIfInstanceIsInAutoScalingGroup: AWSSupport-EnableWindowsEC2SerialConsole 260 AWS Systems Manager Automation runbook reference User Guide Checks if the Amazon EC2 instance is part of an Amazon EC2 Auto Scaling group by calling the DescribeAutoScalingInstances API. If the instance is part of an Amazon EC2 Auto Scaling group, it ensures that the Porting Assistant for .NET instance is in Standby lifecycle state. • WaitForEc2InstanceStateStablized: Waits for the instance to be in running or stopped state. • GetEc2InstanceState: Gets the current state of the instance. • BranchOnEc2InstanceState: Branches based on the instance state retrieved in the previous step. If that instance state is running, it goes to the CheckIfEc2InstanceIsManagedBySSM step and if not, it goes to the CheckIfHelperInstanceProfileIsProvided step. • CheckIfEc2InstanceIsManagedBySSM: Checks if the instance is managed by AWS Systems Manager. If managed, the runbook enables SAC and boot menu using a PowerShell Run Command. • BranchOnPreEC2RescueBackup: Branches based on the CreateInstanceBackupBeforeScriptExecution input parameter. • CreateAmazonMachineImageBackup: Creates an AMI backup of the instance. • EnableSACAndBootMenu: Enables SAC and boot menu by running a PowerShell Run Command script. • RebootInstance: Reboots the Amazon EC2 instance to apply the configuration. This is the final step if the instance is online and is managed by AWS Systems Manager. • CheckIfHelperInstanceProfileIsProvided: Checks if the HelperInstanceProfileName specified exists before enabling SAC and boot menu offline using a temporary Amazon EC2 instance. AWSSupport-EnableWindowsEC2SerialConsole 261 AWS Systems Manager Automation runbook reference User Guide • RunAutomationToInjectOfflineScriptForEnablingSACAndBootMenu: Runs the AWSSupport-StartEC2RescueWorkflow to enable SAC and boot menu when the instance is in stopped state or not managed by AWS Systems Manager. • GetExecutionDetails: Retrieves Image ID of backup and offline script output. 7. After completed, review the Outputs section for the detailed results of the execution: • EnableSACAndBootMenu.Output: Output of the command execution in the EnableSACAndBootMenu step. • GetExecutionDetails.OfflineScriptOutput: Output of the offline script executed in the RunAutomationToInjectOfflineScriptForEnablingSACAndBootMenu step. • GetExecutionDetails.BackupBeforeScriptExecution: Image ID of the AMI backup taken if CreateInstanceBackupBeforeScriptExecution input parameter is True. Output of execution on an instance that is running and managed by AWS Systems Manager Output of execution on an instance that is stopped or not managed by AWS Systems Manager References Systems Manager Automation • Run this Automation (console) AWSSupport-EnableWindowsEC2SerialConsole 262 AWS Systems Manager Automation runbook reference
|
systems-manager-automation-runbook-guide-065
|
systems-manager-automation-runbook-guide.pdf
| 65 |
7. After completed, review the Outputs section for the detailed results of the execution: • EnableSACAndBootMenu.Output: Output of the command execution in the EnableSACAndBootMenu step. • GetExecutionDetails.OfflineScriptOutput: Output of the offline script executed in the RunAutomationToInjectOfflineScriptForEnablingSACAndBootMenu step. • GetExecutionDetails.BackupBeforeScriptExecution: Image ID of the AMI backup taken if CreateInstanceBackupBeforeScriptExecution input parameter is True. Output of execution on an instance that is running and managed by AWS Systems Manager Output of execution on an instance that is stopped or not managed by AWS Systems Manager References Systems Manager Automation • Run this Automation (console) AWSSupport-EnableWindowsEC2SerialConsole 262 AWS Systems Manager Automation runbook reference User Guide • Run an automation • Setting up an Automation • Support Automation Workflows landing page AWSSupport-ExecuteEC2Rescue Description This runbook uses the EC2Rescue tool to troubleshoot and, where possible, repair common connectivity issues with the specified Amazon Elastic Compute Cloud (Amazon EC2) instance for Linux or Windows Server. Instances with encrypted root volumes are not supported. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • EC2RescueInstanceType Type: String Valid values: t2.small | t2.medium | t2.large AWSSupport-ExecuteEC2Rescue 263 AWS Systems Manager Automation runbook reference User Guide Default: t2.small Description: (Required) The EC2 instance type for the EC2Rescue instance. Recommended size: t2.small • LogDestination Type: String Description: (Optional) Amazon S3 bucket name in your account where you want to upload the troubleshooting logs. Make sure the bucket policy does not grant unnecessary read/write permissions to parties that do not need access to the collected logs. • SubnetId Type: String Default: CreateNewVPC Description: (Optional) The subnet ID for the EC2Rescue instance. By default, AWS Systems Manager Automation creates a new VPC. Alternatively, use SelectedInstanceSubnet to use the same subnet as your instance, or specify a custom subnet ID. Important The subnet must be in the same Availability Zone as UnreachableInstanceId, and it must allow access to the SSM endpoints. • UnreachableInstanceId Type: String Description: (Required) ID of your unreachable EC2 instance. Important Systems Manager Automation stops this instance, and creates an AMI before attempting any operations. Data stored in instance store volumes will be lost. The public IP address will change if you are not using an Elastic IP address. AWSSupport-ExecuteEC2Rescue 264 AWS Systems Manager Automation runbook reference User Guide Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. You must have at least ssm:StartAutomationExecution and ssm:GetAutomationExecution to be able to read the automation output. For more information about the required permissions, see AWSSupport-StartEC2RescueWorkflow. Document Steps 1. aws:assertAwsResourceProperty - Asserts if the provided instance is Windows Server: a. (EC2Rescue for Windows Server) If the provided instance is a Windows Server instance: i. aws:executeAutomation - Invokes AWSSupport-StartEC2RescueWorkflow with the EC2Rescue for Windows Server offline script. ii. aws:executeAwsApi - Retrieves the backup AMI ID from the nested automation. iii. aws:executeAwsApi - Retrieves the EC2Rescue summary from the nested automation. b. (EC2Rescue for Linux) If the provided instance is a Linux instance: i. aws:executeAutomation - Invokes AWSSupport-StartEC2RescueWorkflow with the EC2Rescue for Linux offline scripts ii. aws:executeAwsApi - Retrieves the backup AMI ID from the nested automation. iii. aws:executeAwsApi - Retrieves the EC2Rescue summary from the nested automation. Outputs getEC2RescueForWindowsResult.Output getWindowsBackupAmi.ImageId getEC2RescueForLinuxResult.Output getLinuxBackupAmi.ImageId AWSSupport-ListEC2Resources Description The AWSSupport-ListEC2Resources runbook returns information about Amazon EC2 instances and related resources like Amazon Elastic Block Store (Amazon EBS) volumes, Elastic IP AWSSupport-ListEC2Resources 265 AWS Systems Manager Automation runbook reference User Guide addresses, and Amazon EC2 Auto Scaling groups from the AWS Regions you specify. By default, the information is gathered from all Regions and is displayed in the output of the automation. Optionally, you can specify an Amazon Simple Storage Service (Amazon S3) bucket for the information to be uploaded to as a comma-separated values (.csv) file. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • BucketName Type: String Description: (Optional) The name of the S3 bucket where the information gathered is uploaded to. • DisplayResourceDeletionDocumentation Type: String Default: true AWSSupport-ListEC2Resources 266 AWS Systems Manager Automation runbook reference User Guide Description: (Optional) If set to true, the automation creates links in the output to documentation related to deleting your resources. • RegionsToQuery Type: String Default: All Description: (Optional) The Regions you want
|
systems-manager-automation-runbook-guide-066
|
systems-manager-automation-runbook-guide.pdf
| 66 |
Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • BucketName Type: String Description: (Optional) The name of the S3 bucket where the information gathered is uploaded to. • DisplayResourceDeletionDocumentation Type: String Default: true AWSSupport-ListEC2Resources 266 AWS Systems Manager Automation runbook reference User Guide Description: (Optional) If set to true, the automation creates links in the output to documentation related to deleting your resources. • RegionsToQuery Type: String Default: All Description: (Optional) The Regions you want to gather Amazon EC2 related information from. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • autoscaling:DescribeAutoScalingGroups • ec2:DescribeAddresses • ec2:DescribeImages • ec2:DescribeInstances • ec2:DescribeNetworkInterfaces • ec2:DescribeRegions • ec2:DescribeVolumes • ec2:DescribeSnapshots • elasticloadbalancing:DescribeLoadBalancers Additionally, to successfully upload the information gathered to the S3 bucket you specify, the AutomationAssumeRole requires the following actions: • s3:GetBucketAcl • s3:GetBucketPolicyStatus • s3:PutObject Document Steps • aws:executeAwsApi - Gathers the Regions enabled for the account. AWSSupport-ListEC2Resources 267 AWS Systems Manager Automation runbook reference User Guide • aws:executeScript - Confirms the Regions enabled for the account support the Regions specified in the RegionsToQuery parameter. • aws:branch - If no Regions are enabled for the account, the automation ends. • aws:executeScript - Lists all EC2 instances for the account and Regions you specify. • aws:executeScript - Lists all Amazon Machine Images (AMI) for the account and Regions you specify. • aws:executeScript - Lists all EBS volumes for the account and Regions you specify. • aws:executeScript - Lists all Elastic IP addresses for the account and Regions you specify. • aws:executeScript - Lists all elastic network interfaces for the account and Regions you specify. • aws:executeScript - Lists all Auto Scaling groups for the account and Regions you specify. • aws:executeScript - Lists all load balancers for the account and Regions you specify. • aws:executeScript - Uploads the information gathered to the S3 bucket specified if you provide a value for the Bucket parameter. AWSSupport-ManageRDPSettings Description The AWSSupport-ManageRDPSettings runbook allows the user to manage common Remote Desktop Protocol (RDP) settings, such as the RDP port and Network Layer Authentication (NLA). By default, the runbook reads and outputs the values of the settings. Important Changes to the RDP settings should be carefully reviewed before running this runbook. Run this Automation (console) Document type Automation Owner AWSSupport-ManageRDPSettings 268 AWS Systems Manager Automation runbook reference User Guide Amazon Platforms Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • InstanceId Type: String Description: (Required) The ID of the managed instance to manage the RDP settings of. • NLASettingAction Type: String Valid values: Check | Enable | Disable Default: Check Description: (Required) An action to perform on the NLA setting: Check, Enable, Disable. • RDPPort Type: String Default: 3389 Description: (Optional) Specify the new RDP port. Used only when the action is set to Modify. The port number must be between 1025-65535. Note: After the port is changed, the RDP service is restarted. • RDPPortAction AWSSupport-ManageRDPSettings 269 AWS Systems Manager Automation runbook reference User Guide Type: String Valid values: Check | Modify Default: Check Description: (Required) An action to apply to the RDP port. • RemoteConnections Type: String Valid values: Check | Enable | Disable Default: Check Description: (Required) An action to perform on the fDenyTSConnections setting. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. The EC2 instance receiving the command must have an IAM role with the AmazonSSMManagedInstanceCore Amazon managed policy attached. The user must have at least ssm:SendCommand to send the command to the instance, plus ssm:GetCommandInvocation to be able to read the command output. Document Steps aws:runCommand - Run the PowerShell script to change or check the RDP settings on the target instance. Outputs manageRDPSettings.Output AWSSupport-ManageWindowsService Description AWSSupport-ManageWindowsService 270 AWS Systems Manager Automation runbook reference User Guide The AWSSupport-ManageWindowsService runbook enables you to stop, start, restart, pause, or disable any Windows service on the target instance. Run this Automation (console) Document type Automation Owner Amazon Platforms Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • InstanceId Type: String Description: (Required) The ID of the managed instance to manage the services of. • ServiceAction Type: String Valid values: Check
|
systems-manager-automation-runbook-guide-067
|
systems-manager-automation-runbook-guide.pdf
| 67 |
to stop, start, restart, pause, or disable any Windows service on the target instance. Run this Automation (console) Document type Automation Owner Amazon Platforms Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • InstanceId Type: String Description: (Required) The ID of the managed instance to manage the services of. • ServiceAction Type: String Valid values: Check | Restart | Force-Restart | Start | Stop | Force-Stop | Pause Default: Check Description: (Required) An action to apply to the Windows service. Note that Force-Restart and Force-Stop can be used to restart and to stop a service that has dependent services. • StartupType AWSSupport-ManageWindowsService 271 AWS Systems Manager Automation runbook reference User Guide Type: String Valid values: Check | Auto | Demand | Disabled | DelayedAutoStart Default: Check Description: (Required) A startup type to apply to the Windows service. • WindowsServiceName Type: String Description: (Required) A valid Windows service name. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. It is recommended that the EC2 instance receiving the command has an IAM role with the AmazonSSMManagedInstanceCore Amazon managed policy attached. The user must have at least ssm:StartAutomationExecution and ssm:SendCommand to run the automation and send the command to the instance, plus ssm:GetAutomationExecution to be able to read the automation output. Document Steps aws:runCommand - Run the PowerShell script to apply the desired configuration to the Windows service on the target instance. Outputs manageWindowsService.Output AWSSupport-MigrateEC2ClassicToVPC Description The AWSSupport-MigrateEC2ClassicToVPC runbook migrates an Amazon Elastic Compute Cloud (Amazon EC2) instance from EC2-Classic to a virtual private cloud (VPC). This runbook supports migrating Amazon EC2 instances of the hardware virtual machine (HVM) virtualization type with Amazon Elastic Block Store (Amazon EBS) root volumes. AWSSupport-MigrateEC2ClassicToVPC 272 AWS Systems Manager Automation runbook reference User Guide Run this Automation (console) Document type Automation Owner Amazon Platforms Linux Parameters • AutomationAssumeRole Type: String Description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. • ApproverIAM Type: StringList Description: (Optional) The Amazon Resource Names (ARNs) of IAM users who can approve or deny the action. This parameter only applies if you specify the CutOver value for the MigrationType parameter. • DestinationSecurityGroupId Type: StringList Description: (Optional) The ID of the security group that you want to associate with the Amazon EC2 instance that is launched in your VPC. If you don't specify a value for this parameter, the automation creates a security group in your VPC and copies the rules from the security group in EC2-Classic. If the rules fail to copy to the new security group, the default security group of your VPC is associated with the Amazon EC2 instance. • DestinationSubnetId AWSSupport-MigrateEC2ClassicToVPC 273 AWS Systems Manager Automation runbook reference User Guide Type: String Description: (Optional) The ID of the subnet that you want to migrate your Amazon EC2 instance to. If you do not specify a value for this parameter, the automation randomly chooses a subnet from your VPC. • InstanceId Type: String Description: (Required) The ID of the Amazon EC2 instance that you want to migrate. • MigrationType Type: String Valid values: CutOver | Test Description: (Required) The type of migration that you want to perform. The CutOver option requires approval to stop your Amazon EC2 instance that's running in EC2- Classic. After this action is approved, the Amazon EC2 instance is stopped and the automation creates an Amazon Machine Image (AMI). When the AMI status is available, a new Amazon EC2 instance is launched from this AMI in the DestinationSubnetId you specify in your VPC. If your Amazon EC2 instance that's running in EC2-Classic has an Elastic IP address attached, the instance will be moved to the newly created Amazon EC2 instance in your VPC. If the Amazon EC2 instance launching in your VPC fails to create for any reason, it is terminated and approval is requested to start your Amazon EC2 instance in EC2-Classic. The Test option creates an AMI of your Amazon EC2 instance that's running in EC2-Classic without rebooting. Because the Amazon EC2 instance does not reboot, we can't guarantee the file system integrity of the created image. When the AMI status is available, a new Amazon EC2 instance is launched from this AMI in the DestinationSubnetId that you specify in your VPC. If your Amazon EC2 instance that's running in EC2-Classic has an Elastic IP address attached, the automation verifies that the DestinationSubnetId you specify is public. If the Amazon EC2 instance launching in your VPC
|
systems-manager-automation-runbook-guide-068
|
systems-manager-automation-runbook-guide.pdf
| 68 |
Amazon EC2 instance in EC2-Classic. The Test option creates an AMI of your Amazon EC2 instance that's running in EC2-Classic without rebooting. Because the Amazon EC2 instance does not reboot, we can't guarantee the file system integrity of the created image. When the AMI status is available, a new Amazon EC2 instance is launched from this AMI in the DestinationSubnetId that you specify in your VPC. If your Amazon EC2 instance that's running in EC2-Classic has an Elastic IP address attached, the automation verifies that the DestinationSubnetId you specify is public. If the Amazon EC2 instance launching in your VPC fails to create for any reason, it is terminated and the automation ends. • SNSNotificationARNforApproval Type: String AWSSupport-MigrateEC2ClassicToVPC 274 AWS Systems Manager Automation runbook reference User Guide Description: (Optional) The ARN of the Amazon Simple Notification Service (Amazon SNS) topic that you want to send approval requests to. This parameter only applies if you specify the CutOver value for the MigrationType parameter. • TargetInstanceType Type: String Default: t2.2xlarge Description: (Optional) The type of Amazon EC2 instance that you want to launch in your VPC. Only Xen-based instance types, such as T2, M4, or C4, are supported. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:GetDocument • ssm:ListDocumentVersions • ssm:ListDocuments • ssm:StartAutomationExecution • sns:GetTopicAttributes • sns:ListSubscriptions • sns:ListTopics • sns:Publish • ec2:AssociateAddress • ec2:AuthorizeSecurityGroupIngress • ec2:CreateImage • ec2:CreateSecurityGroup • ec2:DeleteSecurityGroup • ec2:MoveAddressToVpc • ec2:RunInstances • ec2:StopInstances • ec2:CreateTags AWSSupport-MigrateEC2ClassicToVPC 275 AWS Systems Manager Automation runbook reference User Guide • ec2:DescribeAddresses • ec2:DescribeInstanceAttribute • ec2:DescribeInstances • ec2:DescribeInstanceStatus • ec2:DescribeRouteTables • ec2:DescribeSecurityGroupReferences • ec2:DescribeSecurityGroups • ec2:DescribeSubnets • ec2:DescribeTags • ec2:DescribeVpcs • ec2:DescribeInstanceTypes • ec2:DescribeImages Document Steps • aws:executeAwsApi - Gathers details about the Amazon EC2 instance that you specify in the InstanceId parameter. • aws:assertAwsResourceProperty - Confirms the instance type that you specify in the TargetInstanceType parameter is Xen-based. • aws:assertAwsResourceProperty - Confirms the Amazon EC2 instance that you specify in the InstanceId parameter is of the HVM virtualization type. • aws:assertAwsResourceProperty - Confirms the Amazon EC2 instance that you specify in the InstanceId parameter has an Amazon EBS root volume. • aws:executeScript - Creates a security group as needed depending on the value that you specify for the DestinationSecurityGroupId parameter. • aws:branch - Branches based on the value that you specify in the DestinationSubnetId parameter. • aws:executeAwsApi - Identifies the default VPC in the AWS Region where you run this automation. • aws:executeAwsApi - Randomly chooses the ID of a subnet located in the default VPC. • aws:createImage - Creates an AMI without rebooting the Amazon EC2 instance. • aws:branch - Branches based on the value that you specify for the MigrationType parameter. AWSSupport-MigrateEC2ClassicToVPC 276 AWS Systems Manager Automation runbook reference User Guide • aws:branch - Branches based on the value that you specify for the DestinationSubnetId parameter. • aws:runInstances - Launches a new instance from the AMI created without rebooting the Amazon EC2 instance in EC2-Classic. • aws:changeInstanceState - Terminates the newly launched Amazon EC2 instance if the previous step fails for any reason. • aws:runInstances - Launches a new instance from the AMI created without rebooting the Amazon EC2 instance in EC2-Classic in the DestinationSubnetId if provided. • aws:changeInstanceState - Terminates the newly launched Amazon EC2 instance if the previous step fails for any reason. • aws:assertAwsResourceProperty - Confirms the stop behavior for the Amazon EC2 instance running in EC2-Classic. • aws:approve - Waits for approval to stop the Amazon EC2 instance. • aws:changeInstanceState - Stops the Amazon EC2 instance running in EC2-Classic. • aws:changeInstanceState - Force stops the Amazon EC2 instance running in EC2-Classic if needed. • aws:createImage - Creates an AMI of the Amazon EC2 instance after it has stopped. • aws:branch - Branches based on the value specified for the DestinationSubnetId parameter. • aws:runInstances - Launches a new instance from the AMI created of the stopped Amazon EC2 instance in EC2-Classic. • aws:approve - Waits for approval to terminate the newly launched instance and starts the Amazon EC2 instance in EC2-Classic if the previous step fails for any reason. • aws:changeInstanceState - Terminates the newly launched Amazon EC2 instance. • aws:runInstances - Launches a new instance from the AMI created of the stopped Amazon EC2 instance in EC2-Classic from the DestinationSubnetId parameter. • aws:approve - Waits for approval to terminate the newly launched instance and starts the Amazon EC2 instance in EC2-Classic if the previous step fails for any reason. • aws:changeInstanceState - Terminates the newly launched Amazon EC2 instance. • aws:changeInstanceState - Starts the Amazon EC2 instance that was stopped in EC2-Classic. • aws:branch - Branches based on whether the Amazon EC2 instance has a public IP address. • aws:executeAwsApi - Verifies whether the public IP address is an Elastic IP address. AWSSupport-MigrateEC2ClassicToVPC 277 AWS Systems Manager Automation
|
systems-manager-automation-runbook-guide-069
|
systems-manager-automation-runbook-guide.pdf
| 69 |
created of the stopped Amazon EC2 instance in EC2-Classic from the DestinationSubnetId parameter. • aws:approve - Waits for approval to terminate the newly launched instance and starts the Amazon EC2 instance in EC2-Classic if the previous step fails for any reason. • aws:changeInstanceState - Terminates the newly launched Amazon EC2 instance. • aws:changeInstanceState - Starts the Amazon EC2 instance that was stopped in EC2-Classic. • aws:branch - Branches based on whether the Amazon EC2 instance has a public IP address. • aws:executeAwsApi - Verifies whether the public IP address is an Elastic IP address. AWSSupport-MigrateEC2ClassicToVPC 277 AWS Systems Manager Automation runbook reference User Guide • aws:branch - Branches based on the value that you specify in the MigrationType parameter. • aws:executeAwsApi - Moves the Elastic IP address to your VPC. • aws:executeAwsApi - Gathers the allocation ID of the Elastic IP address that was moved to your VPC. • aws:branch - Branches based on which subnet the Amazon EC2 instance running in your VPC was launched. • aws:executeAwsApi - Attaches the Elastic IP address to the newly launched instance in your VPC. • aws:executeScript - Confirms the subnet your newly launched Amazon EC2 instance running in your VPC is public. Outputs getInstanceProperties.virtualizationType - The virtualization type of the Amazon EC2 instance running in EC2-Classic. getInstanceProperties.rootDeviceType - The root device type of the Amazon EC2 instance running in EC2-Classic. createAMIWithoutReboot.ImageId - The ID of the AMI created without rebooting the Amazon EC2 instance running in EC2-Classic. getDefaultVPC.VpcId - The ID of the default VPC where the new Amazon EC2 instance is launched if a value for the DestinationSubnetId parameter is not provided. getSubnetIdinDefaultVPC.subnetIdFromDefaultVpc - The ID of the subnet in the default VPC where the new Amazon EC2 instance is launched if a value for the DestinationSubnetId parameter is not provided. launchTestInstanceDefaultVPC.InstanceIds - The ID of the newly launched Amazon EC2 instance in your default VPC during the Test migration type. launchTestInstanceProvidedSubnet.InstanceIds - The ID of the newly launched Amazon EC2 instance in the DestinationSubnetId that you specified during the Test migration type. createAMIAfterStoppingInstance.ImageId - The ID of the AMI created after stopping the Amazon EC2 instance running in EC2-Classic. AWSSupport-MigrateEC2ClassicToVPC 278 AWS Systems Manager Automation runbook reference User Guide launchCutOverInstanceProvidedSubnet.InstanceIds - The ID of the newly launched Amazon EC2 instance in the DestinationSubnetId that you specified during the CutOver migration type. launchCutOverInstanceDefaultVPC.InstanceIds - The ID of the newly launched Amazon EC2 instance in your default VPC during the CutOver migration type. verifySubnetIsPublicTestDefaultVPC.IsSubnetPublic - Whether the subnet chosen by the automation in your default VPC is public. verifySubnetIsPublicTestProvidedSubnet.IsSubnetPublic - Whether the subnet you specified in the DestinationSubnetId is public. AWSSupport-MigrateXenToNitroLinux Description The AWSSupport-MigrateXenToNitroLinux runbook clones, prepares, and migrates an Amazon Elastic Compute Cloud (Amazon EC2) Linux Xen instance to a Nitro instance type. This runbook provide two options for operation types: • Clone&Migrate – This option’s workflow consists of the Preliminary Checks, Testing, and Clone&Migrate phases. The workflow is run using the AWSSupport- CloneXenEC2InstanceAndMigrateToNitro runbook. • FullMigration – This option runs the Clone&Migrate workflow and then performs the additional step of Replace root Amazon EBS volumes. Important Using this runbook incurs costs to your account for the running time of Amazon EC2 instances, creation of Amazon Elastic Block Store (Amazon EBS) volumes, and AMIs. For more details, see Amazon EC2 Pricing and Amazon EBS Pricing. Preliminary checks The automation performs the following preliminary checks before continuing with the migration. If any of the checks fail, the automation ends. This phase is only part of the Clone&Migrate workflow. AWSSupport-MigrateXenToNitroLinux 279 AWS Systems Manager Automation runbook reference User Guide • Checks if the target instance is already a Nitro instance type. • Checks if the Spot Instances purchasing option was used for the target instance. • Checks if instance store volumes are attached to the target instance. • Verifies the target instance operating system (OS) is Linux. • Checks if the target instance is a part of an Amazon EC2 Auto Scaling group. If it is part of an Auto Scaling group, the automation verifies that the instance is in the standby state. • Verifies that the instance is managed by AWS Systems Manager. Testing The automation creates an Amazon Machine Image (AMI) from the target instance and launches a test instance from the newly created AMI. This phase is part of only the Clone&Migrate workflow. If the test instance passes all status checks, the automation pauses and approval from the designated principals is requested through Amazon Simple Notification Service (Amazon SNS) notification. If approval is provided, the automation terminates the test instance, stops the target instance, and continues with the migration, while the newly created AMI is deregistered at the end of the Clone&Migrate workflow. Note Before providing approval, we recommend verifying that all applications running on the target instance have been
|
systems-manager-automation-runbook-guide-070
|
systems-manager-automation-runbook-guide.pdf
| 70 |
from the target instance and launches a test instance from the newly created AMI. This phase is part of only the Clone&Migrate workflow. If the test instance passes all status checks, the automation pauses and approval from the designated principals is requested through Amazon Simple Notification Service (Amazon SNS) notification. If approval is provided, the automation terminates the test instance, stops the target instance, and continues with the migration, while the newly created AMI is deregistered at the end of the Clone&Migrate workflow. Note Before providing approval, we recommend verifying that all applications running on the target instance have been closed gracefully. Clone and Migrate The automation creates another AMI from the target instance, and launches a new instance to change to a Nitro instance type. The automation completes the following prerequisites before continuing with the migration. If any of the checks fail, the automation ends. This phase is also only part of the Clone&Migrate workflow. • Turns on the enhanced networking (ENA) attribute. • Installs the latest version of ENA drivers if they're not already installed, or updates the ENA drivers version to the latest version. To ensure maximum network performance, updating to the latest ENA driver version is required if the Nitro instance type is the 6th generation. AWSSupport-MigrateXenToNitroLinux 280 AWS Systems Manager Automation runbook reference User Guide • Verifies that the NVMe module is installed. If the module is installed, the automation verifies that the module is loaded in initramfs. • Analyzes /etc/fstab and replaces entries with block device names (/dev/sd* or /dev/ xvd*) with their respective UUIDs. Before modifying the configuration, the automation creates a backup of the file at the path /etc/fstab*. • Turns off predictable interface naming by adding the net.ifnames=0 option to the GRUB_CMDLINE_LINUX line in the /etc/default/grub file if it exists, or to the kernel in / boot/grub/menu.lst. • Removes the /etc/udev/rules.d/70-persistent-net.rules file if it exists. Before removing the file, the automation creates a backup of the file at the path /etc/udev/ rules.d/. After verifying all requirements, the instance type is changed to the Nitro instance type that you specify. The automation waits for the newly created instance to pass all status checks after starting as a Nitro instance type. The automation then waits for approval from the designated principals to create an AMI of the successfully launched Nitro instance. If approval is denied, the automation ends, leaving the newly created instance running, and the target instance remains stopped. Replace root Amazon EBS Volume If you choose FullMigration as the OperationType, the automation migrates the target Amazon EC2 instance to the Nitro instance type that you specify. Automation requests approval from designated principals to replace the root Amazon EBS volume of the target Amazon EC2 instance with the cloned Amazon EC2 instance's root volume. After the migration is successful, the cloned Amazon EC2 instance is terminated. If the automation fails, the original Amazon EBS root volume is attached to the target Amazon EC2 instance. If the root Amazon EBS volume attached to the target Amazon EC2 instance has tags with the aws: prefix applied, the FullMigration operation isn't supported. Before you begin The target instance must have outbound internet access. This is to access repositories for drivers and dependencies like kernel-devel, gcc, patch, rpm-build, wget, dracut, make, linux-headers, and unzip. Package manager is used if needed. An Amazon SNS topic is required to send notifications for approvals and updates. For more information about creating an Amazon SNS topic, see Creating an Amazon SNS topic in the Amazon Simple Notification Service Developer Guide. AWSSupport-MigrateXenToNitroLinux 281 AWS Systems Manager Automation runbook reference User Guide This runbook supports the following operating systems: • RHEL 7.x - 8.5 • Amazon Linux (2018.03), Amazon Linux 2 • Debian Server • Ubuntu Server 18.04 LTS, 20.04 LTS, and 20.10 STR • SUSE Linux Enterprise Server (SUSE12SP5, SUSE15SP2) Run this Automation (console) Document type Automation Owner Amazon Platforms Linux Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • Acknowledgement Type: String Description: (Required) Read the complete details of the actions performed by this automation runbook, and enter Yes, I understand and acknowledge to proceed with using the runbook. AWSSupport-MigrateXenToNitroLinux 282 AWS Systems Manager Automation runbook reference User Guide • ApproverIAM Type: String Description: (Required) The ARNs of IAM roles, users, or user names who can provide approvals to the automation. You can specify a maximum of 10 approvers. • DeleteResourcesOnFailure Type: Boolean Description: (Optional) Determines whether the newly created instance and AMI for the migration are deleted if the automation fails. Valid values: True | False
|
systems-manager-automation-runbook-guide-071
|
systems-manager-automation-runbook-guide.pdf
| 71 |
runbook. • Acknowledgement Type: String Description: (Required) Read the complete details of the actions performed by this automation runbook, and enter Yes, I understand and acknowledge to proceed with using the runbook. AWSSupport-MigrateXenToNitroLinux 282 AWS Systems Manager Automation runbook reference User Guide • ApproverIAM Type: String Description: (Required) The ARNs of IAM roles, users, or user names who can provide approvals to the automation. You can specify a maximum of 10 approvers. • DeleteResourcesOnFailure Type: Boolean Description: (Optional) Determines whether the newly created instance and AMI for the migration are deleted if the automation fails. Valid values: True | False Default: True • MinimumRequiredApprovals Type: String Description: (Optional) The minimum number of approvals required to continue running the automation when approvals are requested. Valid values: 1-10 Default: 1 • NitroInstanceType Type: String Description: (Required) The Nitro instance type that you want to change the instance to. Supported instance types include M5, M6, C5, C6, R5, R6, and T3. Default: m5.xlarge • OperationType Type: String Description: (Required) The operation that you want to perform. The FullMigration option performs the same tasks as Clone&Migrate and additionally replaces the root volume of your target instance. The root volume of the target instance is replaced with the root volume from the AWSSupport-MigrateXenToNitroLinux 283 AWS Systems Manager Automation runbook reference User Guide newly created instance following the migration process. The FullMigration operation does not support root volumes defined by Logical Volume Manager (LVM). Valid values: Clone&Migrate | FullMigration • SNSTopicArn Type: String Description: (Required) The ARN of the Amazon SNS topic for approval notification. The Amazon SNS topic is used to send required approval notifications during the automation. • TargetInstanceId Type: String Description: (Required) The ID of the Amazon EC2 instances to migrate. Clone&Migrate workflow Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:DescribeAutomationExecutions • ssm:StartAutomationExecution • ssm:DescribeInstanceInformation • ssm:DescribeAutomationStepExecutions • ssm:SendCommand • ssm:GetAutomationExecution • ssm:ListCommands • ssm:ListCommandInvocations • ec2:DescribeInstances • ec2:DescribeInstanceTypeOfferings • ec2:DescribeInstanceTypes • ec2:DescribeImages • ec2:CreateImage AWSSupport-MigrateXenToNitroLinux 284 AWS Systems Manager Automation runbook reference User Guide • ec2:RunInstances • ec2:DescribeInstanceStatus • ec2:DeregisterImage • ec2:DeleteSnapshot • ec2:TerminateInstances • ec2:StartInstances • ec2:DescribeKeyPairs • ec2:StopInstances • kms:CreateGrant* • kms:ReEncrypt • ec2:ModifyInstanceAttribute • autoscaling:DescribeAutoScalingInstances • iam:passRole • iam:ListRoles Document Steps • startOfPreliminaryChecksBranch - Branches to the Preliminary checks workflow. • getTargetInstanceProperties - Gathers details from the target instance. • checkIfNitroInstanceTypeIsSupportedInAZ - Determines if the target Amazon EC2 instance type is supported in the same Availability Zone as the target instance. • getXenInstanceTypeDetails - Gathers details about the source instance type. • checkIfInstanceHypervisorIsNitroAlready - Checks if the target instance is already running as a Nitro instance type. • checkIfTargetInstanceLifecycleIsSpot - Checks if the purchasing option of the target instance is Spot. • checkIfOperatingSystemIsLinux - Checks if the target instance OS is Linux. • verifySSMConnectivityForTargetInstance - Verifies that the target instance is managed by Systems Manager. • checkIfEphemeralVolumeAreSupported - Checks if the current instance type of the target instance supports instance store volumes. AWSSupport-MigrateXenToNitroLinux 285 AWS Systems Manager Automation runbook reference User Guide • verifyIfTargetInstanceHasEphemeralVolumesAttached - Checks if the target instance has instance store volumes attached. • checkIfRootVolumeIsEBS - Checks if the target instance's root volume type is EBS. • checkIfTargetInstanceIsInASG - Checks if the target instance is a part of an Auto Scaling group. • endOfPreliminaryChecksBranch - End of the Preliminary checks branch. • startOfTestBranch - Branches to the Testing workflow. • createTestImage - Creates a test AMI of the target instance. • launchTestInstanceInSameSubnet - Launches a test instance from the test AMI using the same configuration as target instance. • cleanupTestInstance - Terminates the test instance. • endOfTestBranch - End of the Testing branch. • checkIfTestingBranchSucceeded - Checks the status of the Testing branch. • approvalToStopTargetInstance - Waits for approval from the designated principals to stop the target instance. • stopTargetEC2Instance - Stops the target instance. • forceStopTargetEC2Instance - Force stops the target instance only if the previous step fails to stop the instance. • startOfCloneAndMigrateBranch - Branches to the Clone&Migrate workflow. • createBackupImage - Creates an AMI of the target instance to serve as a backup. • launchInstanceInSameSubnet - Launches a new instance from the backup AMI using the same configuration as the source instance. • waitForClonedInstanceToPassStatusChecks - Waits for the newly created instance to pass all status checks. • verifySSMConnectivityForClonedInstance - Verifies that the newly created instance is managed by Systems Manager. • checkAndInstallENADrivers - Checks if ENA drivers are installed on the newly created instance, and installs the drivers if needed. • checkAndAddNVMEDrivers - Checks if NVMe drivers are installed on the newly created instance, and installs the drivers if needed. • checkAndModifyFSTABEntries - Checks if device names are used in /etc/fstab and replaces them with UUIDs if needed. AWSSupport-MigrateXenToNitroLinux 286 AWS Systems Manager Automation runbook reference User Guide • stopClonedInstance - Stops the newly created
|
systems-manager-automation-runbook-guide-072
|
systems-manager-automation-runbook-guide.pdf
| 72 |
Waits for the newly created instance to pass all status checks. • verifySSMConnectivityForClonedInstance - Verifies that the newly created instance is managed by Systems Manager. • checkAndInstallENADrivers - Checks if ENA drivers are installed on the newly created instance, and installs the drivers if needed. • checkAndAddNVMEDrivers - Checks if NVMe drivers are installed on the newly created instance, and installs the drivers if needed. • checkAndModifyFSTABEntries - Checks if device names are used in /etc/fstab and replaces them with UUIDs if needed. AWSSupport-MigrateXenToNitroLinux 286 AWS Systems Manager Automation runbook reference User Guide • stopClonedInstance - Stops the newly created instance. • forceStopClonedInstance - Force stops the newly created instance only if the previous step fails to stop the instance. • checkENAAttributeForClonedInstance - Checks if the enhanced networking attribute is turned on for the newly created instance. • setNitroInstanceTypeForClonedInstance - Changes the instance type for the newly created instance to the Nitro instance type that you specify. • startClonedInstance - Starts the newly created instance whose instance type you changed. • approvalForCreatingImageAfterDriversInstallation - If the instance successfully starts as a Nitro instance type, the automation waits for approval from the required principals. If approval is provided, an AMI is created to be used as a Golden AMI. • createImageAfterDriversInstallation - Creates an AMI to be used as a Golden AMI. • endOfCloneAndMigrateBranch - End of Clone&Migrate branch. • cleanupTestImage - Deregisters the AMI created for testing. • failureHandling - Checks if you chose to terminate resources on failure. • onFailureTerminateClonedInstance - Terminates the newly created instance if the automation fails. • onFailurecleanupTestImage - Deregisters the AMI created for testing. • onFailureApprovalToStartTargetInstance - If the automation fails, waits for approval from the designated principals to start the target instance. • onFailureStartTargetInstance - If the automation fails, starts the target instance. FullMigration workflow Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:DescribeAutomationExecutions • ssm:DescribeInstanceInformation • ssm:DescribeAutomationStepExecutions • ssm:SendCommand AWSSupport-MigrateXenToNitroLinux 287 AWS Systems Manager Automation runbook reference User Guide • ssm:GetAutomationExecution • ssm:ListCommands • ssm:ListCommandInvocations • ec2:DescribeInstances • ec2:DescribeInstanceTypeOfferings • ec2:DescribeInstanceTypes • ec2:DescribeImages • ec2:CreateImage • ec2:RunInstances • ec2:DescribeInstanceStatus • ec2:DeregisterImage • ec2:DeleteSnapshot • ec2:TerminateInstances • ec2:StartInstances • ec2:DescribeKeyPairs • ec2:StopInstances • kms:CreateGrant* • kms:ReEncrypt • ec2:ModifyInstanceAttribute • ec2:DetachVolume • ec2:AttachVolume • ec2:DescribeVolumes • autoscaling:DescribeAutoScalingInstances • iam:PassRole • ec2:CreateTags • cloudformation:DescribeStackResources Document Steps The FullMigration workflow runs the same steps as the Clone&Migrate workflow and additionally performs the following steps: AWSSupport-MigrateXenToNitroLinux 288 AWS Systems Manager Automation runbook reference User Guide • checkConcurrency - Verifies that there is only one automation of this runbook targeting the Amazon EC2 instance that you specify. If the runbook finds another automation in progress targeting the same instance, the automation ends. • getTargetInstanceProperties - Gathers details from the target instance. • checkRootVolumeTags - Determines if the root volume of the target Amazon EC2 instance contains any AWS reserved tags. • cloneTargetInstanceAndMigrateToNitro - Starts a child automation using the AWS- CloneXenInstanceToNitro runbook. • branchOnTheOperationType - Branches on the value that you specify for the OperationType parameter. • getClonedInstanceId - Retrieves the ID of the newly launched instance from the child automation. • checkIfRootVolumeIsBasedOnLVM - Determines if the root partition is managed by LVM. • branchOnTheRootVolumeLVMStatus - If the minimum required approvals are received from the principals, the automation proceeds with the root volume replacement. • manualInstructionsInCaseOfLVM - If the root volume is managed by LVM, the automation sends output containing instructions for how to manually replace the root volumes. • startOfReplaceRootEBSVolumeBranch - Starts the Replace Root EBS Volume branch workflow. • checkIfTargetInstanceIsManagedByCFN - Determines if the target instance is managed by an AWS CloudFormation stack. • branchOnCFNStackStatus - Branches based on the status of the CloudFormation stack. • approvalForRootVolumesReplacement(WithCFN) - If the target instance was launched by CloudFormation, the automation waits for approval after the newly launched instance successfully starts as a Nitro instance type. When approvals are provided, the Amazon EBS volumes of the target instance are replaced with the root volumes from the newly launched instance. • approvalForRootVolumesReplacement - Waits for approval after the newly launched instance successfully starts as a Nitro instance type. When approvals are provided, the Amazon EBS volumes of the target instance are replaced with the root volumes from the newly launched instance. • assertIfTargetEC2InstanceIsStillStopped - Verifies that the target instance is in a stopped state before replacing the root volume. AWSSupport-MigrateXenToNitroLinux 289 AWS Systems Manager Automation runbook reference User Guide • stopTargetInstanceForRootVolumeReplacement - If the target instance is running, the automation stops the instance before replacing the root volume. • forceStopTargetInstanceForRootVolumeReplacement - Force stops the target instance if the previous step fails. • stopClonedInstanceForRootVolumeReplacement - Stops the newly created instance before replacing the Amazon EBS volumes. • forceStopClonedInstanceForRootVolumeReplacement - Force stops the newly created instance if the previous step fails. • getBlockDeviceMappings - Retrieves
|
systems-manager-automation-runbook-guide-073
|
systems-manager-automation-runbook-guide.pdf
| 73 |
the root volumes from the newly launched instance. • assertIfTargetEC2InstanceIsStillStopped - Verifies that the target instance is in a stopped state before replacing the root volume. AWSSupport-MigrateXenToNitroLinux 289 AWS Systems Manager Automation runbook reference User Guide • stopTargetInstanceForRootVolumeReplacement - If the target instance is running, the automation stops the instance before replacing the root volume. • forceStopTargetInstanceForRootVolumeReplacement - Force stops the target instance if the previous step fails. • stopClonedInstanceForRootVolumeReplacement - Stops the newly created instance before replacing the Amazon EBS volumes. • forceStopClonedInstanceForRootVolumeReplacement - Force stops the newly created instance if the previous step fails. • getBlockDeviceMappings - Retrieves the block device mappings for both the target and newly created instances. • replaceRootEbsVolumes - Replaces the root volume of the target instance with the root volume of the newly created instance. • EndOfReplaceRootEBSVolumeBranch - End of Replace Root EBS Volume branch workflow. • checkENAAttributeForTargetInstance - Checks if the enhanced networking (ENA) attribute is turned on for the target Amazon EC2 instance. • enableENAAttributeForTargetInstance - Turns on the ENA attribute for the target Amazon EC2 instance if needed. • setNitroInstanceTypeForTargetInstance - Changes the target instance to the Nitro instance type that you specify. • replicateRootVolumeTags - Replicates the tags on the root Amazon EBS volume from the target Amazon EC2 instance. • startTargetInstance - Starts the target Amazon EC2 instance after changing the instance type. • onFailureStopTargetEC2Instance - Stops the target Amazon EC2 instance if it fails to start as a Nitro instance type. • onFailureForceStopTargetEC2Instance - Force stops the target Amazon EC2 instance if the previous step fails. • OnFailureRevertOriginalInstanceType - Reverts the target Amazon EC2 instance to the original instance type if the target instance fails to start as a Nitro instance type. • onFailureRollbackRootVolumeReplacement - Reverts all the changes made by the replaceRootEbsVolumes step if needed. • onFailureApprovalToStartTargetInstance - Waits for designated principal's approval to start the target Amazon EC2 instance after rolling back the previous changes. AWSSupport-MigrateXenToNitroLinux 290 AWS Systems Manager Automation runbook reference User Guide • onFailureStartTargetInstance - Starts the target Amazon EC2 instance. • terminateClonedEC2Instance - Terminates the cloned Amazon EC2 instance after replacing the root Amazon EBS volume. AWSSupport-ResetAccess Description This runbook will use the EC2Rescue tool on the specified EC2 instance to re-enable password decryption using the EC2 Console (Windows) or to generate and add a new SSH key pair (Linux). If you lost your key pair, this automation will create a password-enabled AMI that you can use to launch a new EC2 instance with a key pair you own (Windows). Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • EC2RescueInstanceType Type: String Valid values: t2.small | t2.medium | t2.large AWSSupport-ResetAccess 291 AWS Systems Manager Automation runbook reference User Guide Default: t2.small Description: (Required) The EC2 instance type for the EC2Rescue instance. Recommended size: t2.small. • InstanceId Type: String Description: (Required) ID of the EC2 instance you want to reset access for. Important Systems Manager Automation stops this instance, and creates an AMI before attempting any operations. Data stored in instance store volumes will be lost. The public IP address will change if you are not using an Elastic IP. • SubnetId Type: String Default: CreateNewVPC Description: (Optional) The subnet ID for the EC2Rescue instance. By default, Systems Manager Automation creates a new VPC. Alternatively, Use SelectedInstanceSubnet to use the same subnet as your instance, or specify a custom subnet ID. Important The subnet must be in the same Availability Zone as InstanceId, and it must allow access to the SSM endpoints. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. You must have at least ssm:StartAutomationExecution, ssm:GetParameter (to retrieve the SSH key parameter name) and ssm:GetAutomationExecution to be able to read the AWSSupport-ResetAccess 292 AWS Systems Manager Automation runbook reference User Guide automation output. For more information about the required permissions, see AWSSupport- StartEC2RescueWorkflow. Document Steps 1. aws:assertAwsResourceProperty - Assert if the provided instance is Windows. a. (EC2Rescue for Windows) If the provided instance is Windows: i. aws:executeAutomation - Invoke AWSSupport-StartEC2RescueWorkflow with the EC2Rescue for Windows offline password reset script ii. aws:executeAwsApi - Retrieve the backup AMI ID from the nested automation iii. aws:executeAwsApi - Retrieve the password-enabled AMI ID from the nested automation iv. aws:executeAwsApi - Retrieve the EC2Rescue summary from the nested automation b. (EC2Rescue for Linux) If the provided instance is Linux: i. aws:executeAutomation - Invoke AWSSupport-StartEC2RescueWorkflow with the EC2Rescue for Linux offline SSH key injection script ii. aws:executeAwsApi - Retrieve the backup AMI ID from
|
systems-manager-automation-runbook-guide-074
|
systems-manager-automation-runbook-guide.pdf
| 74 |
Assert if the provided instance is Windows. a. (EC2Rescue for Windows) If the provided instance is Windows: i. aws:executeAutomation - Invoke AWSSupport-StartEC2RescueWorkflow with the EC2Rescue for Windows offline password reset script ii. aws:executeAwsApi - Retrieve the backup AMI ID from the nested automation iii. aws:executeAwsApi - Retrieve the password-enabled AMI ID from the nested automation iv. aws:executeAwsApi - Retrieve the EC2Rescue summary from the nested automation b. (EC2Rescue for Linux) If the provided instance is Linux: i. aws:executeAutomation - Invoke AWSSupport-StartEC2RescueWorkflow with the EC2Rescue for Linux offline SSH key injection script ii. aws:executeAwsApi - Retrieve the backup AMI ID from the nested automation iii. aws:executeAwsApi - Retrieve the SSM parameter name for the injected SSH key iv. aws:executeAwsApi - Retrieve the EC2Rescue summary from the nested automation Outputs getEC2RescueForWindowsResult.Output getWindowsBackupAmi.ImageId getWindowsPasswordEnabledAmi.ImageId getEC2RescueForLinuxResult.Output getLinuxBackupAmi.ImageId getLinuxSSHKeyParameter.Name AWSSupport-ResetLinuxUserPassword Description AWSSupport-ResetLinuxUserPassword 293 AWS Systems Manager Automation runbook reference User Guide The AWSSupport-ResetLinuxUserPassword runbook helps you reset the password of a local operating system (OS) user. This runbook is especially helpful for users who need to access their Amazon Elastic Compute Cloud (Amazon EC2) instances using the serial console. The runbook creates a temporary Amazon EC2 instance in your AWS account and an AWS Identity and Access Management (IAM) role with permissions to retrieve an AWS Secrets Manager secret value containing the password. The runbook stops your target Amazon EC2 instance, detaches the root Amazon Elastic Block Store (Amazon EBS) volume, and attaches it to the temporary Amazon EC2 instance. Using Run Command, a script runs on the temporary instance to set the password of the OS user that you specify. Then, the root Amazon EBS volume is reattached to your target instance. The runbook also provides an option to create a snapshot of the root volume at the beginning of the automation. Before you begin Create an Secrets Manager secret with the value of the password that you want to assign to your OS user. The value must be in plaintext. For more information, see Create an AWS Secrets Manager secret in the AWS Secrets Manager User Guide. Considerations • We recommend backing up your instance before using this runbook. Consider setting the value of the CreateSnapshot parameter as Yes. • Changing the local user password requires the runbook to stop your instance. When an instance is stopped, any data stored in memory or on instance store volumes is lost. Also, any automatically assigned public IPv4 addresses are released. For more information about what happens when you stop an instance, see Stop and start your instance in the Amazon EC2 User Guide. • If the Amazon EBS volumes attached to your target Amazon EC2 instance are encrypted with a customer managed AWS Key Management Service (AWS KMS) key, make sure the AWS KMS key is not deleted or disabled or your instance will fail to start. Run this Automation (console) Document type Automation Owner AWSSupport-ResetLinuxUserPassword 294 AWS Systems Manager Automation runbook reference User Guide Amazon Platforms Linux Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • InstanceId Type: String Description: (Required) The ID of the Amazon EC2 Linux instance that contains the OS user password that you want to reset. • LinuxUserName Type: String Default: ec2-user Description: (Optional) The OS user account whose password you want to reset. • SecretArn Type: String Description: (Required) The ARN of your Secrets Manager secret containing the new password. • SecurityGroupId Type: String Description: (Optional) The ID of the security group to attach to the temporary Amazon EC2 instance. If you don't provide a value for this parameter, the default Amazon Virtual Private Cloud (Amazon VPC) security group is used. AWSSupport-ResetLinuxUserPassword 295 AWS Systems Manager Automation runbook reference User Guide • SubnetId Type: String Description: (Optional) The ID of the subnet that you want to launch the Amazon EC2 temporary instance in to. By default, the automation chooses the same subnet as your target instance. If you choose to provide a different subnet, it must be in the same Availability Zone as the target instance and have access to Systems Manager endpoints. • CreateSnapshot Type: String Valid values: Yes | No Default: Yes Description: (Optional) Determines whether a snapshot of the root volume of your target Amazon EC2 instance is created before the automation runs. • StopConsent Type: String Valid values: Yes | No Default: No Description: Enter Yes to acknowledge that your target Amazon EC2 instance will be stopped during this automation. When the Amazon EC2 instance is stopped, any data stored in memory or instance store volumes is lost, and the automatic public
|
systems-manager-automation-runbook-guide-075
|
systems-manager-automation-runbook-guide.pdf
| 75 |
be in the same Availability Zone as the target instance and have access to Systems Manager endpoints. • CreateSnapshot Type: String Valid values: Yes | No Default: Yes Description: (Optional) Determines whether a snapshot of the root volume of your target Amazon EC2 instance is created before the automation runs. • StopConsent Type: String Valid values: Yes | No Default: No Description: Enter Yes to acknowledge that your target Amazon EC2 instance will be stopped during this automation. When the Amazon EC2 instance is stopped, any data stored in memory or instance store volumes is lost, and the automatic public IPv4 address is released. For more information, see Stop and start your instance in the Amazon EC2 User Guide. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:DescribeInstanceInformation • ssm:ListTagsForResource • ssm:SendCommand AWSSupport-ResetLinuxUserPassword 296 AWS Systems Manager Automation runbook reference User Guide • ec2:AttachVolume • ec2:CreateSnapshot • ec2:CreateSnapshots • ec2:CreateVolume • ec2:DescribeImages • ec2:DescribeInstances • ec2:DescribeInstanceStatus • ec2:DescribeSnapshotAttribute • ec2:DescribeSnapshots • ec2:DescribeSnapshotTierStatus • ec2:DescribeVolumes • ec2:DescribeVolumeStatus • ec2:DetachVolume • ec2:RunInstances • ec2:StartInstances • ec2:StopInstances • ec2:TerminateInstances • cloudformation:CreateStack • cloudformation:DeleteStack • cloudformation:DescribeStackResource • cloudformation:DescribeStacks • cloudformation:ListStacks • logs:CreateLogDelivery • logs:CreateLogGroup • logs:DeleteLogDelivery • logs:DeleteLogGroup • logs:DescribeLogGroups • logs:DescribeLogStreams AWSSupport-ResetLinuxUserPassword 297 AWS Systems Manager Automation runbook reference User Guide • logs:PutLogEvents Document Steps 1. aws:branch – Branches based on whether you have provided consent to stopping the target Amazon EC2 instance. 2. aws:assertAwsResourceProperty – Ensures the Amazon EC2 instance status is in a running or stopped state. Otherwise, the automation ends. 3. aws:executeAwsApi – Gets the Amazon EC2 instance properties. 4. aws:executeAwsApi – Gets the root volume properties. 5. aws:branch – Branches the automation depending on whether a subnet ID for the temporary Amazon EC2 instance was provided. 6. aws:assertAwsResourceProperty – Ensures the subnet that you specify in SubnetId parameter is in the same Availability Zone as the target Amazon EC2 instance. 7. aws:assertAwsResourceProperty– Ensures the target Amazon EC2 instance root volume is an Amazon EBS volume. 8. aws:assertAwsResourceProperty – Ensures the Amazon EC2 instance architecture is arm64 or x86_64. 9. aws:assertAwsResourceProperty – Ensures the Amazon EC2 instance shutdown behavior is stop and not terminate. 10.aws:branch – Ensures the Amazon EC2 instance is not a Spot Instance. Otherwise, the automation ends. 11.aws:executeScript – Ensures the Amazon EC2 instance is not part of an auto scaling group. If the instance is part of an auto scaling group, the automation confirms the Amazon EC2 instance is in a Standby lifecycle state. 12.aws:createStack – Creates a temporary Amazon EC2 instance that is used to reset the password for the OS user that you specify. 13.aws:waitForAwsResourceProperty – Waits until the newly launched temporary Amazon EC2 instance is running. 14.aws:executeAwsApi – Gets the ID of the temporary Amazon EC2 instance. 15.aws:waitForAwsResourceProperty – Waits for the temporary Amazon EC2 instance to report as managed by Systems Manager. 16.aws:changeInstanceState– Stops the target Amazon EC2 instance. AWSSupport-ResetLinuxUserPassword 298 AWS Systems Manager Automation runbook reference User Guide 17.aws:changeInstanceState – Forces the target Amazon EC2 instance to stop in case it gets stuck in a stopping state. 18.aws:branch – Branches the automation depending on whether a snapshot of the root volume of the target Amazon EC2 instance was requested. 19.aws:executeAwsApi – Creates a snapshot of the target Amazon EC2 instance root Amazon EBS volume. 20.aws:waitForAwsResourceProperty – Waits for the snapshot to be in a completed state. 21.aws:executeAwsApi – Detaches the Amazon EBS root volume from the target Amazon EC2 instance. 22.aws:waitForAwsResourceProperty – Waits for the Amazon EBS root volume to be detached from the target Amazon EC2 instance. 23.aws:executeAwsApi – Attaches the root Amazon EBS volume to the temporary Amazon EC2 instance. 24.aws:waitForAwsResourceProperty – Waits for the Amazon EBS root volume to be attached to the temporary Amazon EC2 instance. 25.aws:runCommand – Resets the target user password by running a shell script using Run Command on the temporary Amazon EC2 instance. 26.aws:executeAwsApi – Detaches the Amazon EBS root volume from the temporary Amazon EC2 instance. 27.aws:waitForAwsResourceProperty – Waits for the Amazon EBS root volume to be detached from the temporary Amazon EC2 instance. 28.aws:executeAwsApi – Detaches the Amazon EBS root volume from the temporary Amazon EC2 instance after an error. 29.aws:waitForAwsResourceProperty – Waits for the Amazon EBS root volume to be detached from the temporary Amazon EC2 instance after an error. 30.aws:branch – Branches the automation depending on whether a snapshot of the root volume was requested to determine the recovery path in case of an error. 31.aws:executeAwsApi – Reattaches the root Amazon EBS volume to the target Amazon EC2 instance. 32.aws:waitForAwsResourceProperty – Waits for the Amazon EBS root volume to be attached to the Amazon EC2 instance. 33.aws:executeAwsApi – Creates a new Amazon EBS volume from the target Amazon EC2 instance root volume snapshot. AWSSupport-ResetLinuxUserPassword 299 AWS Systems Manager Automation runbook reference
|
systems-manager-automation-runbook-guide-076
|
systems-manager-automation-runbook-guide.pdf
| 76 |
for the Amazon EBS root volume to be detached from the temporary Amazon EC2 instance after an error. 30.aws:branch – Branches the automation depending on whether a snapshot of the root volume was requested to determine the recovery path in case of an error. 31.aws:executeAwsApi – Reattaches the root Amazon EBS volume to the target Amazon EC2 instance. 32.aws:waitForAwsResourceProperty – Waits for the Amazon EBS root volume to be attached to the Amazon EC2 instance. 33.aws:executeAwsApi – Creates a new Amazon EBS volume from the target Amazon EC2 instance root volume snapshot. AWSSupport-ResetLinuxUserPassword 299 AWS Systems Manager Automation runbook reference User Guide 34.aws:waitForAwsResourceProperty – Waits until the new Amazon EBS volume is in an available state. 35.aws:executeAwsApi – Attaches the new Amazon EBS volume to the target instance as the root volume. 36.aws:waitForAwsResourceProperty – Waits for the Amazon EBS volume to be in an attached state. 37.aws:executeAwsApi – Describes the AWS CloudFormation stack events if the runbooks fails to create or update the AWS CloudFormation stack. 38.aws:branch – Branches the automation depending on the previous Amazon EC2 instance state. If the state was running, the instance is started. If it was in a stopped state, the automation continues. 39.aws:changeInstanceState – Starts the Amazon EC2 instance if needed. 40.aws:waitForAwsResourceProperty – Waits until the AWS CloudFormation stack is in a terminal status before deleting. 41.aws:executeAwsApi – Deletes the AWS CloudFormation stack including the temporary Amazon EC2 instance. AWSPremiumSupport-ResizeNitroInstance Description The AWSPremiumSupport-ResizeNitroInstance runbook provides an automated solution for resizing Amazon Elastic Compute Cloud (Amazon EC2) instances built on the Nitro System. To reduce the potential risk of data loss and downtime, the runbook verifies the following: • Instance stop behavior. • If the instance is part of an Amazon EC2 Auto Scaling group, and in standby mode. • Instance state and tenancy. • The instance type you want to change to supports the number of network interfaces currently attached to your instance. • The processor architecture and virtualization type for both the current and target instance type are the same. • If the instance is running, that it's passing all status checks. • The instance type you want to change to is available in the same Availability Zone. AWSPremiumSupport-ResizeNitroInstance 300 AWS Systems Manager Automation runbook reference User Guide If the Amazon EC2 does not pass status checks after changing the instance type, the runbook automatically rolls back to the previous instance type. By default, this runbook will not change the instance type if it is running and instance store volumes are attached. The runbook will also not change the instance type if the instance is part of an AWS CloudFormation stack. If you want to change either of these behaviors, specify yes for the AllowInstanceStoreInstances and AllowCloudFormationInstances parameters. The runbook provides two different ways to specify the instance type you want to change to: • For simple automations targeting a single instance, specify the instance type you want to change to using the TargetInstanceTypeFromParameter parameter. • For running automations at scale to change the instance type of several instances, specify the instance type using the TargetInstanceTypeFromTagValue parameter. For information about running automations at scale, see Run automations at scale. If you don't specify a value for either parameter, the automation fails. Important Access to AWSPremiumSupport-* runbooks requires either an Enterprise or Business Support Subscription. For more information, see Compare Support Plans. Considerations • We recommend backing up your instance before using this runbook. • For information about compatibility for changing instance types, see Compatibility for changing the instance type. • If the automation fails and rolls back to the original instance type, see Troubleshoot changing the instance type. • Changing the instance type requires the runbook to stop your instance. When an instance is stopped, any data stored in memory or on instance store volumes is lost. Also, any automatically assigned public IPv4 addresses are released. For more information about what happens when you stop an instance, see Stop and start your instance. • By using the SkipInstancesWithTagKey parameter, you can skip instances that have a specific Amazon EC2 tag key applied. AWSPremiumSupport-ResizeNitroInstance 301 AWS Systems Manager Automation runbook reference User Guide Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • Acknowledge Type: String Description: (Required) Enter yes to acknowledge that your instance will be stopped if it's currently running. • AllowInstanceStoreInstances Type: String Valid values: no | yes Default: no Description: (Optional) If you specify yes, you allow the runbook to run on instances that have instance
|
systems-manager-automation-runbook-guide-077
|
systems-manager-automation-runbook-guide.pdf
| 77 |
Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • Acknowledge Type: String Description: (Required) Enter yes to acknowledge that your instance will be stopped if it's currently running. • AllowInstanceStoreInstances Type: String Valid values: no | yes Default: no Description: (Optional) If you specify yes, you allow the runbook to run on instances that have instance store volumes attached. • AllowCloudFormationInstances AWSPremiumSupport-ResizeNitroInstance 302 AWS Systems Manager Automation runbook reference User Guide Type: String Valid values: no | yes Default: no Description: (Optional) If you specify yes, the runbook runs on instances that are part of an AWS CloudFormation stack. • DryRun Type: String Valid values: no | yes Default: no Description: (Optional) If you specify yes, the runbook validates resizing requirements without making changes to the instance type. • InstanceId Type: String Description: (Required) The ID of the Amazon EC2 instance whose type you want to change. • SkipInstancesWithTagKey Type: String Description: (Optional) The automation skips a target instance if the tag key you specify is applied to the instance. • SleepTime Type: String Default: 3 Description: (Optional) The number of seconds this runbook should sleep after completion. • TagInstance Type: String AWSPremiumSupport-ResizeNitroInstance 303 AWS Systems Manager Automation runbook reference User Guide Description: (Optional) Tag the instances with the key and value of your choice using the following format: Key=ChangingType,Value=True. This option allows you to track instances that have been targeted by this runbook. Tag keys and values are case sensitive. • TargetInstanceTypeFromParameter Type: String Description: (Optional) The instance type you want to change your instance to. Leave this parameter empty if you want to use the value of the tag key provided in the TargetInstanceTypeFromTagValue parameter. • TargetInstanceTypeFromTagValue Type: String Description: (Optional) The tag key applied to your target instances whose value contains the instance type you want to change to. If you specify a value for the TargetInstanceTypeFromParameter parameter, it overrides any value you specify for this parameter. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • autoscaling:DescribeAutoScalingInstances • cloudformation:DescribeStackResources • ssm:GetAutomationExecution • ssm:DescribeAutomationExecutions • ec2:DescribeInstanceAttribute • ec2:DescribeInstances • ec2:DescribeInstanceStatus • ec2:DescribeInstanceTypeOfferings • ec2:DescribeInstanceTypes • ec2:DescribeTags AWSPremiumSupport-ResizeNitroInstance 304 AWS Systems Manager Automation runbook reference User Guide • ec2:ModifyInstanceAttribute • ec2:StartInstances • ec2:StopInstances Document Steps 1. aws:assertAwsResourceProperty: Ensures the Amazon EC2 instance is not tagged with the resource tag key specified in the SkipInstancesWithTagKey parameter. If the tag key is found applied to the instance, the step fails and the automation ends. 2. aws:assertAwsResourceProperty: Confirms the status of the target Amazon EC2 instance is running, pending, stopped, or stopping. Otherwise, the automation ends. 3. aws:executeAwsApi: Gathers properties from the Amazon EC2 instance. 4. aws:executeAwsApi: Gathers details about the current Amazon EC2 instance type. 5. aws:branch: Checks if the current instance type and the instance type specified in the TargetInstanceTypeFromParameter parameter are the same. If they are, the automation ends. 6. aws:assertAwsResourceProperty: Ensures the instance is running on the Nitro System. 7. aws:branch: Ensures the Amazon EC2 instance root volume type is an Amazon Elastic Block Store (Amazon EBS) volume. 8. aws:assertAwsResourceProperty: Confirms the instance shutdown behavior is stop and not terminate. 9. aws:branch: Ensures the Amazon EC2 instance is not a Spot instance. 10.aws:branch: Ensures the Amazon EC2 instance tenancy is default and not dedicated host, or dedicated instance. 11.aws:executeScript: Confirms there is only one automation of this runbook targeting the current instance ID. If another automation is already in progress targeting the same instance, the automation returns an error and ends. 12.aws:branch: Branches the automation based on the state of the Amazon EC2 instance. a. If stopped or stopping, the automation runs aws:waitForAwsResourceProperty until the Amazon EC2 instance is fully stopped. b. If running or pending, the automation runs aws:waitForAwsResourceProperty until the Amazon EC2 instance passes status checks. AWSPremiumSupport-ResizeNitroInstance 305 AWS Systems Manager Automation runbook reference User Guide 13.aws:assertAwsResourceProperty: Confirms that the Amazon EC2 instance is not part of an Auto Scaling group by calling the DescribeAutoScalingInstances API operation. If the instance is part of an Auto Scaling group, ensures the Amazon EC2 instance is in standby mode. 14.aws:branch: Branches the automation depending on whether you want the automation to check if the Amazon EC2 instance is part of an AWS CloudFormation stack: a. aws:executeScript Ensures the Amazon EC2 instance is not part of an AWS CloudFormation stack by calling the DescribeStackResources API operation. 15.aws:executeAwsApi: Returns a list of instance types with the same processor architecture type, virtulization type, and that supports the number of network interfaces currently attached to the target instance. 16.aws:executeAwsApi: Gets the target
|
systems-manager-automation-runbook-guide-078
|
systems-manager-automation-runbook-guide.pdf
| 78 |
API operation. If the instance is part of an Auto Scaling group, ensures the Amazon EC2 instance is in standby mode. 14.aws:branch: Branches the automation depending on whether you want the automation to check if the Amazon EC2 instance is part of an AWS CloudFormation stack: a. aws:executeScript Ensures the Amazon EC2 instance is not part of an AWS CloudFormation stack by calling the DescribeStackResources API operation. 15.aws:executeAwsApi: Returns a list of instance types with the same processor architecture type, virtulization type, and that supports the number of network interfaces currently attached to the target instance. 16.aws:executeAwsApi: Gets the target instance type value from the tag key specified in the TargetInstanceTypeFromTagValue parameter. 17.aws:executeScript: Confirms that the current and target instances types are compatible. Ensures that the target instance type is available in the same subnet. Verifies the principal who started the runbook has permissions to change the instance type, and stop and start the instance if it was running. 18.aws:branch: Branches the automation based on whether the DryRun parameter value is set to yes. If yes, the automation ends. 19.aws:branch: Checks if the original and the target instance type are the same. If they're the same, the automation ends. 20.aws:executeAwsApi: Gets the current instance state. 21.aws:changeInstanceState: Stops the Amazon EC2 instance. 22.aws:changeInstanceState: Forces the instance to stop if it's stuck in the stopping state. 23.aws:executeAwsApi: Changes the instance type to the target instance type. 24.aws:sleep: Waits 3 seconds after changing the instance type for eventual consistency. 25.aws:branch: Branches the automation based on the previous instance state. If it was running, the instance is started. a. aws:changeInstanceState: Starts the Amazon EC2 instance if it was running before changing the instance type. b. aws:waitForAwsResourceProperty: Waits for the Amazon EC2 instance to pass status checks. If the instance doesn't pass status checks, the instance is changed back to its original instance type. AWSPremiumSupport-ResizeNitroInstance 306 AWS Systems Manager Automation runbook reference User Guide i. aws:changeInstanceState: Stops the Amazon EC2 instance before changing it to its original instance type. ii. aws:changeInstanceState: Forces the Amazon EC2 instance to stop before changing it to its original instance type in case it gets stuck in a stopping state. iii. aws:executeAwsApi: Changes the Amazon EC2 instance to its original type. iv. aws:sleep: Waits 3 seconds after changing the instance type for eventual consistency. v. aws:changeInstanceState: Starts the Amazon EC2 instance if it was running before changing the instance type. vi. aws:waitForAwsResourceProperty: Waits for the Amazon EC2 instance to pass status checks. 26.aws:sleep: Waits before ending the runbook. AWSSupport-RestoreEC2InstanceFromSnapshot Description The AWSSupport-RestoreEC2InstanceFromSnapshot runbook helps you identify and restore an Amazon Elastic Compute Cloud (Amazon EC2) instance from a working Amazon Elastic Block Store (Amazon EBS) snapshot of the root volume. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String AWSSupport-RestoreEC2InstanceFromSnapshot 307 AWS Systems Manager Automation runbook reference User Guide Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • EndDate Type: String Description: (Optional) The last date you want the automation to look for a snapshot. • InplaceSwap Type: Boolean Valid values: true | false Description: (Optional) If the value for this parameter is set to true, the newly created volume from the snapshot replaces the existing root volume attached to your instance. • InstanceId Type: String Description: (Required) The ID of the instance you want to restore from a snapshot. • LookForInstanceStatusCheck Type: Boolean Valid values: true | false Default: true Description: (Optional) If the value for this parameter is set to true, the automation checks whether instance status checks fail on the test instances launched from the snapshots. • SkipSnapshotsBy Type: String Description: (Optional) The interval at which snapshots are skipped when searching for snapshots to restore your instance. For example, if there are 100 snapshots available, and you specify a value of 2 for this parameter, then every third snapshot is reviewed. AWSSupport-RestoreEC2InstanceFromSnapshot 308 AWS Systems Manager Automation runbook reference User Guide Default: 0 • SnapshotId Type: String Description: (Optional) The ID of a snapshot you want to restore the instance from. • StartDate Type: String Description: (Optional) The first date you want the automation to look for a snapshot. • TotalSnapshotsToLook Type: String Description: (Optional) The number of snapshots the automation reviews. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:GetAutomationExecution • ssm:DescribeInstanceInformation • ec2:AttachVolume • ec2:CreateImage • ec2:CreateTags • ec2:CreateVolume • ec2:DeleteTags • ec2:DeregisterImage • ec2:DescribeInstances • ec2:DescribeInstanceStatus • ec2:DescribeImages • ec2:DescribeSnapshots AWSSupport-RestoreEC2InstanceFromSnapshot 309 AWS Systems Manager Automation runbook reference User Guide • ec2:DescribeVolumes • ec2:DetachVolume • ec2:RunInstances •
|
systems-manager-automation-runbook-guide-079
|
systems-manager-automation-runbook-guide.pdf
| 79 |
ID of a snapshot you want to restore the instance from. • StartDate Type: String Description: (Optional) The first date you want the automation to look for a snapshot. • TotalSnapshotsToLook Type: String Description: (Optional) The number of snapshots the automation reviews. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:GetAutomationExecution • ssm:DescribeInstanceInformation • ec2:AttachVolume • ec2:CreateImage • ec2:CreateTags • ec2:CreateVolume • ec2:DeleteTags • ec2:DeregisterImage • ec2:DescribeInstances • ec2:DescribeInstanceStatus • ec2:DescribeImages • ec2:DescribeSnapshots AWSSupport-RestoreEC2InstanceFromSnapshot 309 AWS Systems Manager Automation runbook reference User Guide • ec2:DescribeVolumes • ec2:DetachVolume • ec2:RunInstances • ec2:StartInstances • ec2:StopInstances • ec2:TerminateInstances • cloudwatch:GetMetricData Document Steps 1. aws:executeAwsApi - Gathers details about the target instance. 2. aws:assertAwsResourceProperty - Verifies the target instance exists. 3. aws:assertAwsResourceProperty - Verifies the root volume is an Amazon EBS volume. 4. aws:assertAwsResourceProperty - Verifies that another automation isn't already running that targets this instance. 5. aws:executeAwsApi - Tags the target instance. 6. aws:executeAwsApi - Creates an AMI of the instance. 7. aws:executeAwsApi - Gathers details about the AMI created in the previous step. 8. aws:waitForAwsResourceProperty - Waits for the AMI state to become available before proceeding. 9. aws:executeScript - Launches a new instance from the newly created AMI. 10.aws:assertAwsResourceProperty - Verifies the instance state is available. 11.aws:executeAwsApi - Gathers details about the newly launched instance. 12.aws:branch - Branches based on whether you provided a value for the SnapshotId parameter. 13.aws:executeScript - Returns a list of snapshots within the time period specified. 14.aws:executeAwsApi - Stops the instance. 15.aws:waitForAwsResourceProperty - Waits for the volume state to be available. 16.aws:waitForAwsResourceProperty - Waits for the instance state to be stopped. 17.aws:executeAwsApi - Detaches the root volume. 18.aws:waitForAwsResourceProperty - Waits for the root volume to be detached. AWSSupport-RestoreEC2InstanceFromSnapshot 310 AWS Systems Manager Automation runbook reference User Guide 19.aws:executeAwsApi - Attaches the new root volume. 20.aws:waitForAwsResourceProperty - Waits for the new volume to be attached. 21.aws:executeAwsApi - Starts the instance. 22.aws:waitForAwsResourceProperty - Waits for the instance state to be available. 23.aws:waitForAwsResourceProperty - Waits for system and instance status checks to pass for the instance. 24.aws:executeScript - Runs a script to find a snapshot that can be used to successfully create a volume. 25.aws:executeScript - Runs a script to recover the instance using the newly created volume from the snapshot identified by the automation, or using the volume created from the snapshot you specified in the SnapshotId parameter. 26.aws:executeScript - Deletes resources created by the automation. Outputs launchCloneInstance.InstanceIds ListSnapshotByDate.finalSnapshots ListSnapshotByDate.remainingSnapshotToBeCheckedInSameDateRange findWorkingSnapshot.workingSnapshot InstanceRecovery.result AWSSupport-SendLogBundleToS3Bucket Description The AWSSupport-SendLogBundleToS3Bucket runbook uploads a log bundle generated by the EC2Rescue tool from the target instance to the specified S3 bucket. The runbook installs the platform specific version of EC2Rescue based on the platform of the target instance. EC2Rescue is then used to collect all the available operating system (OS) logs. Run this Automation (console) Document type Automation AWSSupport-SendLogBundleToS3Bucket 311 AWS Systems Manager Automation runbook reference User Guide Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • InstanceId Type: String Description: (Required) The ID of the Windows or Linux managed instance you want to collect logs from. • S3BucketName Type: String Description: (Required) S3 bucket to upload the logs to. • S3Path Type: String Default: AWSSupport-SendLogBundleToS3Bucket/ Description: (Optional) S3 path for the collected logs. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. AWSSupport-SendLogBundleToS3Bucket 312 AWS Systems Manager Automation runbook reference User Guide It is recommended that the EC2 instance receiving the command has an IAM role with the AmazonSSMManagedInstanceCore Amazon managed policy attached. The user must have at least ssm:StartAutomationExecution and ssm:SendCommand to run the automation and send the command to the instance, plus ssm:GetAutomationExecution to be able to read the automation output. Document Steps 1. aws:runCommand - Install EC2Rescue via AWS-ConfigureAWSPackage. 2. aws:runCommand - Run the PowerShell script to collect Windows troubleshooting logs with EC2Rescue. 3. aws:runCommand - Run the bash script to collect Linux troubleshooting logs with EC2Rescue. Outputs collectAndUploadWindowsLogBundle.Output collectAndUploadLinuxLogBundle.Output AWSSupport-StartEC2RescueWorkflow Description The AWSSupport-StartEC2RescueWorkflow runbook runs the provided base64 encoded script (Bash or Powershell) on a helper instance created to rescue your instance. The root volume of your instance is attached and mounted to the helper instance, also known as the EC2Rescue instance. If your instance is Windows, provide a Powershell script. Otherwise, use Bash. The runbook sets some environment variables which you can use in your script. The environment variables contain information about the input you provided, as well as information about the offline root volume. The offline volume is already mounted and ready to
|
systems-manager-automation-runbook-guide-080
|
systems-manager-automation-runbook-guide.pdf
| 80 |
EC2Rescue. Outputs collectAndUploadWindowsLogBundle.Output collectAndUploadLinuxLogBundle.Output AWSSupport-StartEC2RescueWorkflow Description The AWSSupport-StartEC2RescueWorkflow runbook runs the provided base64 encoded script (Bash or Powershell) on a helper instance created to rescue your instance. The root volume of your instance is attached and mounted to the helper instance, also known as the EC2Rescue instance. If your instance is Windows, provide a Powershell script. Otherwise, use Bash. The runbook sets some environment variables which you can use in your script. The environment variables contain information about the input you provided, as well as information about the offline root volume. The offline volume is already mounted and ready to use. For example, you can save a Desired State Configuration file to an offline Windows root volume, or chroot to an offline Linux root volume and perform an offline remediation. Run this Automation (console) Important Amazon EC2 instances created from Marketplace Amazon Machine Images (AMIs) are not supported by this automation. AWSSupport-StartEC2RescueWorkflow 313 AWS Systems Manager Automation runbook reference User Guide Additional Information To base64 encode a script, you can use either Powershell or Bash. Powershell: [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes([System.IO.File]::ReadAllText('PATH_TO_FILE'))) Bash: base64 PATH_TO_FILE Here is a list of environment variables you can use in your offline scripts, depending on the target OS Windows: Variable Description Example value $env:EC2RESCUE_ACC OUNT_ID {{ global:ACCOUNT_ID }} 123456789012 $env:EC2RESCUE_DATE {{ global:DATE }} 2018-09-07 $env:EC2RESCUE_DATE_TIME {{ global:DATE_TIME }} 2018-09-07_18.09.59 $env:EC2RESCUE_EC2RW_DIR EC2Rescue for Windows installation path C:\Program Files\Amazon \EC2Rescue $env:EC2RESCUE_EC2RW_DIR EC2Rescue for Windows installation path C:\Program Files\Amazon \EC2Rescue $env:EC2RESCUE_EXE CUTION_ID {{ automation:EXECUTI ON_ID }} 7ef8008e-219b-4aca -8bb5-65e2e898e20b $env:EC2RESCUE_OFF LINE_CURRENT_CONTR OL_SET $env:EC2RESCUE_OFF LINE_DRIVE Offline Windows Current Control Set path HKLM:\AWSTempSystem \ControlSet001 Offline Windows drive letter D:\ AWSSupport-StartEC2RescueWorkflow 314 AWS Systems Manager Automation runbook reference User Guide Variable Description Example value $env:EC2RESCUE_OFF LINE_EBS_DEVICE Offline root volume EBS device xvdf $env:EC2RESCUE_OFF LINE_KERNEL_VER Offline Windows Kernel version 6.1.7601.24214 $env:EC2RESCUE_OFF LINE_OS_ARCHITECTURE $env:EC2RESCUE_OFF LINE_OS_CAPTION $env:EC2RESCUE_OFF LINE_OS_TYPE Offline Windows architecture AMD64 Offline Windows caption Windows Server 2008 R2 Datacenter Offline Windows OS type Server $env:EC2RESCUE_OFF LINE_PROGRAM_FILES_DIR Offline Windows Program files directory path D:\Program Files $env:EC2RESCUE_OFF LINE_PROGRAM_FILES Offline Windows Program files x86 directory path D:\Program Files (x86) _X86_DIR $env:EC2RESCUE_OFF LINE_REGISTRY_DIR Offline Windows registry directory path D:\Windows\System3 2\config $env:EC2RESCUE_OFF LINE_SYSTEM_ROOT Offline Windows system root directory path D:\Windows $env:EC2RESCUE_REGION {{ global:REGION }} us-west-1 $env:EC2RESCUE_S3_BUCKET {{ S3BucketName }} amzn-s3-demo-bucket $env:EC2RESCUE_S3_PREFIX {{ S3Prefix }} myprefix/ $env:EC2RESCUE_SOU RCE_INSTANCE {{ InstanceId }} i-abcdefgh123456789 AWSSupport-StartEC2RescueWorkflow 315 AWS Systems Manager Automation runbook reference User Guide Variable Description Example value $script:EC2RESCUE_ OFFLINE_WINDOWS_INSTALL Offline Windows Installation metadata Customer Powershell Object Linux: Variable Description Example value EC2RESCUE_ACCOUNT_ID {{ global:ACCOUNT_ID }} 123456789012 EC2RESCUE_DATE {{ global:DATE }} 2018-09-07 EC2RESCUE_DATE_TIME {{ global:DATE_TIME }} 2018-09-07_18.09.59 EC2RESCUE_EC2RL_DIR EC2Rescue for Linux installat ion path /usr/local/ec2rl-1.1.3 EC2RESCUE_EXECUTION_ID {{ automation:EXECUTI ON_ID }} 7ef8008e-219b-4aca -8bb5-65e2e898e20b EC2RESCUE_OFFLINE_DEVICE Offline device name /dev/xvdf1 EC2RESCUE_OFFLINE_ EBS_DEVICE Offline root volume EBS device /dev/sdf EC2RESCUE_OFFLINE_ SYSTEM_ROOT Offline root volume mount point /mnt/mount EC2RESCUE_PYTHON Python version python2.7 EC2RESCUE_REGION {{ global:REGION }} us-west-1 EC2RESCUE_S3_BUCKET {{ S3BucketName }} amzn-s3-demo-bucket EC2RESCUE_S3_PREFIX {{ S3Prefix }} myprefix/ EC2RESCUE_SOURCE_I NSTANCE {{ InstanceId }} i-abcdefgh123456789 AWSSupport-StartEC2RescueWorkflow 316 AWS Systems Manager Automation runbook reference User Guide Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AMIPrefix Type: String Default: AWSSupport-EC2Rescue Description: (Optional) A prefix for the backup AMI name. • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • CreatePostEC2RescueBackup Type: String Valid values: true | false Default: false Description: (Optional) Set it to true to create an AMI of InstanceId after running the script, before starting it. The AMI will persist after the automation completes. It is your responsibility to secure access to the AMI, or to delete it. • CreatePreEC2RescueBackup AWSSupport-StartEC2RescueWorkflow 317 AWS Systems Manager Automation runbook reference User Guide Type: String Valid values: true | false Default: false Description: (Optional) Set it to true to create an AMI of InstanceId before running the script. The AMI will persist after the automation completes. It is your responsibility to secure access to the AMI, or to delete it. • EC2RescueInstanceType Type: String Valid values: t2.small | t2.medium | t2.large | t3.small | t3.medium | t3.large | i3.large Default: t3.medium Description: (Optional) The EC2 instance type for the EC2Rescue instance. • InstanceId Type: String Description: (Required) ID of your EC2 instance. IMPORTANT: AWS Systems Manager Automation stops this instance. Data stored in instance store volumes will be lost. The public IP address will change if you are not using an Elastic IP. • OfflineScript Type: String Description: (Required) Base64 encoded script to run against the helper instance. Use Bash if your source instance is Linux, and PowerShell if it is Windows. • S3BucketName Type: String Description: (Optional) S3 bucket name in your account where you want to upload the troubleshooting logs.
|
systems-manager-automation-runbook-guide-081
|
systems-manager-automation-runbook-guide.pdf
| 81 |
(Optional) The EC2 instance type for the EC2Rescue instance. • InstanceId Type: String Description: (Required) ID of your EC2 instance. IMPORTANT: AWS Systems Manager Automation stops this instance. Data stored in instance store volumes will be lost. The public IP address will change if you are not using an Elastic IP. • OfflineScript Type: String Description: (Required) Base64 encoded script to run against the helper instance. Use Bash if your source instance is Linux, and PowerShell if it is Windows. • S3BucketName Type: String Description: (Optional) S3 bucket name in your account where you want to upload the troubleshooting logs. Make sure the bucket policy does not grant unnecessary read/write permissions to parties that do not need access to the collected logs. • S3Prefix AWSSupport-StartEC2RescueWorkflow 318 AWS Systems Manager Automation runbook reference User Guide Type: String Default: AWSSupport-EC2Rescue Description: (Optional) A prefix for the S3 logs. • SubnetId Type: String Default: SelectedInstanceSubnet Description: (Optional) The subnet ID for the EC2Rescue instance. By default, the same subnet where the provided instance resides is used. IMPORTANT: If you provide a custom subnet, it must be in the same Availability Zone as InstanceId, and it must allow access to the SSM endpoints. • UniqueId Type: String Default: {{ automation:EXECUTION_ID }} Description: (Optional) A unique identifier for the automation. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. It is recommended the user who runs the automation have the AmazonSSMAutomationRole IAM managed policy attached. In addition to that policy, the user must have: { "Version": "2012-10-17", "Statement": [ { "Action": [ "lambda:InvokeFunction", "lambda:DeleteFunction", "lambda:GetFunction" ], "Resource": "arn:aws:lambda:*:An-AWS-Account- ID:function:AWSSupport-EC2Rescue-*", AWSSupport-StartEC2RescueWorkflow 319 AWS Systems Manager Automation runbook reference User Guide "Effect": "Allow" }, { "Action": [ "s3:GetObject", "s3:GetObjectVersion" ], "Resource": [ "arn:aws:s3:::awssupport-ssm.*/*.template", "arn:aws:s3:::awssupport-ssm.*/*.zip" ], "Effect": "Allow" }, { "Action": [ "iam:CreateRole", "iam:CreateInstanceProfile", "iam:GetRole", "iam:GetInstanceProfile", "iam:PutRolePolicy", "iam:DetachRolePolicy", "iam:AttachRolePolicy", "iam:PassRole", "iam:AddRoleToInstanceProfile", "iam:RemoveRoleFromInstanceProfile", "iam:DeleteRole", "iam:DeleteRolePolicy", "iam:DeleteInstanceProfile" ], "Resource": [ "arn:aws:iam::An-AWS-Account-ID:role/AWSSupport-EC2Rescue-*", "arn:aws:iam::An-AWS-Account-ID:instance-profile/AWSSupport- EC2Rescue-*" ], "Effect": "Allow" }, { "Action": [ "lambda:CreateFunction", "ec2:CreateVpc", "ec2:ModifyVpcAttribute", "ec2:DeleteVpc", "ec2:CreateInternetGateway", "ec2:AttachInternetGateway", AWSSupport-StartEC2RescueWorkflow 320 AWS Systems Manager Automation runbook reference User Guide "ec2:DetachInternetGateway", "ec2:DeleteInternetGateway", "ec2:CreateSubnet", "ec2:DeleteSubnet", "ec2:CreateRoute", "ec2:DeleteRoute", "ec2:CreateRouteTable", "ec2:AssociateRouteTable", "ec2:DisassociateRouteTable", "ec2:DeleteRouteTable", "ec2:CreateVpcEndpoint", "ec2:DeleteVpcEndpoints", "ec2:ModifyVpcEndpoint", "ec2:Describe*" ], "Resource": "*", "Effect": "Allow" } ] } Document Steps 1. aws:executeAwsApi - Describe the provided instance 2. aws:executeAwsApi - Describe the provided instance's root volume 3. aws:assertAwsResourceProperty - Check the root volume device type is EBS 4. aws:assertAwsResourceProperty - Check the root volume is not encrypted 5. aws:assertAwsResourceProperty - Check the provide subnet ID a. (Use current instance subnet) - If *SubnetId = SelectedInstanceSubnet* then run aws:createStack to deploy the EC2Rescue CloudFormation stack b. (Create new VPC) - If *SubnetId = CreateNewVPC* then run aws:createStack to deploy the EC2Rescue CloudFormation stack c. (Use custom subnet) - In all other cases: aws:assertAwsResourceProperty - Check the provided subnet is in the same Availability Zone as the provided instance aws:createStack - Deploy the EC2Rescue CloudFormation stack 6. aws:invokeLambdaFunction - Perform additional input validation AWSSupport-StartEC2RescueWorkflow 321 AWS Systems Manager Automation runbook reference User Guide 7. aws:executeAwsApi - Update the EC2Rescue CloudFormation stack to create the EC2Rescue helper instance 8. aws:waitForAwsResourceProperty - Wait for the EC2Rescue CloudFormation stack update to complete 9. aws:executeAwsApi - Describe the EC2Rescue CloudFormation stack output to obtain the EC2Rescue helper instance ID 10.aws:waitForAwsResourceProperty - Wait for the EC2Rescue helper instance to become a managed instance 11.aws:changeInstanceState - Stop the provided instance 12.aws:changeInstanceState - Stop the provided instance 13.aws:changeInstanceState - Force stop the provided instance 14.aws:assertAwsResourceProperty - Check the CreatePreEC2RescueBackup input value a. (Create pre-EC2Rescue backup) - If *CreatePreEC2RescueBackup = true* b. aws:executeAwsApi - Create an AMI backup of the provided instance c. aws:createTags - Tag the AMI backup 15.aws:runCommand - Install EC2Rescue on the EC2Rescue helper instance 16.aws:executeAwsApi - Detach the root volume from the provided instance 17.aws:assertAwsResourceProperty - Check the provided instance platform a. (Instance is Windows): aws:executeAwsApi - Attach the root volume to the EC2Rescue helper instance as *xvdf* aws:sleep - Sleep 10 seconds aws:runCommand - Run the provided offline script in Powershell b. (Instance is Linux): aws:executeAwsApi - Attach the root volume to the EC2Rescue helper instance as */dev/ sdf* aws:sleep - Sleep 10 seconds aws:runCommand - Run the provided offline script in Bash 18.aws:changeInstanceState - Stop the EC2Rescue helper instance 19.aws:changeInstanceState - Force stop the EC2Rescue helper instance AWSSupport-StartEC2RescueWorkflow 322 AWS Systems Manager Automation runbook reference User Guide 20.aws:executeAwsApi - Detach the root volume from the EC2Rescue helper instance 21.aws:executeAwsApi - Attach the root volume back to the provided instance 22.aws:assertAwsResourceProperty - Check the CreatePostEC2RescueBackup input value a. (Create post-EC2Rescue backup) - If *CreatePostEC2RescueBackup = true* b. aws:executeAwsApi - Create an AMI backup of the provided instance c. aws:createTags - Tag the AMI backup 23.aws:executeAwsApi - Restore the initial delete on termination state for the root volume of the provided instance 24.aws:changeInstanceState - Restore the initial state of the
|
systems-manager-automation-runbook-guide-082
|
systems-manager-automation-runbook-guide.pdf
| 82 |
instance 19.aws:changeInstanceState - Force stop the EC2Rescue helper instance AWSSupport-StartEC2RescueWorkflow 322 AWS Systems Manager Automation runbook reference User Guide 20.aws:executeAwsApi - Detach the root volume from the EC2Rescue helper instance 21.aws:executeAwsApi - Attach the root volume back to the provided instance 22.aws:assertAwsResourceProperty - Check the CreatePostEC2RescueBackup input value a. (Create post-EC2Rescue backup) - If *CreatePostEC2RescueBackup = true* b. aws:executeAwsApi - Create an AMI backup of the provided instance c. aws:createTags - Tag the AMI backup 23.aws:executeAwsApi - Restore the initial delete on termination state for the root volume of the provided instance 24.aws:changeInstanceState - Restore the initial state of the provided instance (running/ stopped) 25.aws:deleteStack - Delete the EC2Rescue CloudFormation stack Outputs runScriptForLinux.Output runScriptForWindows.Output preScriptBackup.ImageId postScriptBackup.ImageId AWSPremiumSupport-TroubleshootEC2DiskUsage Description The AWSPremiumSupport-TroubleshootEC2DiskUsage runbook helps you investigate and potentially remediate issues with Amazon Elastic Compute Cloud (Amazon EC2) instance root and non-root disk usage. If possible, the runbook attempts to remediate issues by extending the volume and its file system. To perform these tasks, this runbook orchestrates the execution of several runbooks based on the operating system of the affected instance. The first runbook, AWSPremiumSupport-DiagnoseDiskUsageOnWindows or AWSPremiumSupport-DiagnoseDiskUsageOnLinux, determines if disk issues can be mitigated by expanding the volume. The second runbook, AWSPremiumSupport-ExtendVolumesOnWindows or AWSPremiumSupport-ExtendVolumesOnLinux, uses the output of the first runbook to run AWSPremiumSupport-TroubleshootEC2DiskUsage 323 AWS Systems Manager Automation runbook reference User Guide Python code that modifies the volume. After the volume has been modified, the runbook extends the partition and file system of the affected volumes. Important Access to AWSPremiumSupport-* runbooks requires an Enterprise or Business Support Subscription. For more information, see Compare AWS Support Plans. This document was built in collaboration with AWS Managed Services (AMS). AMS helps you manage your AWS infrastructure more efficiently and securely. AMS also provides operational flexibility, enhanced security and compliance, capacity optimization, and cost-savings identification. For more information, see AWS Managed Services. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, Windows Parameters • InstanceId Type: String Allowed values: ^i-[a-z0-9]{8,17}$ Description: (Required) ID of your Amazon EC2 instance. • VolumeExpansionEnabled Type: Boolean AWSPremiumSupport-TroubleshootEC2DiskUsage 324 AWS Systems Manager Automation runbook reference User Guide Description: (Optional) Flag to control whether the document will extend the volumes and partitions affected. Default: true • VolumeExpansionUsageTrigger Type: String Description: (Optional) Minimum usage of partition space required to trigger extension (in percentage). Allowed values: ^[0-9]{1,2}$ Default: 85 • VolumeExpansionCapSize Type: String Description: (Optional) Maximum size that the Amazon Elastic Block Store (Amazon EBS) volume will be increased to (in GiB). Allowed values: ^[0-9]{1,4}$ Default: 2048 • VolumeExpansionGibIncrease Type: String Description: (Optional) Increase in GiB of the volume. The biggest net increase between VolumeExpansionGibIncrease and VolumeExpansionPercentageIncrease will be used. Allowed values: ^[0-9]{1,4}$ Default: 20 • VolumeExpansionPercentageIncrease Type: String Description: (Optional) Increase in percentage of the volume. The biggest net increase between VolumeExpansionGibIncrease and VolumeExpansionPercentageIncrease will be used. AWSPremiumSupport-TroubleshootEC2DiskUsage 325 AWS Systems Manager Automation runbook reference User Guide Allowed values: ^[0-9]{1,2}$ Default: 20 • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ec2:DescribeVolumes • ec2:DescribeVolumesModifications • ec2:ModifyVolume • ec2:DescribeInstances • ec2:CreateImage • ec2:DescribeImages • ec2:DescribeTags • ec2:CreateTags • ec2:DeleteTags • ssm:StartAutomationExecution • ssm:GetAutomationExecution • ssm:DescribeAutomationStepExecutions • ssm:DescribeAutomationExecutions • ssm:SendCommand • ssm:DescribeInstanceInformation • ssm:ListCommands • ssm:ListCommandInvocations AWSPremiumSupport-TroubleshootEC2DiskUsage 326 AWS Systems Manager Automation runbook reference User Guide Document Steps 1. aws:assertAwsResourceProperty - Check if the instance is managed by Systems Manager 2. aws:executeAwsApi - Describes the instance to get the platform. 3. aws:branch - Branches automation based on the instance's platform. a. If the instance is Windows: i. aws:executeAutomation - Run the AWSPremiumSupport- DiagnoseDiskUsageOnWindows runbook in order to diagnose disk usage issues on the instance. ii. aws:executeAwsApi - Gets the output of the previous automation. iii. aws:branch - Branches based on the output of the diagnostics, and if there are volumes that can be expanded to mitigate the alert. A. There are no volumes that need to be expanded: End the automation. B. There are volumes that need to be expanded: I. aws:executeAwsApi - Create an Amazon Machine Image (AMI) of the instance. II. aws:waitForAwsResourceProperty - Waits for the AMI state to be available. III. aws:executeAutomation - Run the AWSPremiumSupport- ExtendVolumesOnWindows runbook in order to perform the volume modification as well as the required steps in the operating system (OS) to make the new space available. b. (Platform is not windows) If the input instance is not Windows: i. aws:executeAutomation - Run the AWSPremiumSupport- DiagnoseDiskUsageOnLinux runbook in order to diagnose disk usage issues on the instance. ii. aws:executeAwsApi - Gets the output of the previous automation.
|
systems-manager-automation-runbook-guide-083
|
systems-manager-automation-runbook-guide.pdf
| 83 |
that need to be expanded: I. aws:executeAwsApi - Create an Amazon Machine Image (AMI) of the instance. II. aws:waitForAwsResourceProperty - Waits for the AMI state to be available. III. aws:executeAutomation - Run the AWSPremiumSupport- ExtendVolumesOnWindows runbook in order to perform the volume modification as well as the required steps in the operating system (OS) to make the new space available. b. (Platform is not windows) If the input instance is not Windows: i. aws:executeAutomation - Run the AWSPremiumSupport- DiagnoseDiskUsageOnLinux runbook in order to diagnose disk usage issues on the instance. ii. aws:executeAwsApi - Gets the output of the previous automation. iii. aws:branch - Branches based on the output of the diagnostics, and if there are volumes that can be expanded to mitigate the alert. A. There are no volumes that need to be expanded: End the automation. B. There are volumes that need to be expanded: I. aws:executeAwsApi - Create an AMI of the instance. II. aws:waitForAwsResourceProperty - Waits for AMI state to be available. AWSPremiumSupport-TroubleshootEC2DiskUsage 327 AWS Systems Manager Automation runbook reference User Guide III. aws:executeAutomation - Run the AWSPremiumSupport- ExtendVolumesOnLinux runbook in order to perform the volume modification as well as the required steps in the OS to make the new space available. Outputs diagnoseDiskUsageAlertOnWindows.Output extendVolumesOnWindows.Output diagnoseDiskUsageAlertOnLinux.Output extendVolumesOnLinux.Output BackupAMILinux.ImageId BackupAMIWindows.ImageId AWSSupport-TroubleshootEC2InstanceConnect Description AWSSupport-TroubleshootEC2InstanceConnect automation helps analyze and detect errors preventing the connection to an Amazon Elastic Compute Cloud (Amazon EC2) instance using Amazon EC2 Instance Connect. It identifies issues caused by an unsupported Amazon Machine Image (AMI), missing OS-level package installation or configuration, missing AWS Identity and Access Management (IAM) permissions, or network configuration issues. How does it work? The runbook takes the Amazon EC2 instance ID, username, connection mode, source IP CIDR, SSH port, and Amazon Resource Name (ARN) for the IAM role or user experiencing issues with Amazon EC2 Instance Connect. It then checks the prerequisites for connecting to an Amazon EC2 instance using Amazon EC2 Instance Connect: • The instance is running and in a healthy state. • The instance is located in an AWS region supported by Amazon EC2 Instance Connect. • AMI of the instance is supported by Amazon EC2 Instance Connect. AWSSupport-TroubleshootEC2InstanceConnect 328 AWS Systems Manager Automation runbook reference User Guide • The instance can reach the Instance Metadata Service (IMDSv2). • Amazon EC2 Instance Connect package is properly installed and configured at the OS level. • The network configuration (security groups, network ACL, and route table rules) allows connection to the instance through Amazon EC2 Instance Connect. • The IAM role or user that's used to leverage Amazon EC2 Instance Connect has access to push keys to the Amazon EC2 instance. Important • To check the instance AMI, IMDSv2 reachability, and Amazon EC2 Instance Connect package installation, the instance must be SSM managed. Otherwise, it skips those steps. For more information, see Why is my Amazon EC2 instance not displaying as a managed node. • The network check will only detect if security group and network ACL rules block traffic when SourceIpCIDR is provided as an input parameter. Otherwise, it will only display SSH-related rules. • Connections using Amazon EC2 Instance Connect Endpoint are not validated in this runbook. • For private connections, the automation does not check if the SSH client is installed on the source machine and if it can reach the instance's private IP address. Document type Automation Owner Amazon Platforms Linux Parameters Required IAM permissions AWSSupport-TroubleshootEC2InstanceConnect 329 AWS Systems Manager Automation runbook reference User Guide The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ec2:DescribeInstances • ec2:DescribeSecurityGroups • ec2:DescribeNetworkAcls • ec2:DescribeRouteTables • ec2:DescribeInternetGateways • iam:SimulatePrincipalPolicy • ssm:DescribeInstanceInformation • ssm:ListCommands • ssm:ListCommandInvocations • ssm:SendCommand Instructions Follow these steps to configure the automation: 1. Navigate to the AWSSupport-TroubleshootEC2InstanceConnect in the AWS Systems Manager console. 2. Select Execute automation. 3. For the input parameters, enter the following: • InstanceId (Required): The ID of the target Amazon EC2 instance that you could not connect to using Amazon EC2 Instance Connect. • AutomationAssumeRole (Optional): The ARN of the IAM role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user who starts this runbook. • Username (Required): The username used to connect to the Amazon EC2 instance using Amazon EC2 Instance Connect. It is used to evaluate if IAM access is granted for this particular user. AWSSupport-TroubleshootEC2InstanceConnect 330 AWS Systems Manager Automation runbook reference User Guide • EC2InstanceConnectRoleOrUser (Required): The ARN of the IAM role or user that is leveraging Amazon EC2 Instance Connect to push keys to the instance. • SSHPort (Optional): The SSH port configured on the Amazon EC2 instance. Default value is 22. The port number must be between 1-65535. • SourceNetworkType (Optional): The network access method to the
|
systems-manager-automation-runbook-guide-084
|
systems-manager-automation-runbook-guide.pdf
| 84 |
this runbook. • Username (Required): The username used to connect to the Amazon EC2 instance using Amazon EC2 Instance Connect. It is used to evaluate if IAM access is granted for this particular user. AWSSupport-TroubleshootEC2InstanceConnect 330 AWS Systems Manager Automation runbook reference User Guide • EC2InstanceConnectRoleOrUser (Required): The ARN of the IAM role or user that is leveraging Amazon EC2 Instance Connect to push keys to the instance. • SSHPort (Optional): The SSH port configured on the Amazon EC2 instance. Default value is 22. The port number must be between 1-65535. • SourceNetworkType (Optional): The network access method to the Amazon EC2 instance: • Browser: You connect from the AWS Management Console. • Public: You connect to the instance located in a public subnet over the internet (for example, your local computer). • Private: You connect through the instance's private IP address. • SourceIpCIDR (Optional): The source CIDR that includes the IP address of the device (such as your local computer) you will log from using Amazon EC2 Instance Connect. Example: 172.31.48.6/32. If no value is provided with public or private access mode, the runbook will not evaluate if the Amazon EC2 instance security group and network ACL rules allow SSH traffic. It will display SSH-related rules instead. 4. Select Execute. 5. The automation initiates. 6. The document performs the following steps: • AssertInitialState: AWSSupport-TroubleshootEC2InstanceConnect 331 AWS Systems Manager Automation runbook reference User Guide Ensures that the Amazon EC2 instance status is running. Otherwise, the automation ends. • GetInstanceProperties: Gets the current Amazon EC2 instance properties (PlatformDetails, PublicIpAddress, VpcId, SubnetId and MetadataHttpEndpoint). • GatherInstanceInformationFromSSM: Gets the Systems Manager instance's ping status and operating system details if the instance is SSM managed. • CheckIfAWSRegionSupported: Checks if the Amazon EC2 instance is located in an Amazon EC2 Instance Connect supported AWS region. • BranchOnIfAWSRegionSupported: Continues the execution if the AWS Region is supported by Amazon EC2 Instance Connect. Otherwise, it creates the output and exits the automation. • CheckIfInstanceAMIIsSupported: Checks if the AMI associated with the instance is supported by Amazon EC2 Instance Connect. • BranchOnIfInstanceAMIIsSupported: If the instance AMI is supported, it performs the OS-level checks, like metadata reachability and Amazon EC2 Instance Connect package installation and configuration. Otherwise, it checks if HTTP metadata is enabled using AWS API, then advances to the network check step. • CheckIMDSReachabilityFromOs: Runs a Bash script on the target Amazon EC2 Linux instance to check if it is able to reach the IMDSv2. • CheckEICPackageInstallation: Runs a Bash script on the target Amazon EC2 Linux instance to check if the Amazon EC2 Instance Connect package is properly installed and configured. • CheckSSHConfigFromOs: Runs a Bash script on the target Amazon EC2 Linux instance to check if the configured SSH port matches the input parameter `SSHPort.` AWSSupport-TroubleshootEC2InstanceConnect 332 AWS Systems Manager Automation runbook reference User Guide • CheckMetadataHTTPEndpointIsEnabled: Checks if the instance metadata service HTTP endpoint is enabled. • CheckEICNetworkAccess: Checks if the network configuration (security groups, network ACL, and route table rules) allows connection to the instance through Amazon EC2 Instance Connect. • CheckIAMRoleOrUserPermissions: Checks if the IAM role or user used to leverage Amazon EC2 Instance Connect has access to push keys to the Amazon EC2 instance using the provided username. • MakeFinalOutput: Consolidates the output of all previous steps. 7. After completed, review the Outputs section for the detailed results of the execution: Execution where the target instance has all required prerequisites: Execution where the AMI of the target instance is not supported: References AWSSupport-TroubleshootEC2InstanceConnect 333 AWS Systems Manager Automation runbook reference User Guide Systems Manager Automation • Run this Automation (console) • Run an automation • Setting up an Automation • Support Automation Workflows landing page AWS service documentation • How do I troubleshoot issues connecting to my Amazon EC2 instance using Amazon EC2 Instance Connect? AWSSupport-TroubleshootLinuxMGNDRSAgentLogs Description AWSSupport-TroubleshootLinuxMGNDRSAgentLogs automation runbook is used to detect common errors when installing the AWS Application Migration Service (AWS MGN) and AWS Elastic Disaster Recovery (AWS DRS) replication agents in Linux servers to migrate source servers to the AWS cloud. How does it work? The runbook AWSSupport-TroubleshootLinuxMGNDRSAgentLogs takes the Amazon Simple Storage Service (Amazon S3) path where the AWS MGN or AWS DRS installation log aws_replication_agent_installer.log is uploaded as parameter. Then, it performs the following tasks: • Validation: Checks if the provided log file is valid and that it contains at least one agent installation. • Parsing: Thoroughly parses the latest agent installation in the log file for known AWS MGN or AWS DRS errors. • Error Detection and resolution: Based on the parsing, it detects and lists any errors or issues during the agent installation process. For each detected error, the runbook provides detailed steps to help resolve or mitigate the issue. Run this Automation (console) AWSSupport-TroubleshootLinuxMGNDRSAgentLogs 334 AWS Systems Manager Automation runbook reference User
|
systems-manager-automation-runbook-guide-085
|
systems-manager-automation-runbook-guide.pdf
| 85 |
is uploaded as parameter. Then, it performs the following tasks: • Validation: Checks if the provided log file is valid and that it contains at least one agent installation. • Parsing: Thoroughly parses the latest agent installation in the log file for known AWS MGN or AWS DRS errors. • Error Detection and resolution: Based on the parsing, it detects and lists any errors or issues during the agent installation process. For each detected error, the runbook provides detailed steps to help resolve or mitigate the issue. Run this Automation (console) AWSSupport-TroubleshootLinuxMGNDRSAgentLogs 334 AWS Systems Manager Automation runbook reference User Guide Document type Automation Owner Amazon Platforms Linux Parameters Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • s3:GetObject • s3:ListBucket Instructions Follow these steps to configure the automation: 1. Navigate to AWSSupport-TroubleshootLinuxMGNDRSAgentLogs in Systems Manager under Documents. 2. Select Execute automation. 3. For the input parameters, enter the following: • AutomationAssumeRole (Optional): The Amazon Resource Name (ARN) of the AWS AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user who starts this runbook. • BucketName (Required): The name of the Amazon S3 bucket where the replication agent log is stored. AWSSupport-TroubleshootLinuxMGNDRSAgentLogs 335 AWS Systems Manager Automation runbook reference User Guide • S3ObjectKey (Required): The key of the Amazon S3 object where the replication agent installer log file is stored. Example: If the Amazon S3 URI is s3://bucket_name/path/to/file/ aws_replication_agent_installer.log, then you should input path/to/file/ aws_replication_agent_installer.log. • ServiceName (Required): The name of the service for which the replication agent is installed. Allowed values: AWS MGN or AWS DRS 4. Select Execute. 5. The automation initiates. 6. The document performs the following steps: • ValidateInput Ensures that the replication agent log file is valid and accessible using the provided Amazon S3 bucket name and path to the object, then returns the byte number of the latest agent installation. • CheckReplicationAgentLogErrors Reads the replication agent log file starting from the latest installation byte and search for known AWS MGN or AWS DRS errors. • MakeFinalOutput Creates the output from the previous checks including information about the errors found and troubleshooting recommendations. 7. After completed, review the Outputs section for the detailed results of the execution: AWSSupport-TroubleshootLinuxMGNDRSAgentLogs 336 AWS Systems Manager Automation runbook reference User Guide References Systems Manager Automation • Run this Automation (console) • Run an automation • Setting up an Automation • Support Automation Workflows landing page AWSSupport-TroubleshootRDP Description The AWSSupport-TroubleshootRDP runbook allows the user to check or modify common settings on the target instance which may impact Remote Desktop Protocol (RDP) connections, such as the RDP port, Network Layer Authentication (NLA) and Windows Firewall profiles. Optionally, changes can be applied offline by stopping and starting the instance, if the user explicitly allows for offline remediation. By default, the runbook reads and outputs the values of the settings. AWSSupport-TroubleshootRDP 337 AWS Systems Manager Automation runbook reference User Guide Important Changes to the RDP settings, RDP service and Windows Firewall profiles should be carefully reviewed before using this runbook. Run this Automation (console) Document type Automation Owner Amazon Platforms Windows Parameters • Action Type: String Valid values: CheckAll | FixAll | Custom Default: Custom Description: (Optional) [Custom] Use the values from Firewall, RDPServiceStartupType, RDPServiceAction, RDPPortAction, NLASettingAction and RemoteConnections to manage the settings. [CheckAll] Read the values of the settings without changing them. [FixAll] Restore RDP default settings, and disable the Windows Firewall. • AllowOffline Type: String Valid values: true | false Default: false AWSSupport-TroubleshootRDP 338 AWS Systems Manager Automation runbook reference User Guide Description: (Optional) Fix only - Set it to true if you allow an offline RDP remediation in case the online troubleshooting fails, or the provided instance is not a managed instance. Note: For the offline remediation, SSM Automation stops the instance, and creates an AMI before attempting any operations. • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • Firewall Type: String Valid values: Check | Disable Default: Check Description: (Optional) Check or disable the Windows firewall (all profiles). • InstanceId Type: String Description: (Required) The ID of the instance to troubleshoot the RDP settings of. • NLASettingAction Type: String Valid values: Check | Disable Default: Check Description: (Optional) Check or disable Network Layer Authentication (NLA). • RDPPortAction Type: String AWSSupport-TroubleshootRDP 339 AWS Systems Manager Automation runbook reference User Guide Valid values: Check | Modify Default: Check Description: (Optional) Check the current port used for RDP connections,
|
systems-manager-automation-runbook-guide-086
|
systems-manager-automation-runbook-guide.pdf
| 86 |
Automation uses the permissions of the user that starts this runbook. • Firewall Type: String Valid values: Check | Disable Default: Check Description: (Optional) Check or disable the Windows firewall (all profiles). • InstanceId Type: String Description: (Required) The ID of the instance to troubleshoot the RDP settings of. • NLASettingAction Type: String Valid values: Check | Disable Default: Check Description: (Optional) Check or disable Network Layer Authentication (NLA). • RDPPortAction Type: String AWSSupport-TroubleshootRDP 339 AWS Systems Manager Automation runbook reference User Guide Valid values: Check | Modify Default: Check Description: (Optional) Check the current port used for RDP connections, or modify the RDP port back to 3389 and restart the service. • RDPServiceAction Type: String Valid values: Check | Start | Restart | Force-Restart Default: Check Description: (Optional) Check, start, restart, or force-restart the RDP service (TermService). • RDPServiceStartupType Type: String Valid values: Check | Auto Default: Check Description: (Optional) Check or set the RDP service to automatically start when Windows boots. • RemoteConnections Type: String Valid values: Check | Enable Default: Check Description: (Optional) An action to perform on the fDenyTSConnections setting: Check, Enable. • S3BucketName Type: String Description: (Optional) Offline only - S3 bucket name in your account where you want to upload the troubleshooting logs. Make sure the bucket policy does not grant unnecessary read/write permissions to parties that do not need access to the collected logs. AWSSupport-TroubleshootRDP 340 AWS Systems Manager Automation runbook reference User Guide • SubnetId Type: String Default: SelectedInstanceSubnet Description: (Optional) Offline only - The subnet ID for the EC2Rescue instance used to perform the offline troubleshooting. If no subnet ID is specified, AWS Systems Manager Automation will create a new VPC. IMPORTANT: The subnet must be in the same Availability Zone as InstanceId, and it must allow access to the SSM endpoints. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. It is recommended that the EC2 instance receiving the command has an IAM role with the AmazonSSMManagedInstanceCore Amazon managed policy attached. For the online remediation, the user must have at least ssm:DescribeInstanceInformation, ssm:StartAutomationExecution and ssm:SendCommand to run the automation and send the command to the instance, plus ssm:GetAutomationExecution to be able to read the automation output. For the offline remediation, the user must have at least ssm:DescribeInstanceInformation, ssm:StartAutomationExecution, ec2:DescribeInstances, plus ssm:GetAutomationExecution to be able to read the automation output. AWSSupport-TroubleshootRDP calls AWSSupport- ExecuteEC2Rescue to perform the offline remediation - please review the permissions for AWSSupport-ExecuteEC2Rescue to ensure you can run the automation successfully. Document Steps 1. aws:assertAwsResourceProperty - Check if the instance is a Windows Server instance 2. aws:assertAwsResourceProperty - Check if the instance is a managed instance 3. (Online troubleshooting) If the instance is a managed instance, then: a. aws:assertAwsResourceProperty - Check the provided Action value b. (Online check) If the Action = CheckAll, then: aws:runPowerShellScript - Runs the PowerShell script to get the Windows Firewall profiles status. AWSSupport-TroubleshootRDP 341 AWS Systems Manager Automation runbook reference User Guide aws:executeAutomation - Calls AWSSupport-ManageWindowsService to get the RDP service status. aws:executeAutomation - Calls AWSSupport-ManageRDPSettings to get the RDP settings. c. (Online fix) If the Action = FixAll, then: aws:runPowerShellScript - Runs the PowerShell script to disable all Windows Firewall profiles. aws:executeAutomation - Calls AWSSupport-ManageWindowsService to start the RDP service. aws:executeAutomation - Calls AWSSupport-ManageRDPSettings to enable remote connections and disable NLA. d. (Online management) If the Action = Custom, then: aws:runPowerShellScript - Runs the PowerShell script to manage the Windows Firewall profiles. aws:executeAutomation - Calls AWSSupport-ManageWindowsService to manage the RDP service. aws:executeAutomation - Calls AWSSupport-ManageRDPSettings to manage the RDP settings. 4. (Offline remediation) If the instance is not a managed instance then: a. aws:assertAwsResourceProperty - Assert AllowOffline = true b. aws:assertAwsResourceProperty - Assert Action = FixAll c. aws:assertAwsResourceProperty - Assert the value of SubnetId (Use the provided instance's subnet) If SubnetId is SELECTED_INSTANCE_SUBNET aws:executeAwsApi - Retrieve the current instance's subnet. aws:executeAutomation - Run AWSSupport-ExecuteEC2Rescue with provided instance's subnet. d. (Use the provided custom subnet) If SubnetId is not SELECTED_INSTANCE_SUBNET AWSSupport-TroubleshootRDP 342 AWS Systems Manager Automation runbook reference User Guide aws:executeAutomation - Run AWSSupport-ExecuteEC2Rescue with provided SubnetId value. Outputs manageFirewallProfiles.Output manageRDPServiceSettings.Output manageRDPSettings.Output checkFirewallProfiles.Output checkRDPServiceSettings.Output checkRDPSettings.Output disableFirewallProfiles.Output restoreDefaultRDPServiceSettings.Output restoreDefaultRDPSettings.Output troubleshootRDPOffline.Output troubleshootRDPOfflineWithSubnetId.Output AWSSupport-TroubleshootSSH Description The AWSSupport-TroubleshootSSH runbook installs the Amazon EC2Rescue tool for Linux, and then uses the EC2Rescue tool to check or attempt to fix common issues that prevent a remote connection to the Linux machine via SSH. Optionally, changes can be applied offline by stopping and starting the instance, if the user explicitly allows for offline remediation. By default, the runbook operates in read-only mode. Run this Automation (console) For information about working with the AWSSupport-TroubleshootSSH runbook, see this AWSSupport-TroubleshootSSH troubleshooting topic from AWS Premium Support. Document type AWSSupport-TroubleshootSSH 343 AWS Systems Manager Automation runbook reference User Guide Automation Owner Amazon Platforms Linux Parameters • Action Type:
|
systems-manager-automation-runbook-guide-087
|
systems-manager-automation-runbook-guide.pdf
| 87 |
Amazon EC2Rescue tool for Linux, and then uses the EC2Rescue tool to check or attempt to fix common issues that prevent a remote connection to the Linux machine via SSH. Optionally, changes can be applied offline by stopping and starting the instance, if the user explicitly allows for offline remediation. By default, the runbook operates in read-only mode. Run this Automation (console) For information about working with the AWSSupport-TroubleshootSSH runbook, see this AWSSupport-TroubleshootSSH troubleshooting topic from AWS Premium Support. Document type AWSSupport-TroubleshootSSH 343 AWS Systems Manager Automation runbook reference User Guide Automation Owner Amazon Platforms Linux Parameters • Action Type: String Valid values: CheckAll | FixAll Default: CheckAll Description: (Required) Specify whether to check for issues without fixing them or to check and automatically fix any discovered issues. • AllowOffline Type: String Valid values: true | false Default: false Description: (Optional) Fix only - Set it to true if you allow an offline SSH remediation in case the online troubleshooting fails, or the provided instance is not a managed instance. Note: For the offline remediation, SSM Automation stops the instance, and creates an AMI before attempting any operations. • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. AWSSupport-TroubleshootSSH 344 AWS Systems Manager Automation runbook reference User Guide • InstanceId Type: String Description: (Required) ID of your EC2 instance for Linux. • S3BucketName Type: String Description: (Optional) Offline only - S3 bucket name in your account where you want to upload the troubleshooting logs. Make sure the bucket policy does not grant unnecessary read/write permissions to parties that do not need access to the collected logs. • SubnetId Type: String Default: SelectedInstanceSubnet Description: (Optional) Offline only - The subnet ID for the EC2Rescue instance used to perform the offline troubleshooting. If no subnet ID is specified, AWS Systems Manager Automation will create a new VPC. Important The subnet must be in the same Availability Zone as InstanceId, and it must allow access to the SSM endpoints. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. It is recommended that the EC2 instance receiving the command has an IAM role with the AmazonSSMManagedInstanceCore Amazon managed policy attached. For the online remediation, the user must have at least ssm:DescribeInstanceInformation, ssm:StartAutomationExecution and ssm:SendCommand to run the automation and send the command to the instance, plus ssm:GetAutomationExecution to be able to read the automation output. For the offline remediation, the user must have at least ssm:DescribeInstanceInformation, ssm:StartAutomationExecution, ec2:DescribeInstances, plus ssm:GetAutomationExecution to AWSSupport-TroubleshootSSH 345 AWS Systems Manager Automation runbook reference User Guide be able to read the automation output. AWSSupport-TroubleshootSSH calls AWSSupport- ExecuteEC2Rescue to perform the offline remediation - please review the permissions for AWSSupport-ExecuteEC2Rescue to ensure you can run the automation successfully. Document Steps 1. aws:assertAwsResourceProperty - Check if the instance is a managed instance a. (Online remediation) If the instance is a managed instance, then: i. aws:configurePackage - Install EC2Rescue for Linux via AWS-ConfigureAWSPackage. ii. aws:runCommand - Run the bash script to run EC2Rescue for Linux. b. (Offline remediation) If the instance is not a managed instance then: i. aws:assertAwsResourceProperty - Assert AllowOffline = true ii. aws:assertAwsResourceProperty - Assert Action = FixAll iii. aws:assertAwsResourceProperty - Assert the value of SubnetId iv. (Use the provided instance's subnet) If SubnetId is SelectedInstanceSubnet us aws:executeAutomation to run AWSSupport-ExecuteEC2Rescue with provided instance's subnet. v. (Use the provided custom subnet) If SubnetId is not SelectedInstanceSubnet use aws:executeAutomation to run AWSSupport-ExecuteEC2Rescue with provided SubnetId value. Outputs troubleshootSSH.Output troubleshootSSHOffline.Output troubleshootSSHOfflineWithSubnetId.Output AWSSupport-TroubleshootSUSERegistration Description The AWSSupport-TroubleshootSUSERegistration runbook helps you to identify why registering an Amazon Elastic Compute Cloud (Amazon EC2) SUSE Linux Enterprise Server instance with SUSE Update Infrastructure failed. The automation output provides steps to resolve, or helps 346 AWSSupport-TroubleshootSUSERegistration AWS Systems Manager Automation runbook reference User Guide you troubleshoot, the issue. If the instance passes all checks during the automation, the instance is registered with SUSE Update Infrastructure. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • InstanceId Type: String Description: (Required) The ID of the Amazon EC2 instance you want to troubleshoot. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:DescribeInstanceProperties AWSSupport-TroubleshootSUSERegistration 347 AWS Systems Manager Automation runbook reference User Guide • ssm:DescribeInstanceInformation • ssm:ListCommandInvocations • ssm:SendCommand • ssm:ListCommands
|
systems-manager-automation-runbook-guide-088
|
systems-manager-automation-runbook-guide.pdf
| 88 |
Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • InstanceId Type: String Description: (Required) The ID of the Amazon EC2 instance you want to troubleshoot. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:DescribeInstanceProperties AWSSupport-TroubleshootSUSERegistration 347 AWS Systems Manager Automation runbook reference User Guide • ssm:DescribeInstanceInformation • ssm:ListCommandInvocations • ssm:SendCommand • ssm:ListCommands Document Steps • aws:assertAwsResourceProperty - Checks if the Amazon EC2 instance is managed by AWS Systems Manager. • aws:runCommand - Checks if the Amazon EC2 instance platform is SLES. • aws:runCommand - Checks if the package cloud-regionsrv-client version is greater than or equal to the required version 9.0.10. • aws:runCommand - Checks if the symbolic link for base product is broken, and fixes the link it it is broken. • aws:runCommand - Checks if the hosts file (/etc/hosts) contains records for smt-ec2- suscloud.net. The automation removes any duplicate entries. • aws:runCommand - Checks if the curl command is installed. • aws:runCommand - Checks if the Amazon EC2 instance can access the Instance Metadata Service (IMDS) address 169.254.169.254. • aws:runCommand - Checks if the Amazon EC2 instance has a billing code or AWS Marketplace product code. • aws:runCommand - Checks if the Amazon EC2 instance can reach at least 1 regional server over HTTPS. • aws:runCommand - Checks if the Amazon EC2 instance can reach the Subscription Management Tool (SMT) servers over HTTP. • aws:runCommand - Checks if the Amazon EC2 instance can reach the Subscription Management Tool (SMT) servers over HTTPS. • aws:runCommand - Checks if the Amazon EC2 instance can reach the smt- ec2.susecloud.net address over HTTPS. • aws:runCommand - Registers the Amazon EC2 instance with SUSE Update Infrastructure. • aws:executeScript - Gathers and outputs the output of all the previous steps. AWSSupport-TroubleshootSUSERegistration 348 AWS Systems Manager Automation runbook reference User Guide AWSSupport-TroubleshootWindowsPerformance Description The runbook AWSSupport-TroubleshootWindowsPerformance helps troubleshoot ongoing performance issues on Amazon Elastic Compute Cloud (Amazon EC2) Windows instance. The runbook captures logs from the target instance and analyzes CPU, memory, disk, and network performance metrics. Optionally, the automation can capture a process dump to help you determine the potential cause of performance degradation. The automation also captures the event and system logs by using the latest EC2Rescue tool, if you allow this runbook to install it. How does it work? The runbook performs the following steps: • Checks the Amazon EC2 instance for prerequisites. • Generates performance logs in the root disk of the Amazon EC2 Windows instance • Stores captured logs in folder C:\ProgramData\Amazon\SSM \TroubleshootWindowsPerformance • If an Amazon Simple Storage Service (Amazon S3) bucket is provided, and the automation assume role has the required permissions, the captured logs are uploaded to the Amazon S3 bucket. • Installs the latest EC2Rescue tool to the Amazon EC2 Windows instance to capture events and system logs if you choose to install it, but it does not analyze the process dump and logs captured by EC2Rescue. Important • To execute this runbook, the Amazon EC2 Windows instance must be managed by AWS Systems Manager. For more information, see Why is my Amazon EC2 instance not displaying as a managed node. • To execute this runbook, the Amazon EC2 Windows instance must be running on versions Windows 8.1 / Windows Server 2012 R2 (6.3) or newer with PowerShell 4.0 or above. For more information, see Windows Operating System version. • For the generation of performance logs, at least 10 GB of free space on the root device is required. If the root disk is larger than 100 GB, the free space must be greater than 10% AWSSupport-TroubleshootWindowsPerformance 349 AWS Systems Manager Automation runbook reference User Guide of the disk size. If you dump a process during execution, the free space must be greater than 10 GB plus the total memory size consumed by the process when the process consumes more than 10 GB memory. • The logs generated on the root device are not deleted automatically. • The runbook does not uninstall the EC2Rescue tool. For more information, see Use EC2Rescue for Windows Server. • It is best practice to run this automation during a performance impact. You can also run it periodically using an AWS Systems Manager State Manager association or by scheduling AWS Systems Manager Maintenance Windows. Run this Automation (console) Document type Automation Owner Amazon Platforms Windows Parameters Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ec2:DescribeInstances • ssm:DescribeAutomationExecutions • ssm:DescribeInstanceInformation • ssm:GetAutomationExecution • ssm:ListCommands • ssm:ListCommandInvocations • ssm:SendCommand AWSSupport-TroubleshootWindowsPerformance 350 AWS Systems Manager Automation runbook reference User
|
systems-manager-automation-runbook-guide-089
|
systems-manager-automation-runbook-guide.pdf
| 89 |
does not uninstall the EC2Rescue tool. For more information, see Use EC2Rescue for Windows Server. • It is best practice to run this automation during a performance impact. You can also run it periodically using an AWS Systems Manager State Manager association or by scheduling AWS Systems Manager Maintenance Windows. Run this Automation (console) Document type Automation Owner Amazon Platforms Windows Parameters Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ec2:DescribeInstances • ssm:DescribeAutomationExecutions • ssm:DescribeInstanceInformation • ssm:GetAutomationExecution • ssm:ListCommands • ssm:ListCommandInvocations • ssm:SendCommand AWSSupport-TroubleshootWindowsPerformance 350 AWS Systems Manager Automation runbook reference User Guide • s3:ListBucket • s3:GetEncryptionConfiguration • s3:GetBucketPublicAccessBlock • s3:GetBucketPolicyStatus • s3:PutObject • s3:GetBucketAcl • s3:GetAccountPublicAccessBlock (Optional) The IAM role attached on the instance profile or IAM user configured on the instance requires the following actions to upload logs to the Amazon S3 bucket specified for parameter LogUploadBucketName: • s3:PutObject • s3:GetObject • s3:ListBucket Instructions Follow these steps to configure the automation: 1. Navigate to AWSSupport-TroubleshootWindowsPerformance in Systems Manager under Documents. 2. Select Execute automation. 3. For the input parameters, enter the following: • AutomationAssumeRole (Optional): The Amazon Resource Name (ARN) of the AWS AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user who starts this runbook. • InstanceId (Required): The ID of the target Amazon EC2 Windows instance where you want to run the automation. The instance must be managed by Systems Manager to execute the automation. • CaptureProcessDump (Optional): AWSSupport-TroubleshootWindowsPerformance 351 AWS Systems Manager Automation runbook reference User Guide The process dump type to capture. The automation can capture one process dump for the process that is potentially causing the performance impact in the beginning of the automation. The instance root volume requires at least 10 GB free space (greater than 10% of the disk size when the root volume size is bigger than 100 GB, and 10 GB plus the total memory size consumed by the process when the process consumes more than 10 GB memory). • LogCaptureDuration (Optional): The number of minutes, between 1 and 15, that this automation will capture logs while the issue is present. Default is 5. • LogUploadBucketName (Optional): The Amazon S3 bucket in your account where you want to upload the logs. The bucket must be configured with server-side encryption (SSE), and the bucket policy must not grant unnecessary read/write permissions to parties that do not need access to the captured logs. The Amazon EC2 Windows instance must have access to the Amazon S3 bucket. • InstallEC2RescueTool (Optional): Set to Yes to allow the runbook to install the latest version of the EC2Rescue tool to capture the Windows Events and System logs. Default is No. • Acknowledgement (Required): Read the complete details of the actions performed by this automation runbook and if you agree, type Yes, I understand and acknowledge. 4. Select Execute. AWSSupport-TroubleshootWindowsPerformance 352 AWS Systems Manager Automation runbook reference User Guide 5. The automation initiates. 6. The document performs the following steps: • CheckConcurrency: Ensures that there is only one execution of this runbook targeting the instance. If the runbook finds another execution targeting the same instance, it returns an error and ends. • AssertInstanceIsWindows: Asserts that the Amazon EC2 instance is running on Windows Operating System. Otherwise, the automation ends. • AssertInstanceIsManagedInstance: Asserts that the Amazon EC2 instance is managed by AWS Systems Manager. Otherwise the automation ends. • VerifyPrerequisites: Verifies the PowerShell version on the instance OS and ensures that the instance can be connected through Systems Manager to run PowerShell commands. This automation supports PowerShell 4.0 and above running on versions Windows 8.1 / Server 2012 R2 (6.3) or newer. If the version is older, the automation fails. When you choose to upload logs to Amazon S3 bucket, this automation Checks that the AWS Tools for PowerShell module is available. If not, the automation ends. • BranchOnProcessDump: Branches based on if you set it to capture the dump of processes that impacted performance. • CaptureProcessDump: Checks if the instance has enough space to run this automation (when you choose Highest CPU / Memory). • CapturePerformanceLogs: Checks the disk space again and runs the PowerShell script on the instance to create perfmon counters and start Performance Monitor and Windows Performance Recorder logging. The script stops after the defined LogCaptureDuration is met. • SummarizePerformanceLogs: AWSSupport-TroubleshootWindowsPerformance 353 AWS Systems Manager Automation runbook reference User Guide Summarizes the XML report generated on the previous step, CapturePerformanceLogs, to find the responsible process consuming the most WorkingSet64 (Memory) and % Processor Time (CPU) shown as output on the automation. It generates similar information for usage of LogicalDisk, Network Interface, Memory, TCPv4, IPv4, and UDPv4 and saves it to analysis_output.log
|
systems-manager-automation-runbook-guide-090
|
systems-manager-automation-runbook-guide.pdf
| 90 |
• CapturePerformanceLogs: Checks the disk space again and runs the PowerShell script on the instance to create perfmon counters and start Performance Monitor and Windows Performance Recorder logging. The script stops after the defined LogCaptureDuration is met. • SummarizePerformanceLogs: AWSSupport-TroubleshootWindowsPerformance 353 AWS Systems Manager Automation runbook reference User Guide Summarizes the XML report generated on the previous step, CapturePerformanceLogs, to find the responsible process consuming the most WorkingSet64 (Memory) and % Processor Time (CPU) shown as output on the automation. It generates similar information for usage of LogicalDisk, Network Interface, Memory, TCPv4, IPv4, and UDPv4 and saves it to analysis_output.log in the output folder. • BranchOnInstallEC2Rescue: Branches if you set it to install the latest EC2Rescue tool in the Amazon EC2 instance. • InstallEC2RescueTool: Installs the EC2Rescue tool in the instance OS to capture EC2Rescue logs using AWS- ConfigureAWSPackage. • RunEC2RescueTool: Runs the EC2Rescue tool in the instance OS to capture all logs needed. EC2Rescue captures only the required logs to save space. • BranchOnIfS3BucketProvided: Branches based on user input of LogUploadBucketName to see if there is a bucket name available to upload logs. • GetS3BucketPublicStatus: Determines if an Amazon S3 bucket is provided, and if so, confirms that the Amazon S3 bucket is not public and is configured with SSE. • UploadLogResult: Uploads the logs to the Amazon S3 bucket provided. If the PowerShell version is 5.0 or above, it compresses the logs to a ZIP archive and uploads them. It deletes the ZIP file after upload completes. If the PowerShell version is below 5.0, it uploads the files directly to a folder. • CleanUpLogsOnFailure: Cleans all the logs generated by the CapturePerformanceLogs step when it fails. The CleanUpLogsOnFailure step may fail or timeout if SSM Agent isn't working correctly, or the Windows system is unresponsive. 7. After completed, review the Outputs section for the detailed results of the execution: Execution where the target instance has all required prerequisites. AWSSupport-TroubleshootWindowsPerformance 354 AWS Systems Manager Automation runbook reference User Guide Execution where the target instance is on Linux platform and the execution failed. You would select the step ID to see the failure details. The failure details of step AssertInstanceIsWindows. AWSSupport-TroubleshootWindowsPerformance 355 AWS Systems Manager Automation runbook reference User Guide References Systems Manager Automation • Run this Automation (console) • Run an automation • Setting up an Automation • Support Automation Workflows landing page AWSSupport-TroubleshootWindowsUpdate Description The AWSSupport-TroubleshootWindowsUpdate runbook is used to identify issues that could fail the Windows updates for Amazon Elastic Compute Cloud (Amazon EC2) Windows instances. How does it work? The runbook performs the following steps: • Checks if the target Amazon EC2 instance is managed by AWS Systems Manager. • Checks if the AWS Systems Manager Agent (SSM Agent) and Windows Server versions are supported for Systems Manager patching operations. • Checks the available disk space recommended for Windows updates and if a reboot is pending. A pending reboot normally indicates that updates are pending, and a reboot is required before performing additional updates. • Configures the proxy settings at the operating system level, which can help troubleshoot connectivity issues. • Performs an Amazon Simple Storage Service (Amazon S3) endpoint connectivity test and calls the GetDeployablePatchSnapshotForInstance API operation to retrieve the current snapshot for the patch baseline the managed node uses. AWSSupport-TroubleshootWindowsUpdate 356 AWS Systems Manager Automation runbook reference User Guide • If the connection fails, provides the option to run the AWSSupport- AnalyzeAWSEndpointReachabilityFromEC2 runbook to analyze the instance's connectivity to Amazon S3 endpoints. • Validates the Windows updates configuration and tests Windows Server Update Services (WSUS) (if applicable). Important • Active Directory domain controllers are not supported. • Windows Server version 2008 R2 or previous versions are not supported. • SSM Agent 1.2.371 or previous versions are not supported. • The AWSSupport-AnalyzeAWSEndpointReachabilityFromEC2 runbook uses VPC Reachability Analyzer to analyze the network connectivity between a source and a service endpoint. You are charged per analysis run between a source and destination. For more details, see Amazon VPC Pricing. • The AWSSupport-AnalyzeAWSEndpointReachabilityFromEC2 runbook is not available in all regions where Systems Manager is supported. Run this Automation (console) Document type Automation Owner Amazon Platforms Windows Parameters Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. AWSSupport-TroubleshootWindowsUpdate 357 AWS Systems Manager Automation runbook reference User Guide • ssm:StartAutomationExecution • ssm:GetAutomationExecution • ssm:DescribeInstanceInformation • ssm:SendCommand • ssm:ListCommandInvocations • ssm:ListCommands Note To run the child runbook AWSSupport-AnalyzeAWSEndpointReachabilityFromEC2, add the permissions listed in this document. Instructions Follow these steps to configure the automation: 1. Navigate to AWSSupport-TroubleshootWindowsUpdate in Systems Manager under Documents. 2. Select Execute automation. 3. For the input parameters, enter the following: • AutomationAssumeRole (Optional): The Amazon Resource Name (ARN) of the AWS AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If
|
systems-manager-automation-runbook-guide-091
|
systems-manager-automation-runbook-guide.pdf
| 91 |
use the runbook successfully. AWSSupport-TroubleshootWindowsUpdate 357 AWS Systems Manager Automation runbook reference User Guide • ssm:StartAutomationExecution • ssm:GetAutomationExecution • ssm:DescribeInstanceInformation • ssm:SendCommand • ssm:ListCommandInvocations • ssm:ListCommands Note To run the child runbook AWSSupport-AnalyzeAWSEndpointReachabilityFromEC2, add the permissions listed in this document. Instructions Follow these steps to configure the automation: 1. Navigate to AWSSupport-TroubleshootWindowsUpdate in Systems Manager under Documents. 2. Select Execute automation. 3. For the input parameters, enter the following: • AutomationAssumeRole (Optional): The Amazon Resource Name (ARN) of the AWS AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user who starts this runbook. • InstanceId (Required): Enter the ID of the Amazon EC2 instance where the Windows update failed. • RunVpcReachabilityAnalyzer (Optional): Specify true to run the AWSSupport-AnalyzeAWSEndpointReachabilityFromEC2 automation if a network issue is determined by the extended checks or if the instance ID specified is not a managed instance. For more information on this child automation, refer to the documentation. The default value is false. AWSSupport-TroubleshootWindowsUpdate 358 AWS Systems Manager Automation runbook reference User Guide • RetainVpcReachabilityAnalysis (Optional): Only relevant if RunVpcReachabilityAnalyzer is true. Specify true to retain the network insight path and related analyses created by Reachability Analyzer. By default, those resources are deleted after successful analysis. If you choose to retain the analysis, the child runbook does not delete the analysis and you can visualize it in the Amazon VPC console. The console link will be available in the child automation output. The default value false. 4. Select Execute. 5. The automation initiates. 6. The document performs the following steps: • getWindowsServerAndSSMAgentVersion: Verifies that the target instance is managed by AWS Systems Manager and gets details about the SSM Agent version and Windows version. • assertifInstanceIsSsmManaged: Ensures the Amazon EC2 instance is managed by AWS Systems Manager (SSM), otherwise the automation ends. • CheckProxy: Checks for all proxy types for the Windows instance. • CheckPrerequisites: AWSSupport-TroubleshootWindowsUpdate 359 AWS Systems Manager Automation runbook reference User Guide Gets the SSM Agent version and Windows version, and determines if it is an Active Directory Domain Controller (DC). If the instance is a DC or the SSM Agent or Windows version is not supported, the runbook stops. • CheckDiskSpace: Gets and validates the available disk space over the Windows instance if it is sufficient for performing the Windows update. • CheckPendingReboot: Checks for any pending reboot over the Windows instance. • CheckS3Connectivity: Checks if the instance can reach the Amazon S3 endpoints for Patchbaseline. • branchOnRunVpcReachabilityAnalyzer: If RunVpcReachabilityAnalyzer is true, then it branches the automation to run deeper analysis for the debugging Amazon S3 connectivity. • GenerateEndpoints: Generates an endpoint to have an extended connectivity check for the Amazon S3 endpoint. • analyzeAwsEndpointReachabilityFromEC2: Calls the automation runbook, AWSSupport- AnalyzeAWSEndpointReachabilityFromEC2. to check the reachability of the selected instance to the required endpoints. • CheckWindowsUpdateServices: Checks the Windows Update service status and start type. • CheckWindowsUpdateSettings: Checks for Windows Update policies configured over the Windows instance. • CheckWSUSSettings: Checks whether the Windows update is configured with WSUS or Microsoft Update Catalog and verifies connectivity. • CheckWUGlobalSettings: AWSSupport-TroubleshootWindowsUpdate 360 AWS Systems Manager Automation runbook reference User Guide Checks the Windows Update global settings configured over the Windows instance. • GenerateLogs: Downloads Windows Update logs and CBS logs onto the instance desktop and checks Windows event logs for failure. • FinalReport: Generates a complete report of all steps. 7. After completed, review the Outputs section for the detailed results of the execution: AWSSupport-TroubleshootWindowsUpdate 361 AWS Systems Manager Automation runbook reference User Guide References Systems Manager Automation • Run this Automation (console) • Run an automation AWSSupport-TroubleshootWindowsUpdate 362 AWS Systems Manager Automation runbook reference User Guide • Setting up an Automation • Support Automation Workflows landing page Documentation related to the AWS service • Refer to the article, TroubleShoot Windows Update, for more information. AWSSupport-UpgradeWindowsAWSDrivers Description The AWSSupport-UpgradeWindowsAWSDrivers runbook upgrades or repairs storage and network AWS drivers on the specified EC2 instance. The runbook attempts to install the latest versions of AWS drivers online by calling SSM Agent. If SSM Agent is not contactable, the runbook can perform an offline installation of the AWS drivers if explicitly requested. This runbook supports the following operating systems: • Windows Server 2016 • Windows Server 2019 • Windows Server 2022 • Windows Server 2025 Note Both the online and offline upgrade will create an AMI before attempting any operations, which will persist after the automation completes. It is your responsibility to secure access to the AMI, or to delete it. The online method restarts the instance as part of the upgrade process, while the offline method requires the provided EC2 instance be stopped and then started. Important If your instances connect to AWS Systems Manager
|
systems-manager-automation-runbook-guide-092
|
systems-manager-automation-runbook-guide.pdf
| 92 |
the AWS drivers if explicitly requested. This runbook supports the following operating systems: • Windows Server 2016 • Windows Server 2019 • Windows Server 2022 • Windows Server 2025 Note Both the online and offline upgrade will create an AMI before attempting any operations, which will persist after the automation completes. It is your responsibility to secure access to the AMI, or to delete it. The online method restarts the instance as part of the upgrade process, while the offline method requires the provided EC2 instance be stopped and then started. Important If your instances connect to AWS Systems Manager using VPC endpoints, this runbook will fail unless used in the us-east-1 Region. This runbook will also fail on a domain controller. AWSSupport-UpgradeWindowsAWSDrivers 363 AWS Systems Manager Automation runbook reference User Guide To update AWS PV drivers on a domain controller, see Upgrade a Domain Controller (AWS PV Upgrade). Run this Automation (console) Document type Automation Owner Amazon Platforms Windows Parameters • AllowOffline Type: String Valid values: true | false Default: false Description: (Optional) Set it to true if you allow an offline drivers upgrade in case the online installation cannot be performed. Note: The offline method requires the provided EC2 instance be stopped and then started. Data stored in instance store volumes will be lost. The public IP address will change if you are not using an Elastic IP. • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • ForceUpgrade AWSSupport-UpgradeWindowsAWSDrivers 364 AWS Systems Manager Automation runbook reference User Guide Type: String Valid values: true | false Default: false Description: (Optional) Offline only - Set it to true if you allow the offline drivers upgrade to proceed even though your instance already has the latest drivers installed. • InstanceId Type: String Description: (Required) ID of your EC2 instance for Windows Server. • SubnetId Type: String Default: SelectedInstanceSubnet Description: (Optional) Offline only - The subnet ID for the EC2Rescue instance used to perform the offline drivers upgrade. If no subnet ID is specified, Systems Manager Automation will create a new VPC. Important The subnet must be in the same Availability Zone as InstanceId, and it must allow access to the SSM endpoints. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. The EC2 instance receiving the command must at minimum have an IAM role that includes permissions for ssm:StartAutomationExecution and ssm:SendCommand to run the automation and send the command to the instance, plus ssm:GetAutomationExecution to be able to read the automation output. You can attach the AmazonSSMManagedInstanceCore Amazon managed policy to your IAM role to provide these permissions. We recommend, however, using the AWSSupport-UpgradeWindowsAWSDrivers 365 AWS Systems Manager Automation runbook reference User Guide Automation IAM role AmazonSSMAutomationRole for this purpose. For more information, see Use IAM to configure roles for Automation. If you are performing an offline upgrade, see the permissions required by AWSSupport- StartEC2RescueWorkflow. Document Steps 1. aws:assertAwsResourceProperty - Verifies the input instance is Windows. 2. aws:assertAwsResourceProperty - Verifies the input instance is a managed instance. If so, the online upgrade starts, otherwise the offline upgrade is evaluated. a. (Online upgrade) If the input instance is a managed instance: i. aws:createImage - Creates an AMI backup. ii. aws:createTags - Tags the AMI backup. iii. aws:runCommand - Installs ENA network driver via AWS-ConfigureAWSPackage. iv. aws:runCommand - Installs NVMe driver via AWS-ConfigureAWSPackage. v. aws:runCommand - Installs AWS PV driver via AWS-ConfigureAWSPackage. b. (Offline upgrade) If the input instance is not a managed instance: i. aws:assertAwsResourceProperty - Verifies the AllowOffline flag is set to true. If so, the offline upgrade starts, otherwise the automation ends. ii. aws:changeInstanceState - Stop the source instance. iii. aws:changeInstanceState - Force-stop the source instance. iv. aws:createImage - Create an AMI backup of the source instance. v. aws:createTags - Tag the AMI backup of the source instance. vi. aws:executeAwsApi - Enable ENA for the instance vii.aws:assertAwsResourceProperty - Assert the ForceUpgrade flag. viii.Force offline upgrade) If ForceUpgrade = true then run aws:executeAutomation to invoke AWSSupport-StartEC2RescueWorkflow with the drivers force upgrade script. This installs the drivers regardless of the current version that is installed ix. (Offline upgrade) If ForceUpgrade = false then run aws:executeAutomation to invoke AWSSupport-StartEC2RescueWorkflow with the drivers upgrade script. Outputs AWSSupport-UpgradeWindowsAWSDrivers 366 AWS Systems Manager Automation runbook reference User Guide preUpgradeBackup.ImageId preOfflineUpgradeBackup.ImageId installAwsEnaNetworkDriverOnInstance.Output installAWSNVMeOnInstance.Output installAWSPVDriverOnInstance.Output upgradeDriversOffline.Output forceUpgradeDriversOffline.Output Amazon ECS AWS Systems Manager Automation provides predefined runbooks for Amazon Elastic Container Service. For more information about runbooks, see Working with runbooks. For information about how to view runbook content, see View runbook content. Topics • AWSSupport-CollectECSInstanceLogs • AWS-InstallAmazonECSAgent • AWS-ECSRunTask •
|
systems-manager-automation-runbook-guide-093
|
systems-manager-automation-runbook-guide.pdf
| 93 |
to invoke AWSSupport-StartEC2RescueWorkflow with the drivers force upgrade script. This installs the drivers regardless of the current version that is installed ix. (Offline upgrade) If ForceUpgrade = false then run aws:executeAutomation to invoke AWSSupport-StartEC2RescueWorkflow with the drivers upgrade script. Outputs AWSSupport-UpgradeWindowsAWSDrivers 366 AWS Systems Manager Automation runbook reference User Guide preUpgradeBackup.ImageId preOfflineUpgradeBackup.ImageId installAwsEnaNetworkDriverOnInstance.Output installAWSNVMeOnInstance.Output installAWSPVDriverOnInstance.Output upgradeDriversOffline.Output forceUpgradeDriversOffline.Output Amazon ECS AWS Systems Manager Automation provides predefined runbooks for Amazon Elastic Container Service. For more information about runbooks, see Working with runbooks. For information about how to view runbook content, see View runbook content. Topics • AWSSupport-CollectECSInstanceLogs • AWS-InstallAmazonECSAgent • AWS-ECSRunTask • AWSSupport-TroubleshootECSContainerInstance • AWSSupport-TroubleshootECSTaskFailedToStart • AWS-UpdateAmazonECSAgent AWSSupport-CollectECSInstanceLogs Description The AWSSupport-CollectECSInstanceLogs runbook collects operating system and Amazon Elastic Container Service (Amazon ECS) related log files from an Amazon Elastic Compute Cloud (Amazon EC2) instance to help you troubleshoot common Amazon ECS issues. While the automation is collecting the associated log files, changes are made to the file system. These changes include the creation of temporary directories and a log directory, the copying of log files to these directories, and compressing the log files into an archive. Amazon ECS 367 AWS Systems Manager Automation runbook reference User Guide If you specify a value for the LogDestination parameter, the target instance must have the AWS Command Line Interface (AWS CLI) for Linux instances or AWS Tools for Windows PowerShell for Windows instances installed. The automation evaluates the policy status of the Amazon Simple Storage Service (Amazon S3) bucket you specify. To help with the security of the logs gathered from your Amazon EC2 instance, if the policy status isPublic is set to true , or if the access control list (ACL) grants READ|WRITE permissions to the All Users Amazon S3 predefined group, the logs are not uploaded. Additionaly, if the provided bucket is not available in your account, the logs are not uploaded. For more information about Amazon S3 predefined g roups, see Amazon S3 predefined groups in the Amazon Simple Storage Service User Guide . Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • ECSInstanceId Type: String Description: (Required) The ID of the instance you want to collect logs from. The instance you specify must be managed by Systems Manager. • LogDestination AWSSupport-CollectECSInstanceLogs 368 AWS Systems Manager Automation runbook reference User Guide Type: String Description: (Optional) The Amazon S3 bucket in your AWS account to upload the archived logs to. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:ListCommandInvocations • ssm:ListCommands • ssm:SendCommand • ssm:DescribeInstanceInformation We recommend that the Amazon EC2 instance you specify in the ECSInstanceId parameter has an IAM role with the AmazonSSMManagedInstanceCore Amazon managed policy attached. To upload the log archive to the Amazon S3 bucket you specify in the LogDestination parameter, you must add following permissions: • s3:PutObject • s3:ListBucket • s3:GetBucketPolicyStatus • s3:GetBucketAcl Document Steps • assertInstanceIsManaged - Verifies whether the instance you specify in the ECSInstanceId parameter is managed by Systems Manager. • getInstancePlatform - Gets information about the operating system (OS) platform of the instance specified in the ECSInstanceId parameter. • verifyInstancePlatform - Branches the automation based on the OS platform. • runLogCollectionScriptOnLinux - Gathers operating system and Amazon ECS related log files on Linux instances and creates an archive file in the /var/log/collectECSlogs directory. AWSSupport-CollectECSInstanceLogs 369 AWS Systems Manager Automation runbook reference User Guide • runLogCollectionScriptOnWindows - Gathers operating system and Amazon ECS related log files on Windows instances and creates an archive file in the C:\ProgramData \collectECSlogs directory. • verifyIfS3BucketProvided - Verifies whether a value was specified for the LogDestination parameter. • runUploadScript - Branches the automation step based on the OS platform. • runUploadScriptOnLinux - Uploads the log archive to the Amazon S3 bucket specified in the LogDestination parameter and deletes the archived log file from OS. • runUploadScriptOnWindows - Uploads the log archive to the Amazon S3 bucket specified in the LogDestination parameter and deletes the archived log file from OS. AWS-InstallAmazonECSAgent Description The AWS-InstallAmazonECSAgent runbook installs the Amazon Elastic Container Service (Amazon ECS) agent on the Amazon Elastic Compute Cloud (Amazon EC2) instance you specify. This runbook only supports Amazon Linux and Amazon Linux 2 instances. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux Parameters • AutomationAssumeRole Type: String AWS-InstallAmazonECSAgent 370 AWS Systems Manager Automation runbook reference User Guide Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on
|
systems-manager-automation-runbook-guide-094
|
systems-manager-automation-runbook-guide.pdf
| 94 |
in the LogDestination parameter and deletes the archived log file from OS. AWS-InstallAmazonECSAgent Description The AWS-InstallAmazonECSAgent runbook installs the Amazon Elastic Container Service (Amazon ECS) agent on the Amazon Elastic Compute Cloud (Amazon EC2) instance you specify. This runbook only supports Amazon Linux and Amazon Linux 2 instances. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux Parameters • AutomationAssumeRole Type: String AWS-InstallAmazonECSAgent 370 AWS Systems Manager Automation runbook reference User Guide Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • InstanceIds Type: StringList Description: (Required) The IDs of the Amazon EC2 instances you want to install the Amazon ECS agent on. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution • ssm:GetAutomationExecution • ssm:GetCommandInvocation • ec2:DescribeImages • ec2:DescribeInstanceAttribute • ec2:DescribeInstances Document Steps aws:executeScript - Installs the Amazon ECS agent on the Amazon EC2 instances you specify in the InstanceIds parameter. Outputs InstallAmazonECSAgent.SuccessfulInstances - The ID of the instance where installation of the Amazon ECS agent succeeded. InstallAmazonECSAgent.FailedInstances - The ID of the instance where installation of the Amazon ECS agent failed. InstallAmazonECSAgent.InProgressInstances - The ID of the instance where installation of the Amazon ECS agent is in progress. AWS-InstallAmazonECSAgent 371 AWS Systems Manager Automation runbook reference User Guide AWS-ECSRunTask Description The AWS-ECSRunTask runbook runs the Amazon Elastic Container Service (Amazon ECS) task that you specify. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • capacityProviderStrategy Type: String Description: (Optional) The capacity provider strategy to use for the task. • cluster Type: String Description: (Optional) The short name or ARN of the cluster to run your task on. If you do not specify a cluster, the default cluster is used. • count AWS-ECSRunTask 372 AWS Systems Manager Automation runbook reference User Guide Type: String Description: (Optional) The number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for each request. • enableECSManagedTags Type: Boolean Description: (Optional) Specifies whether to use Amazon ECS managed tags for the task. For more information, see Tagging your Amazon ECS resources in the Amazon Elastic Container Service Developer Guide. • enableExecuteCommand Type: Boolean Description: (Optional) Determines whether to activate the execute command functionality for the containers in this task. If true, this activates execute command functionality on all containers in the task. • group Type: String Description: (Optional) The name of the task group to associate with the task. The default value is the family name of the task definition. For example, family:my-family-name. • launchType Type: String Valid values: EC2 | FARGATE | EXTERNAL Description: (Optional) The infrastructure to run your standalone task on. • networkConfiguration Type: String Description: (Optional) The network configuration for the task. This parameter is required for task definitions that use the awsvpc network mode to receive their own elastic network interface, and it isn't supported for other network modes. • overrides AWS-ECSRunTask 373 AWS Systems Manager Automation runbook reference User Guide Type: String Description: (Optional) A list of container overrides in JSON format that specify the name of a container in the specified task definition and the overrides it should receive. You can override the default command for a container that's specified in the task definition or Docker image with a command override. You can also override existing environment variables that are specified in the task definition or Docker image on a container. Additionally, you can add new environment variables with an environment override. • placementConstraints Type: String Description: (Optional) An array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task including constraints in the task definition and those specified at runtime. • placementStrategy Type: String Description: (Optional) The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task. • platformVersion Type: String Description: (Optional) The platform version that the task uses. A platform version is only specified for tasks hosted on Fargate. If a platform version isn't specified, the LATEST platform version is used. • propagateTags Type: String Description: (Optional) Determines whether tags propagate from the task definition to the task. If no value is specified, the tags aren't propagated. Tags can only be propagated to the task
|
systems-manager-automation-runbook-guide-095
|
systems-manager-automation-runbook-guide.pdf
| 95 |
specified at runtime. • placementStrategy Type: String Description: (Optional) The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task. • platformVersion Type: String Description: (Optional) The platform version that the task uses. A platform version is only specified for tasks hosted on Fargate. If a platform version isn't specified, the LATEST platform version is used. • propagateTags Type: String Description: (Optional) Determines whether tags propagate from the task definition to the task. If no value is specified, the tags aren't propagated. Tags can only be propagated to the task during task creation. • referenceId Type: String AWS-ECSRunTask 374 AWS Systems Manager Automation runbook reference User Guide Description: (Optional) The reference ID to use for the task. The reference ID can have a maximum length of 1024 characters. • startedBy Type: String Description: (Optional) An optional tag specified when a task is started. This helps you identify which tasks belong to a specific job by filtering the results of a ListTasks API operation. Up to 36 letters (uppercase and lowercase), numbers, hyphens (-), and underscores (_) are allowed. • tags Type: String Description: (Optional) Metadata that you want to apply to the task to help you categorize and organize tasks. Each tag consists of a user-defined key and value. • taskDefinition Type: String Description: (Optional) The family and revision (family:revision) or full ARN of the task definition to run. If a revision isn't specified, the latest ACTIVE revision is used. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ecs:RunTask Document Steps aws:executeScript - Runs the Amazon ECS task based on the values that you specify for the runbook input parameters. AWSSupport-TroubleshootECSContainerInstance Description AWSSupport-TroubleshootECSContainerInstance 375 AWS Systems Manager Automation runbook reference User Guide The AWSSupport-TroubleshootECSContainerInstance runbook helps you troubleshoot an Amazon Elastic Compute Cloud (Amazon EC2) instance that fails to register with an Amazon ECS cluster. This automation reviews whether the user data for the instance contains the correct cluster information, whether the instance profile contains the required permissions, and network configuration issues. Important To successfully run this automation, the state of your Amazon EC2 instance must be running , and the Amazon ECS cluster state must be ACTIVE . Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • ClusterName Type: String Description: (Required) The name of the Amazon ECS cluster that the instance failed to register with. AWSSupport-TroubleshootECSContainerInstance 376 AWS Systems Manager Automation runbook reference User Guide • InstanceId Type: String Description: (Required) The ID of the Amazon EC2 instance you want to troubleshoot. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ec2:DescribeIamInstanceProfileAssociations • ec2:DescribeInstanceAttribute • ec2:DescribeInstances • ec2:DescribeNetworkAcls • ec2:DescribeRouteTables • ec2:DescribeSecurityGroups • ec2:DescribeSubnets • ec2:DescribeVpcEndpoints • ec2:DescribeVpcs • iam:GetInstanceProfile • iam:GetRole • iam:SimulateCustomPolicy • iam:SimulatePrincipalPolicy Document Steps aws:executeScript: Reviews whether the Amazon EC2 instance meets the prerequisites needed to register with an Amazon ECS cluster. AWSSupport-TroubleshootECSTaskFailedToStart Description The AWSSupport-TroubleshootECSTaskFailedToStart runbook helps you troubleshoot why an Amazon Elastic Container Service (Amazon ECS) task in an Amazon ECS cluster failed to start. AWSSupport-TroubleshootECSTaskFailedToStart 377 AWS Systems Manager Automation runbook reference User Guide You must run this runbook in the same AWS Region as your task that failed to start. The runbook analyzes the following common issues that can prevent a task from starting: • Network connectivity to the configured container registry • Missing IAM permissions required by the task execution role • VPC endpoint connectivity • Security group rule configuration • AWS Secrets Manager secrets references • Logging configuration Note If the analysis determines that network connectivity needs to be tested, a Lambda function and requisite IAM role are created in your account. These resources are used to simulate the network connectivity of your failed task. The automation deletes these resources when they're no longer required. However, if the automation fails to delete the resources, you must do so manually. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String AWSSupport-TroubleshootECSTaskFailedToStart 378 AWS Systems Manager Automation runbook reference User Guide Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • ClusterName Type: String Description: (Required) The name of the Amazon ECS cluster where
|
systems-manager-automation-runbook-guide-096
|
systems-manager-automation-runbook-guide.pdf
| 96 |
the automation fails to delete the resources, you must do so manually. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux, macOS, Windows Parameters • AutomationAssumeRole Type: String AWSSupport-TroubleshootECSTaskFailedToStart 378 AWS Systems Manager Automation runbook reference User Guide Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • ClusterName Type: String Description: (Required) The name of the Amazon ECS cluster where the task failed to start. • CloudwatchRetentionPeriod Type: Integer Description: (Optional) The retention period, in days, for the Lambda function logs to be stored in Amazon CloudWatch Logs. This is only necessary if the analysis determines network connectivity needs to be tested. Valid values: 1 | 3 | 5 | 7 | 14 | 30 | 60 | 90 Default: 30 • TaskId Type: String Description: (Required) The ID of the failed task. Use the most recently failed task. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • cloudtrail:LookupEvents • ec2:DeleteNetworkInterface • ec2:DescribeInstances • ec2:DescribeInstanceAttribute • ec2:DescribeIamInstanceProfileAssociations • ec2:DescribeSecurityGroups AWSSupport-TroubleshootECSTaskFailedToStart 379 AWS Systems Manager Automation runbook reference User Guide • ec2:DescribeNetworkAcls • ec2:DescribeNetworkInterfaces • ec2:DescribeRouteTables • ec2:DescribeSubnets • ec2:DescribeVpcEndpoints • ec2:DescribeVpcs • ecr:DescribeImages • ecr:GetRepositoryPolicy • ecs:DescribeContainerInstances • ecs:DescribeServices • ecs:DescribeTaskDefinition • ecs:DescribeTasks • iam:AttachRolePolicy • iam:CreateRole • iam:DeleteRole • iam:DetachRolePolicy • iam:GetInstanceProfile • iam:GetRole • iam:ListRoles • iam:PassRole • iam:SimulateCustomPolicy • iam:SimulatePrincipalPolicy • kms:DescribeKey • lambda:CreateFunction • lambda:DeleteFunction • lambda:GetFunctionConfiguration • lambda:InvokeFunction • lambda:TagResource AWSSupport-TroubleshootECSTaskFailedToStart 380 AWS Systems Manager Automation runbook reference User Guide • logs:DescribeLogGroups • logs:PutRetentionPolicy • secretsmanager:DescribeSecret • ssm:DescribeParameters • sts:GetCallerIdentity Document Steps • aws:executeScript - Verifies that the user or role who started the automation has the required IAM permissions. If you don't have sufficient permissions to use this runbook, the missing required permissions are included in the output of the automation. • aws:branch - Branches based on whether you have permissions to all required actions for the runbook. • aws:executeScript - Creates a Lambda function in your VPC if the analysis determines network connectivity needs to be tested. • aws:branch - Branches based on the results of the previous step. • aws:executeScript - Analyzes possible causes for the failure to start your task. • aws:executeScript - Deletes resources created by this automation. • aws:executeScript - Formats the output of the automation to return the results of the analysis to the console. You can review the analysis after this step before the automation completes. • aws:branch - Branches based on whether the Lambda function and associated resources were created and need to be deleted. • aws:sleep - Sleeps for 30 minutes so the elastic network interface for the Lambda function can be deleted. • aws:executeScript - Deletes the Lambda function network interface. • aws:executeScript - Formats the output of the Lambda function network interface deletion step. AWS-UpdateAmazonECSAgent Description AWS-UpdateAmazonECSAgent 381 AWS Systems Manager Automation runbook reference User Guide The AWS-UpdateAmazonECSAgent runbook updates the Amazon Elastic Container Service (Amazon ECS) agent on the Amazon Elastic Compute Cloud (Amazon EC2) instance you specify. This runbook only supports Amazon Linux and Amazon Linux 2 instances. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • ClusterARN Type: StringList Description: (Required) The Amazon Resource Name (ARN) of the Amazon ECS cluster your container instances is registered with. Required IAM permissions The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:StartAutomationExecution AWS-UpdateAmazonECSAgent 382 AWS Systems Manager Automation runbook reference User Guide • ssm:GetAutomationExecution • ssm:GetCommandInvocation • ec2:DescribeImages • ec2:DescribeInstanceAttribute • ec2:DescribeImage • ec2:DescribeInstance • ec2:DescribeInstanceAttribute • ecs:DescribeContainerInstances • ecs:DescribeClusters • ecs:ListContainerInstances • ecs:UpdateContainerAgent Document Steps aws:executeScript - Updates the Amazon ECS agent on the Amazon ECS cluster you specify in the ClusterARN parameters. Outputs UpdateAmazonECSAgent.UpdatedContainers - The ID of the instance where the update of the Amazon ECS agent succeeded. UpdateAmazonECSAgent.FailedContainers - The ID of the instance where the update of the Amazon ECS agent failed. UpdateAmazonECSAgent.InProgressContainers - The ID of the instance where the update of the Amazon ECS agent is in progress. Amazon EFS AWS Systems Manager Automation provides predefined runbooks for Amazon Elastic File System. For more information about runbooks, see Working with runbooks. For information about how to view runbook content, see View runbook content. Topics • AWSSupport-CheckAndMountEFS Amazon EFS 383 AWS Systems Manager Automation runbook reference User Guide AWSSupport-CheckAndMountEFS Description The
|
systems-manager-automation-runbook-guide-097
|
systems-manager-automation-runbook-guide.pdf
| 97 |
The ID of the instance where the update of the Amazon ECS agent succeeded. UpdateAmazonECSAgent.FailedContainers - The ID of the instance where the update of the Amazon ECS agent failed. UpdateAmazonECSAgent.InProgressContainers - The ID of the instance where the update of the Amazon ECS agent is in progress. Amazon EFS AWS Systems Manager Automation provides predefined runbooks for Amazon Elastic File System. For more information about runbooks, see Working with runbooks. For information about how to view runbook content, see View runbook content. Topics • AWSSupport-CheckAndMountEFS Amazon EFS 383 AWS Systems Manager Automation runbook reference User Guide AWSSupport-CheckAndMountEFS Description The AWSSupport-CheckAndMountEFS runbook verifies the prerequisites to mount your Amazon Elastic File System (Amazon EFS) file system and mounts the file system on the Amazon Elastic Compute Cloud (Amazon EC2) instance you specify. This runbook supports mounting your Amazon EFS file system with the DNS name, or using the mount target’s IP address. Run this Automation (console) Document type Automation Owner Amazon Platforms Linux Parameters • AutomationAssumeRole Type: String Description: (Optional) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf. If no role is specified, Systems Manager Automation uses the permissions of the user that starts this runbook. • Action Type: String Valid values: Check | CheckAndMount Description: (Required) Determines whether the runbook verifies prerequisites, or verifies prerequisites and mounts the file system. • EfsId AWSSupport-CheckAndMountEFS 384 AWS Systems Manager Automation runbook reference User Guide Type: String Description: (Required) The ID of the file system you want to mount. • InstanceId Type: String Description: (Required) The ID of the Amazon EC2 instance on which you want to mount the file system. • MountOptions Type: String Description: (Optional) The options supported by the Amazon EFS mount helper that you want to use when mounting the file system. If you specify the tls option, verify stunnel has been upgraded on the target instance. • MountPoint Type: String Description: (Optional) The directory where you want to mount the file system. If you specify the Check value for the Action parameter, this parameter should not be specified. • MountTargetIP Type: String Description: (Optional) The mount target's IP address. Mounting by IP address works in environments where DNS is disabled, such as virtual private clouds (VPCs) with DNS hostnames disabled. Also, you can use this option if your environment uses a DNS provider other than Amazon Route 53 (Route 53). • Region Type: String Description: (Required) The AWS Region where the Amazon EC2 instance and file system are located. Required IAM permissions AWSSupport-CheckAndMountEFS 385 AWS Systems Manager Automation runbook reference User Guide The AutomationAssumeRole parameter requires the following actions to use the runbook successfully. • ssm:DescribeAutomationExecutions • ssm:DescribeAutomationStepExecutions • ssm:DescribeAutomationStepExecutions • ssm:DescribeInstanceInformation • ssm:DescribeInstanceProperties • ssm:StartAutomationExecution • ssm:GetAutomationExecution • ssm:GetDocument • ssm:ListCommands • ssm:ListCommandInvocations • ssm:ListDocuments • ssm:StartAutomationExecution • iam:ListRoles • ec2:DescribeInstances • ec2:DescribeSecurityGroups • elasticfilesystem:DescribeFileSystemPolicy • elasticfilesystem:DescribeMountTargets • elasticfilesystem:DescribeMountTargetSecurityGroups • resource-groups:* Document Steps • aws:executeScript - Gathers details about the Amazon EC2 instance you specify in the InstanceId parameter. • aws:executeScript - Gathers details about the file system you specify in the EfsId parameter. • aws:executeScript - Verifies the security group associated with the file system allows traffic on port 2049 from the Amazon EC2 instance you specify in the InstanceId parameter. AWSSupport-CheckAndMountEFS 386 AWS Systems Manager Automation runbook reference User Guide • aws:assertAwsResourceProperty - Verifies the Amazon EC2 instance you specify in the InstanceId parameter is managed by Systems Manager and that the status is Online . • aws:branch - Branches based on the value you specify for the Action parameter. • aws:runCommand - Verifies prerequisites for mounting the file system you specify in the EfsId parameter. • aws:runCommand - Verifies prerequisites for mounting the file system you specify in the EfsId parameter, and mounts the file system on the Amazon EC2 instance you specify in the InstanceId parameter. Amazon EKS AWS Systems Manager Automation provides predefined runbooks for Amazon Elastic Kubernetes Service. For more information about runbooks, see Working with runbooks. For information about how to view runbook content, see View runbook content. Topics • AWSSupport-CollectEKSInstanceLogs • AWS-CreateEKSClusterWithFargateProfile • AWS-CreateEKSClusterWithNodegroup • AWS-DeleteEKSCluster • AWS-MigrateToNewEKSSelfManagedNodeGroup • AWSPremiumSupport-TroubleshootEKSCluster • AWSSupport-TroubleshootEKSWorkerNode • AWS-UpdateEKSCluster • AWS-UpdateEKSManagedNodeGroup • AWS-UpdateEKSSelfManagedLinuxNodeGroups • AWSSupport-SetupK8sApiProxyForEKS • AWSSupport-TroubleshootEbsCsiDriversForEks AWSSupport-CollectEKSInstanceLogs Description Amazon EKS 387 AWS Systems Manager Automation runbook reference User Guide The AWSSupport-CollectEKSInstanceLogs runbook gathers operating system and Amazon Elastic Kubernetes Service (Amazon EKS) related log files from an Amazon Elastic Compute Cloud (Amazon EC2) instance to help you troubleshoot common issues. While the automation is gathering the associated log files, changes are made to the file system structure including the creation of temporary directories, the copying of log files to the temporary directories, and compressing the log files into an archive. This activity can result
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.