Skip to content

Instantly share code, notes, and snippets.

@sansane123
sansane123 / lamp.html
Created April 12, 2018 02:59 — forked from duhaime/lamp.html
Set up Wordpress + LAMP on Amazon Ec2
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Tutorial - install the Apache web server with PHP and MySQL support on your EC2 instance."><title>Tutorial: Installing a LAMP Web Server on Amazon Linux - Amazon Elastic Compute Cloud</title><link rel="home" href="#top" title="Amazon Elastic Compute Cloud"><link rel="up" href="ec2-tutorials.html" title="Tutorials for Amazon EC2 Instances Running Linux"><link rel="prev" href="ec2-tutorials.html" title="Tutorials for Amazon EC2 Instances Running Linux"><link rel="next" href="hosting-wordpress.html" title="Tutorial: Hosting a WordPress Blog with Amazon Linux"><meta name="keywords" content=""><meta name="deployment_region" content="IAD"><meta name="product" content="Amazon Elastic Compute Cloud"><meta name="guide" content="User Gu
@sansane123
sansane123 / tag-vols-snaps.py
Last active March 18, 2019 16:52 — forked from danpritts/tag-vols-snaps.py
Automatically tag EC2 snapshots and volumes based on their attached AMIs/instances
# Tag snapshots based on their associated AMI and volumes based on attached instance.
# format:
# (AMI:db5|db5) /dev/sda1 (1/4)
# (AMI:db5|db5) /dev/sdb (2/4)
# Best practice: create IAM user
# Simplest privilege to get it to work with reasonable security: use predefined policy "ReadOnlyAccess"
# and add your own custom policy that grants "ec2:CreateTags"
from __future__ import print_function
import json
import boto3
import logging
#setup simple logging for INFO
logger = logging.getLogger()
logger.setLevel(logging.ERROR)