Execute Shell Script On A Single Instance of AWS Auto-Scaling Group

Sometimes we might encounter a scenario where we need to execute a shell script as a cron job on only one of the instances in an auto-scaling group(like batch processing jobs etc). Now if we create that script using the instance’s userdata or any other automation tool, that script will be created on all the instances of that auto-scaling group.

--

--

--

AVM Consulting — Clear strategy for your cloud

Recommended from Medium

Reversing part of a string in Python

Make your own Operating System#4

Top 10 DevOps engineers to follow in 2022!

Query Postgres database with RESTful API

e-Money’s Code Gets The Seal Of Approval From Blockchain Auditing Firm CertiK

Spy on your Ethereum node events

Recurring payments new regulation: A nightmare or an opportunity

What is Soft Link And Hard Link In Linux?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Vinayak Pandey

Vinayak Pandey

Experienced Cloud Consultant with a knack of automation. Linkedin profile: https://www.linkedin.com/in/vinayakpandeyit/

More from Medium

ABCDEFG — Fun with AWS ALB

CloudWatch Subscription Filters

Delegate access across AWS accounts using IAM roles

Hybrid Cloud Networking: centralized NAT Gateway through AWS Transit Gateway