Skip to content

Instantly share code, notes, and snippets.

View ahmedbadawy4's full-sized avatar
💭
Busy

Ahmed Badawy ahmedbadawy4

💭
Busy
View GitHub Profile

How RDS Proxy Works

Setup

  1. Create an RDS Proxy for your existing RDS or Aurora database.
  2. The proxy connects to the database and manages connection pooling and authentication.

Application Connection

  • Applications (or users) connect to the RDS Proxy endpoint instead of directly connecting to the database.
  • The proxy handles the underlying database connections, ensuring efficient connection pooling and failover management.
@ahmedbadawy4
ahmedbadawy4 / list.txt
Created December 14, 2021 09:25 — forked from shortjared/list.txt
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com
@ahmedbadawy4
ahmedbadawy4 / parse_access_log.py
Created April 18, 2020 23:45
Parsing access log to get list of IPs with the number of hits
#!/usr/bin/env python2
import re
from collections import Counter
def apache_log_reader(logfile):
myregex = r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'
with open(logfile) as f:
log = f.read()
my_iplist = re.findall(myregex,log)
## Fetch certificates, direct connection
openssl s_client -showcerts -servername git.mycompany.com -connect git.mycompany.com:443 </dev/null 2>/dev/null | sed -n -e '/BEGIN\ CERTIFICATE/,/END\ CERTIFICATE/ p' > git-mycompany-com.pem
## Add certificate to local certificate list
cat git-mycompany-com.pem | sudo tee -a /etc/ssl/certs/ca-certificates.crt
UBUNTU 16
@ahmedbadawy4
ahmedbadawy4 / jenkins-home-git.sh
Created May 28, 2019 11:20 — forked from cenkalti/jenkins-home-git.sh
Backup Jenkins home periodicallly with git.
#!/bin/bash
# Setup
#
# - Create a new Jenkins Job
# - Mark "None" for Source Control Management
# - Select the "Build Periodically" build trigger
# - configure to run as frequently as you like
# - Add a new "Execute Shell" build step
# - Paste the contents of this file as the command
@ahmedbadawy4
ahmedbadawy4 / shared_folder_centos_virtualbox.txt
Created February 20, 2019 13:53 — forked from larsar/shared_folder_centos_virtualbox.txt
Mount shared folder on CentOS in VirtualBox
# The VirtualBox documentation[1] for how to install guest additions
# for Linux on a virtual host is somewhat messy. So here is what
# I did to make it work.
# Install the packages required
yum update
yum install gcc kernel-devel make
reboot
@ahmedbadawy4
ahmedbadawy4 / packer-and-terraform.sh
Created June 25, 2018 09:03
install terraform and packer using python3
#!/bin/bash
set -x
TERRAFORM_VERSION="0.9.11"
PACKER_VERSION="1.0.2"
# install pip
pip install -U pip && pip3 install -U pip
if [[ $? == 127 ]]; then
wget -q https://bootstrap.pypa.io/get-pip.py