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 | |
| import logging | |
| #setup simple logging for INFO | |
| logger = logging.getLogger() | |
| logger.setLevel(logging.INFO) | |
| #define the connection | |
| ec2 = boto3.resource('ec2') |
This gist contains lists of modules available in
in AWS Lambda.
This file has been truncated, but you can view the full file.
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
| { | |
| "APIGatewayServiceRolePolicy": { | |
| "Arn": "arn:aws:iam::aws:policy/aws-service-role/APIGatewayServiceRolePolicy", | |
| "AttachmentCount": 0, | |
| "CreateDate": "2019-10-22T18:22:01+00:00", | |
| "DefaultVersionId": "v6", | |
| "Document": { | |
| "Statement": [ | |
| { | |
| "Action": [ |
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
| print("UPDATE AUG 2023: this script is beyond old and broken") | |
| print("You may find interesting and more up to date resources in the comments of the gist") | |
| exit() | |
| from slacker import Slacker | |
| import json | |
| import argparse | |
| import os | |
| # This script finds all channels, private channels and direct messages |
Those are my personal notes on AWS Solution Architect certification preparation. Hope you find them usefull.
To pass AWS certification, you should have:
- Sound knowledge about most of the AWS services ( EC2, VPC, RDS, Cloudfront, S3, Route53 etc,)
- Hands on experience with AWS 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
| #!/bin/bash | |
| export TKN=$(curl -X POST 'http://localhost:8080/auth/realms/master/protocol/openid-connect/token' \ | |
| -H "Content-Type: application/x-www-form-urlencoded" \ | |
| -d "username=admin" \ | |
| -d 'password=admin' \ | |
| -d 'grant_type=password' \ | |
| -d 'client_id=admin-cli' | jq -r '.access_token') | |
| curl -X GET 'http://localhost:8080/auth/admin/realms' \ |
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
| # Get IAM Role name from Instance Profile Id | |
| curl http://169.254.169.254/latest/meta-data/iam/info | |
| # Get credentials | |
| curl http://169.254.169.254/latest/meta-data/iam/security-credentials/<role-name> | |
| # More info | |
| http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html | |
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
| ''' | |
| This is an example of how to send data to Slack webhooks in Python with the | |
| requests module. | |
| Detailed documentation of Slack Incoming Webhooks: | |
| https://api.slack.com/incoming-webhooks | |
| ''' | |
| import json | |
| import requests |
