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
# Find the IAM username belonging to the TARGET_ACCESS_KEY | |
# Useful for finding IAM user corresponding to a compromised AWS credential | |
# Requirements: | |
# | |
# Environmental variables: | |
# AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY | |
# python: | |
# boto |
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
#!/bin/bash | |
# | |
# azkaban-web Start Up Azkaban web server | |
# | |
# chkconfig: 2345 95 5 | |
# description: Azkaban allows users to run queries on EMR (Hadoop) clusters \ | |
# via a web interface | |
### BEGIN INIT INFO | |
# Provides: azkaban |
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
#!/bin/bash | |
# | |
# efsaz Set availability zone for EFS mounts in fstab | |
# | |
# chkconfig: 345 24 74 | |
# description: Replaces the availability zone for EFS mount points in fstab \ | |
# with the proper value for the current instance, which it gets \ | |
# from instance metadata. This script must run before the \ | |
# netfs script, which mounts network filesystems. It is useful \ | |
# in autoscaling groups, where the instance starting might \ |
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
# needs Python3, though easily adapted | |
from __future__ import unicode_literals | |
import boto3 | |
def main(): | |
session = boto3.session.Session(profile_name='aws_credentials_profile') | |
ec2 = session.resource('ec2') | |
# define instance parameters |
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
#!/usr/bin/env python3 | |
# Demonstrates the use of Python to work with Cognito. | |
# Create a new a user, log in, check tokens and call an API. | |
# The purpose was to learn about Cognito. Security has been | |
# circumvented in the interest of keeping it simple. | |
# Notably, the authentication procedure uses the most insecure | |
# method. This code is not intended for use in production. | |
# | |
# https://www.neant.ro/aws/working-with-cognito-and-api-gateway-in-python.html |
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
#!/usr/bin/env python3 | |
from aws_cdk import ( | |
core as cdk_core, | |
aws_s3 as cdk_s3, | |
aws_s3_deployment as cdk_s3_deploy | |
) | |
class FrontendStack(cdk_core.Stack): | |
def __init__(self, app, id, **kwargs): |