Skip to content

Instantly share code, notes, and snippets.

@incyclum
incyclum / AWS IAM Policy - ForceMFA.json
Last active April 2, 2020 20:02
AWS IAM Policy - Force MFA - This policy allows users to manage their own passwords and MFA devices but nothing else unless they authenticate with MFA -- *EDIT*: I forgot where I found it in the 1st place. In fact this policy is explained statement by statement in AWS docs: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_users-self-man…
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowAllUsersToListAccounts",
"Effect": "Allow",
"Action": [
"iam:ListAccountAliases",
"iam:ListUsers",
"iam:GetAccountPasswordPolicy",
@pkazmierczak
pkazmierczak / aws-openvpn-cf.py
Last active April 12, 2016 14:44
Troposphere template for creating a simple OpenVPN server Raw
from troposphere import (Base64, Join, FindInMap,
Parameter, Ref, Tags, Template)
import troposphere.ec2 as ec2
# Mappings of OpenVPN AMIs
OPENVPN_AMI = {
'ap-northeast-1': {"AMI": 'ami-5ea72b5e'}, # Asia Pacific (Tokyo)
'ap-southeast-1': {"AMI": 'ami-365c5764'}, # Asia Pacific (Singapore)
'ap-southeast-2': {"AMI": 'ami-831d51b9'}, # Asia Pacific (Sydney)
@iMilnb
iMilnb / boto3_hands_on.md
Last active October 19, 2022 09:15
Programmatically manipulate AWS resources with boto3 - a quick hands on

boto3 quick hands-on

This documentation aims at being a quick-straight-to-the-point-hands-on AWS resources manipulation with [boto3][0].

First of all, you'll need to install [boto3][0]. Installing it along with [awscli][1] is probably a good idea as

  • [awscli][1] is boto-based
  • [awscli][1] usage is really close to boto's
@bergantine
bergantine / Vagrantfile
Last active August 30, 2022 19:31
Vagrant config for basic Python development
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.