Scenario – 1
- Your organization wants in all regions
- to shutdown all the ec2 instances with tags menioned below at 7:00 PM during week days
- Env: Dev
- to start all ec2 instances with tags mentioned below at 10:00 am during week days
- to shutdown all the ec2 instances with tags menioned below at 7:00 PM during week days
- Refer Here for the script which can stop the ec2 instance with tag
Env=Devin any region - Exercise:
- Try writing a script which starts the ec2 instance based on similar category Refer Here for the change set
- Try using $1 (first argument) as tag name and second argument as tag value Refer Here
- Refer Here for the script to start, stop and terminate ec2 instances based on tags.
Scenario – 2
-
Your organization wants in all regions
- to shutdown all the virtual machines with tags menioned below at 7:00 PM during week days
- Env: Dev
- to start all virtual machines with tags mentioned below at 10:00 am during week days
- to shutdown all the virtual machines with tags menioned below at 7:00 PM during week days
-
Refer Here to query resources by tag
-
Refer Here for the script to perform the above actions.
