Menu
blog.headdesk.me
blog.headdesk.me

Tag: python

Dumping AWS Organization tree

Recently, I’m tasked to transfer a set of AWS accounts to another cloud service provider. I realize there is not a simple way to capture the organizational tree structure. Knowing the tree structure is quite important in understanding the net effects of SCP. A python script is developed to solve this problem.

Scheduled snapshot on AWS using Lambda

Check out my recent wiki page on how to schedule snapshot backups on AWS using Lambda. https://www.headdesk.me/Lambda Lambda is much more powerful then this. Using it together with S3 / SNS / SQS / etc allow deployment of business applications / workflows truly on cloud.

Working with JSON output from AWSCLI

The program looks short but the way Python handles JSON is not very elegant. JSON is supposed to be a serialized object, so it should be processed as an object. But here, it’s processed as an array. [python] #!/usr/bin/python import json import sys print "Usage: cat JSON | BasicParse.py | column -t" jsonInput = sys.stdin…

Hello python

I’m a Java guy and I just can’t convince myself to learn a new language – because there isn’t a better one. Let’s look at python for a second, there is visually no structure. Why is having {} blocks a problem? [python] #!/usr/bin/python3 # Imports import random s1 = "Let’s predict the next mark six!"…

  • aws (8)
  • coffee (1)
  • headfi (1)
  • linux (7)
  • others (55)
  • security (2)
  • tech (36)
  • wordpress (2)

apache aws awscli azure backup cloud coffee coreos distributed filesystem docker ec2 EL8 elasticcache etckeeper featured heartbleed kernel linux mail meltdown mysql php pine python rdp rds Redhat Red Hat RHEL RHEL7 rpm Ryzen snapshot spectre SSL systemd tech terraform ubuntu ubuntu upgrade vector vpn wordpress xtreemfs yum

©2022 blog.headdesk.me | Powered by SuperbThemes & WordPress