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
{ | |
"dynamic": { | |
"instance-identity": { | |
"document": { | |
"accountId": "012345678901", | |
"architecture": "x86_64", | |
"availabilityZone": "us-east-2b", | |
"billingProducts": null, | |
"devpayProductCodes": null, | |
"imageId": "ami-002068ed284fb165b", |
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 requests | |
import json | |
metadata_url = 'http://169.254.169.254/latest/' | |
def expand_tree(url, arr): | |
output = {} | |
for item in arr: | |
new_url = url + item |
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
{ | |
"meta-data": { | |
"ami-id": "ami-002068ed284fb165b", | |
"ami-launch-index": 0, | |
"ami-manifest-path": "(unknown)", | |
"block-device-mapping": { | |
"ami": "/dev/xvda", | |
"root": "/dev/xvda" | |
}, | |
"events": { |
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
{ | |
"ansible_all_ipv4_addresses": [ | |
"REDACTED IP ADDRESS" | |
], | |
"ansible_all_ipv6_addresses": [ | |
"REDACTED IPV6 ADDRESS" | |
], | |
"ansible_apparmor": { | |
"status": "disabled" | |
}, |
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
# Author: https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-request-signing.html#es-request-signing-python | |
from elasticsearch import Elasticsearch, RequestsHttpConnection | |
from requests_aws4auth import AWS4Auth | |
import boto3 | |
host = 'search-testing-mvevysr2i4aen6pqfq5ympghsy.us-east-1.es.amazonaws.com' # For example, my-test-domain.us-east-1.es.amazonaws.com | |
region = 'us-east-1' # e.g. us-west-1 | |
service = 'es' |
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
Resources: | |
User1: | |
Type: AWS::IAM::User | |
Domain1: | |
Type: AWS::Elasticsearch::Domain | |
Properties: | |
AdvancedSecurityOptions: | |
Enabled: true | |
InternalUserDatabaseEnabled: false | |
MasterUserOptions: |
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": [ | |
{ | |
"Sid": "Allow use of the key to the DataSync role", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": [ | |
"arn:aws:iam::012345678910:role/service-role/AWSDataSyncS3BucketAccess-yann-stoneman-dev-storage-us-east-1-012345678910" | |
] |
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
declare -a arr=($(aws apigateway get-rest-apis --query 'items[*].id' | tr ,[]\" ' ')) | |
for i in "${arr[@]}" | |
do | |
declare -a stages=($(aws apigateway get-stages --rest-api-id $i --query 'item[0].stageName' | tr \" ' ')) | |
for j in "${stages[@]}" | |
do | |
if $(aws apigateway get-stage --rest-api-id $i --stage-name $j | jq '.cacheClusterEnabled'); then | |
aws apigateway get-rest-api --rest-api-id $i | jq '.name' | |
fi | |
done |
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
service: petstore | |
provider: | |
name: aws | |
runtime: java8 | |
memorySize: 1512 | |
timeout: 60 | |
stage: ${opt:stage,'dev'} | |
region: ${opt:region, 'us-west-2'} | |
profile: ${opt:profile, "default"} |
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
AWSTemplateFormatVersion: '2010-09-09' | |
Transform: AWS::Serverless-2016-10-31 | |
Description: Example Pet Store API written with SpringBoot with the aws-serverless-java-container library | |
Globals: | |
Api: | |
# API Gateway regional endpoints | |
EndpointConfiguration: REGIONAL | |
Resources: |