New Training: Integrate Python Scripts into AWS Systems Manager Automation Runbooks
In this 5-video skill, CBT Nuggets trainer Trevor Sullivan explores how to import Python scripts and execute them directly inside AWS Systems Manager Automation runbooks. Watch this new DevOps training.
Learn DevOps with one of these courses:
AWS Cloud Automation
This training includes:
54 minutes of training
You’ll learn these topics in this skill:
Introduction to AWS Systems Manager Automation Runbooks and Python
Create Automation Document with Python Support
Pass Parameters Between Python Scripts in AWS Systems Manager Automation
Use AWS IAM Role in Python Scripts for AWS Systems Manager Automation
Attach Python Dependencies as ZIP File in AWS Systems Manager Automation
Considerations for Using Python Scripts with AWS Systems Manager Runbooks
AWS Systems Manager is a tool that helps cloud engineers maintain and manage their AWS infrastructure. The runbooks created in Systems Manager can be used to help automate a variety of tasks. To take that automation a step further, you can create custom Python scripts to use within Systems Manager Runbooks. Before using Python scripts within a Runbook, developers need to take a couple of things into consideration first.
Before adding a script to a Runbook, make sure that the Runbook has the proper AMI policies attached to it. Those AMI policies will state whether a Runbook is allowed to execute scripts or not. If an IAM policy is not defined, the Runbook will use the IAM policy of the account holder that created that Runbook. That could be a security issue.
Finally, scripts can be added directly to a Runbook from a developer's computer or injected from an S3 bucket. Depending on how that Runbook is being used, both are viable options. If there is a chance that a script will be updated frequently, it may be worthwhile to store it in an S3 bucket. That way an automated toolchain can be created to update that script in S3 as it is changed.
delivered to your inbox.