SHARE
TWEET

Untitled

a guest Aug 19th, 2019 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Systems Manager
  2. aws ssm describe-instance-information  --query "InstanceInformationList[*]"
  3. aws ssm get-document --name "AmazonInspector-ManageAWSAgent" --output text > AmazonInspector-ManageAWSAgent.doc
  4. less AmazonInspector-ManageAWSAgent.doc
  5. aws ssm send-command --targets Key=tag:SecurityScan,Values=true --document-name "AmazonInspector-ManageAWSAgent" --query Command.CommandId --output-s3-bucket-name <LoggingBucket>
  6. aws ssm list-command-invocations --details --query "CommandInvocations[*].[InstanceId,DocumentName,Status]" --command-id <CommandId>
  7.  
  8. # Inspector
  9. aws inspector create-resource-group --resource-group-tags key=SecurityScan,value=true
  10. aws inspector create-assessment-target --assessment-target-name GamesDevTargetGroup --resource-group-arn aws inspector create-assessment-target --assessment-target-name GamesDevTargetGroup --resource-group-arn <ResourceGroupARN>
  11. aws inspector list-rules-packages
  12. aws inspector describe-rules-packages --query rulesPackages[*].[name,description] --output text --rules-package-arns <RulesPackageArns>
  13. aws inspector create-assessment-template --assessment-target-arn <AssessmentTargetArn> --assessment-template-name CISCommonVulerBestPract-Short --duration-in-seconds 900 --rules-package-arns <ThreeRulesPackageARNs>
  14. aws inspector preview-agents --preview-agents-arn <AssessmentTargetArn>
  15. aws inspector start-assessment-run --assessment-run-name FirstAssessment --assessment-template-arn <AssessmentTemplateArn>
  16. # should reply w/ collecting data
  17. aws inspector describe-assessment-runs --assessment-run-arn <AssessmentRunArn>
  18. aws inspector list-assessment-run-agents --assessment-run-arn <AssessmentRunArn>
  19.  
  20. # Create and Apply a Patch Baseline
  21. aws ssm describe-document --name "AWS-PatchInstanceWithRollback" --query "Document.[Name,Description,PlatformTypes]"
  22. aws ssm describe-instance-information  --query "InstanceInformationList[*]"
  23. aws ssm start-automation-execution --document-name "AWS-PatchInstanceWithRollback" --parameters "InstanceId=<InstanceId>,ReportS3Bucket=<LogBucket>"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top