This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "blinkreaction/boot2docker" | |
config.vm.define "hbase" do |v| | |
v.vm.provision :docker do |d| | |
d.run "hbase", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "dummy" | |
config.vm.provider :virtualbox do |vbox, override| | |
override.vm.box = 'blinkreaction/boot2docker' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import boto3 | |
lclient = boto3.client ('lambda') | |
print ('function loaded') | |
def lambda_handler(event, context): | |
lclient.delete_function (FunctionName = context.function_name) | |
print ('I am deleted') | |
return True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** The following is a NodeJS port of the AWS SigV4 signing sample code (Python) to NodeJS | |
* The addition of the Authorization header has been informed by the use of Postman | |
* For more information see the following documentation: | |
* http://docs.aws.amazon.com/general/latest/gr/sigv4-signed-request-examples.html | |
*/ | |
var https = require('https'); | |
var crypto = require('crypto'); | |
function sign(key, message) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"logs:CreateLogGroup", | |
"logs:CreateLogStream", | |
"logs:PutLogEvents" | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at | |
http://aws.amazon.com/apache2.0/ | |
or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. | |
''' | |
import logging | |
import boto3 | |
from botocore.exceptions import ClientError | |
import hashlib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Records": [ | |
{ | |
"EventVersion": "1.0", | |
"EventSubscriptionArn": "arn:aws:sns:EXAMPLE", | |
"EventSource": "aws:sns", | |
"Sns": { | |
"SignatureVersion": "1", | |
"Timestamp": "1970-01-01T00:00:00.000Z", | |
"Signature": "EXAMPLE", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"logs:CreateLogGroup", | |
"logs:CreateLogStream", | |
"logs:PutLogEvents" | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Ensure all EC2 Instances that do not have an 'exempt' tag value set are attached to any security groups that are tagged 'mandatory' | |
# Description: Checks that all EC2 instances that have a certain tag format also have a specific security group | |
# | |
import logging | |
import boto3 | |
import json | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0", | |
"id": "cbdd5653-b2b9-8c4e-c7de-bd6a0e879c9a", | |
"detail-type": "EC2 Instance State-change Notification", | |
"source": "aws.ec2", | |
"account": "776347453069", | |
"time": "2017-10-29T23:07:54Z", | |
"region": "ap-southeast-2", | |
"resources": [ | |
"arn:aws:ec2:ap-southeast-2:776347453069:instance/i-0533ccc4be7f511af" |
OlderNewer