Python Code for AWS automation