This file contains hidden or 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: > | |
Sample SAM Template using Application Auto Scaling + Provisioned Concurrency | |
Globals: | |
Function: | |
Timeout: 30 |
This file contains hidden or 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
Steps for installing the Android Emulator from EC2 console: | |
----------------------------------------------------------- | |
sudo apt install default-jdk | |
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip | |
unzip sdk-tools-linux-4333796.zip -d android-sdk | |
sudo mv android-sdk /opt/ | |
export ANDROID_SDK_ROOT=/opt/android-sdk | |
echo "export ANDROID_SDK_ROOT=/opt/android-sdk" >> ~/.bashrc | |
echo "export PATH=$PATH:$ANDROID_SDK_ROOT/tools" >> ~/.bashrc | |
re-login |
This file contains hidden or 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
{ | |
"requestContext": { | |
"elb": { | |
"targetGroupArn": "arn:aws:elasticloadbalancing:us-east-1:123456789012:targetgroup/lambda-target/abcdefgh" | |
} | |
}, | |
"httpMethod": "GET", | |
"path": "/", | |
"multiValueQueryStringParameters": { | |
"key": [ |
This file contains hidden or 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
GetFunctionConfiguration20150331v2 | |
PutFunctionConcurrency20171031 | |
ListDistributionsByLambdaFunction | |
DeleteFunction20150331 | |
ListVersionsByFunction20150331 | |
CreateFunction20150331 | |
ListFunctions | |
DeleteFunctionConcurrency20171031 | |
ListFunctions20150331 | |
GetFunction20150331v2 |
This file contains hidden or 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
SELECT eventsource | |
FROM <Replace_With_CloudTrail_Table_Name> | |
GROUP BY eventsource |
This file contains hidden or 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 boto3 | |
s = boto3.Session() | |
with open("aws_service_apis.csv","wt") as f: | |
for session in s.get_available_services(): | |
client = boto3.client(session) | |
x = dir(client) | |
for method_name in x: | |
if not "__" in method_name and \ | |
not method_name[0] == "_" and \ |
This file contains hidden or 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
#Lists only EC2 instance in running state | |
aws ec2 describe-regions \ | |
--query 'Regions[].[RegionName]' \ | |
--output text | \ | |
xargs -I {} \ | |
aws ec2 describe-instance-status \ | |
--query "InstanceStatuses[].[InstanceId,InstanceState.Name,AvailabilityZone]" \ | |
--output text \ | |
--region {} | |
This file contains hidden or 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
aws ec2 describe-regions \ | |
--query 'Regions[?RegionName!=`ap-northeast-3`].[RegionName]' \ | |
--output text | \ | |
xargs -I {} \ | |
aws lambda list-functions \ | |
--query "Functions[].[{FunctionArn:FunctionArn,MemorySize:MemorySize,Runtime:Runtime,Timeout:Timeout}]" \ | |
--output table --region {} |
This file contains hidden or 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
#Note for invoking customer created APIGateway endpoint the servicename should be execute-api instead of apigateway | |
import boto3 | |
s = boto3.Session() | |
print s.get_available_services() |
This file contains hidden or 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
#Before executing the script ensure you have the latest version of AWS CLI installed | |
#pip install awscli --upgrade | |
import boto3 | |
s = boto3.Session() | |
print s.get_available_regions("lambda") |