Skip to content

Instantly share code, notes, and snippets.

View giuliocalzolari's full-sized avatar

Giulio Calzolari giuliocalzolari

View GitHub Profile
@giuliocalzolari
giuliocalzolari / aws-backup.yaml
Last active November 13, 2019 13:50 — forked from quiver/cloudformation-template-for-aws-backup-thin-backups.yaml
CloudFormation template to configure thin backup rules for AWS Backup
---
AWSTemplateFormatVersion: '2010-09-09'
Description: Create AWS Backup Vault, Backup Plan and Backup Selection
Parameters:
# Backup
CreateNewBackupVault:
Type: String
AllowedValues:
- true
- false
@giuliocalzolari
giuliocalzolari / Cloudwatch Agent Install
Last active April 29, 2024 03:08 — forked from naavveenn/Cloudwatch Agent Install
Cloudwatch agent installation: Make sure to attach a cloudwatch role to your ec2 instance. amazon-cloudwatch-agent.json file should be created before hand (on your local machine or from where you are executing your ansible playbook), other wise cw_agent will not start. Below is the example of amazon-cloudwatch-agent.json.
---
###Cloudwatch role should be attached to the ec2 instance###
- hosts: dd ###servers on which you need to run the cw_agent
become: yes
remote_user: root
gather_facts: true
tasks:
- name: Check if Cloudwatch Agent is Installed Already
shell: /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -m ec2 -a status
register: init_status_result
@giuliocalzolari
giuliocalzolari / dd.log
Created October 11, 2016 11:36 — forked from ktheory/dd.log
EC2 EBS-SSD vs instance-store performance on an EBS-optimized m3.2xlarge
# /tmp/test = EBS-SSD
# /mnt/test = instance-store
root@ip-10-0-2-6:~# dd bs=1M count=256 if=/dev/zero of=/tmp/test
256+0 records in
256+0 records out
268435456 bytes (268 MB) copied, 3.26957 s, 82.1 MB/s
root@ip-10-0-2-6:~# dd bs=1M count=256 if=/dev/zero of=/tmp/test
256+0 records in
256+0 records out
#!/usr/bin/env python
"""
Recipe for creating and updating security groups programmatically.
"""
import collections
import boto