Are you on Mac OS and need to keep your AWS PowerShell module up-to-date? As you’ve probably noticed, there are frequently new versions of the AWS PowerShell module being released, to keep pace with new services and service features being added to Amazon Web Services (AWS) cloud. Updating PowerShell modules manually can take up extra time, so why not automate the process by creating a service that updates it for you?
MacOS uses the launchd daemon, and you use the launchctl command to manage background services. Configuring new scheduled tasks on MacOS is done by creating what’s called a plist file, and then registering that plist configuration file with the launchd daemon, using the launchctl load command.
Check out the excellent information at launchd.info to learn more about how to construct your own plist files. They’re unique to MacOS, and are kind of annoying to construct. The useful, in-depth documentation makes it not too hard though.
I’ve included a PowerShell snippet that you can run on your Mac (in PowerShell) that will handle creating the plist file and registering it for you. After you run this PowerShell snippet, you will automatically get the most recent AWSPowerShell module on a daily basis!
Leave a comment to let me know how this works for you, and if you have suggestions on how to make this better, let me know as well!