I am stealing this line.
I am stealing this line.
I wonder how it looks internally. Like, can anyone write there. Apart from a university I worked at management would never let me write any "blogs" about work related stuff.
I deliberately obfuscated the script by replacing characters with various Unicode confusables, both the letters and the symbols.
I still felt bad and ended up deleting the post.
Hopefully nobody tried to type it in manually instead of cut & pasting just to see what would happen...
Delete locks and the like will stop this… unless you bulk delete them first.
The admins will get warning emails that they will finish reading in abject terror some time after their entire cloud tenant has gone to heaven.
The modern equivalent of “Operating system not found” is “Click the guides below to get started with your new cloud account.”
# this would wipe all EC2 instances, assuming you are authenticated and there is nothing else need to get a list of them
Get-EC2Instance | Remove-EC2Instance -Force
If there is a way to enumerate objects without explicitly specifying some properties then PS makes it very easy to pipe that output to remove or disable cmdlets.
I never worked with AWS but if I needed to write such killer script I would kill instances (as in above example), remove all S3 objects (quite similar, Get-S3Object | Remove-S3Object) and finally wipe out all IAM roles and users (similar Get/Remove-IAMGroup, ..IAMUser etc). And thesubscription/account things, as @jiggawatts says, I'm just not familiar with the AWS lingo. And secrets/creds, of course.
By the time a human starts to investigate why the monitoring gone mad (assuming it wasn't hosted with all other infra on same account, lol) there would be nothing to do, too many thing are gone already, too many things are on the way to be purged and even if they could be restored there would be too many things to tie it again to something resembling a functioning system.