AWS Systems Manager eases the operations and maintenance of automation(s) of common administrative and security tasks from one single window which is AWS Systems Manger Console via 'Run Command'. We can perform lot of tasks like applying IAM role to EC2 instances, Attach EBS Volumes, Run Ansible Playbooks at target nodes without having to have access to keys of those instances
Now, AWS has come up with yet another feature which was most awaited, i.e., to run Chef Recipes in AWS Instances irrespective Windows or Linux OS
- AWS Console login credentials
- Console or Program access to S3, AWS Systems Manager - Run Command
- Login to AWS Console
- prepare Chef recipes that would run from Chef version 11
- Place the Chef Cookbooks in Github or in S3 bucket
- Open AWS Systems Manager Console
- Click on 'Run Command' under 'Actions and Change' menu section
- Click on 'Run Command' at right corner
- Find the option 'AWS-ApplyChefRecipes' and click on the same
- Now configure your 'Source Type' either S3 or Github, wherever the Chef cookbooks are stored
- Define the S3 path of code location in 'Source Info'
- Define list of 'cookbooks' to run in 'Runlist' box
- Pass any JSON attributes if required for the cookbook in 'JSON Attribute' box
- select 'Chef Version' according to your code compatibility; supports since Chef 11
- specify target instances to run these 'Chef Recipes' by 'Tags' or 'Select Manually' or by 'Resource Group'
- Define 'S3 output' logging location, if required
- Lastly, define SNS notifications, if required and finally click on 'Run' in order to execute the Chef Recipes in target nodes selected
Enjoy cooking Chef Recipes in AWS Systems Manager !!