Schedule servers, backup and automate cloud tasks with Skeddly to reduce cost - sithum devops
AWS doesn’t have a feature to schedule power on or off instances. This tool is for that. This can also automate your AMI creation and Cleaning old images as well. There are more.
This is not a free service. But the few cents you spent to execute these tasks will save AWS costs in dollars. Check the Skeddly pricing page for more information. Skeddly is a trusted service that implemented with best security practices. This is also a great tool to give turn-on or off access to testing environments when your QA or Dev team need to test.
Go ahead and create a Skeddly account. You may start with a free 30-day trial or ask your company to create one to automate the infrastructure. This service has the ability to create sub-accounts giving relevant permissions. Login to Skeddly Dashboard.
For this tutorial let’s schedule an EC2 instance to be turned off at non-working hours time and turn on for working hours. Login to AWS Console and keep it ready to create an IAM Role.
Follow the instructions displayed to you. This content is dynamic and specific to your account. Do all the steps listed in order. Give the Credential Name a meaningful one to separate from your other AWS accounts. Once you complete all the steps, hit the Save button. We haven’t given permissions to modify our resources yet. We will grant permission for all actions at once after we create all the actions.
This is the page contains all the tasks that can be scheduled on your cloud infrastructure. This list contains hundreds of tasks you can automate.
Click Start EC2 Instance.
Name: You can name this with anything. I prefer following my own convention. action-project-environment-instance. (eg: start-uber-qa-server, create-ami-uber-qa-server). You may follow yours.
Time Zone: !Important. Scheduled tasks will be executed using the time of this zone.
Repeat Type: Select daily if you want to execute this task every day, working days or the days you prefer. Note: If you want to run any task every weekend you should select daily and modify the days of the Week as necessary.
Credentials and Region: You must select the correct credential you created earlier and the correct aws region where your resources are located.
Instance: Use the instance ID if the instance kept for a long time. But you may use Instance name if your instance frequently terminates and recreated.
Fill all required fields and hit the Save button.
Create another task to Stop the EC2 Instance by following the same steps above.
After creating all the actions which need to automate, you can give permissions to the Skeddly IAM role we created. Click Credentials and IAM Policy Generator. Select the AWS account and click the View IAM Policy Document button.
Copy the JSON document to your clipboard and go to AWS IAM roles. Select the role created for Skeddly. click + Add inline policy and paste the JSON copied to your clipboard.
Hit the Review policy button, name it Skeddly and hit the Create policy button.
All done! Your cloud tasks are now automated using a service with best security practices. Go to one of your actions created and click Execute Now button to test it. It will execute automatically as scheduled.