Enable Default Encryption for EBS (Worldwide)

Following the announced new opt-in option regarding the default encryption of EBS volumes a few days ago, I’ve made a small Python script to enable this feature on all AWS regions within an AWS account. Quick and Dirty Simple. This is an example. Use it at your own risk, and test it before applying to production, as usual :) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 import boto3 AWS_REGION = 'eu-west-1' session = boto3.Session(region_name=AWS_REGION) ec2 = session.client('ec2') def main(event, context): ec2_regions = [region['RegionName'] for region in ec2.describe_regions()['Regions']] # For all AWS Regions for region in ec2_regions: conn = boto3.client('ec2', region_name=region) print ("Checking AWS Region: " + region) status = conn.get_ebs_encryption_by_default() print ("===="*10) result = status["EbsEncryptionByDefault"] if result == True: print ("Activated, nothing to do") else: print("Not activated, activation in progress") conn.enable_ebs_encryption_by_default() if __name__ == '__main__': main(0,0) That’s all folks! ...

June 10, 2019 · 1 min · 156 words · zoph

My Pet Projects

In this article, I will describe my current pet projects. These are mainly excuses to learn something new, or exercises to go deeper into particular technologies, but could be (I hope) useful for you too. Don’t hesitate to issue enhancements, bug fixes (PR), or just give it a try and share your thoughts. Instance Watcher :construction_worker: Tech: Lambda, Python, Serverless Application Model (SAM), SES This app will scan your AWS Account against all EC2 regions worldwide and notify you by email when you have some running EC2 instances. It’s useful for non-production environments that you need to monitor. Use case: labs/training, sandbox accounts. ...

May 30, 2019 · 3 min · 513 words · zoph

awless a powerful alternative to AWS CLI

Yesterday, I was attending a meetup from the great French AWS Users Group, and Henri showed us a great new project he is working on, called: awless. awless is a great alternative to the official AWS CLI. It’s written in Go, and available under the Apache license on GitHub. awless will enhance your experience with the CLI with key features like: autocompletion, offline mode (--local), template support, revert capabilities, etc. Using a well-known syntax: subject, verb, complement, it drastically simplifies daily operations with the CLI, for example: ...

May 17, 2017 · 3 min · 564 words · zoph

Office 365: Office 2016 Installation from USBKey using relative path

[30/04/17] Update: Following this post, I’ve pushed this script to GitHub if you want to contribute. I was trying to use the Office Deployment Tool (ODT) with a relative path for our Office 2016 ProPlus deployment (on USB Key & Hard Drive). USB Keys are mounted each time with different letters depending on how many devices are already mounted. I was stuck because the ODT XML Configuration file does not support relative paths. ...

March 9, 2017 · 2 min · 219 words · zoph

Using Jira REST API with PowerShell

For automation purposes, I needed a tool to interact with the REST API of Atlassian Jira over PowerShell commands. I found a great module developed by replicaJunction and contributors on GitHub called PSJira. Installation You will need PowerShell >=3.0 Install-Module PSJira (if you have Package Management Installed Module) and for sure, an Atlassian Jira instance First-Run 1 Set-JiraConfigServer -Server 'https://my.jira.server.com:port' Setup jira credentials in .ps1 Encrypt credentials (Once) Do this with the Windows session of the user who will launch the .ps1 scripts (service account) ...

January 3, 2017 · 2 min · 251 words · zoph