Posts

Installing CloudCustodian for AWS

Cloud Custodian is a rules engine for AWS fleet management. It allows users to define policies to enable a well managed cloud infrastructure, that's both secure and cost optimized. It consolidates many of the adhoc scripts organizations have into a lightweight and flexible tool, with unified metrics and reporting. Why this post? Cloud Custodian installation instructions from their Github page simply tell you following commands which did not work for me. $ virtualenv --python=python2 custodian $ source custodian/bin/activate   (custodian) $ pip install c7n Hence i noted down a more comprehensive installation instructions that worked. Assumptions. Python is already installed which includes a pip version installed as well. But we need to upgrade pip first. Installation instructions with failed commands and fixed actions. 1. Install homebrew $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 2. Update PIP...

Decoding AWS console error messages

aws configure   - (enter your access key and secret access key) aws sts decode-authorization-message --encoded-message [encoded error message]

Installing Python Boto3 for AWS on MacOS

Image
Boto3 is a Python library to interact with AWS APIs via command line. It works by leveraging AWS APIs in the backend and provides an easy interface to perform AWS actions like "Launch that shit" or "Trigger a lambda function to automate that shit".  Installation on MacOS is as simple as following these steps. Install Python Install PIP (Python package manager) $ curl -O https://bootstrap.pypa.io/get-pip.py $ python3 get-pip.py --user Install AWS CLI $ pip install --user --upgrade awscli   Update path (Or, add following to your .bash_profile using $ sudo nano ~./bash_profile ) $ export PATH=~/Library/Python/2.7/bin/:$PATH   Check if AWS CLI is installed correctly, $ aws --version Update AWS config file with access keys, $ aws configure AWS Access Key ID: AWS Secret Access Key ID: Default region name: Default output format: Install boto3   $ sudo pip install boto3 Test boto3. Create ...

Basic GIT commands

Git command line is easy. Too easy in fact once you understand it. After fiddling with multiple resources, I found these to be the simplest commands to get the job done. Here it is! Clone a git repo locally $ git clone <url> Update an existing cloned repo $ git pull Add a new file to the git repo $ git add <filename> $ git commit -m <message> <filename> $ git push For more:  https://confluence.atlassian.com/bitbucketserver/basic-git-commands-776639767.html