Skip to content

Instantly share code, notes, and snippets.

View nolram's full-sized avatar
🏠
Working from home

Marlon Baptista de Quadros nolram

🏠
Working from home
View GitHub Profile
@nolram
nolram / clone_codecommit_repos.sh
Last active September 1, 2022 22:26
Script to clone all repositories from AWS CodeCommit on a specific AWS Account.
#/bin/bash
# Script to clone all repositories from AWS CodeCommit on a specific AWS Account.
# This script clone ssh repositories, but it can be changed to use https
# Requirements
# aws-cli - https://aws.amazon.com/pt/cli/
# jq - https://stedolan.github.io/jq/
# git
@nolram
nolram / update_route_53.sh
Last active September 14, 2022 00:55
Simple shellscript to update Route 53 record with the current public IP
#!/bin/bash
# Use EC2 Role to allow the EC2 modify Route 53 record, instead of AWS_SECRET_KEYS
AWS_REGION="us-east-1"
HOSTED_ZONE_ID="XXXXXXXXXXXXXXXXXXXX"
DOMAIN_NAME="example.com"
# Get the current IP address
EC2_IP=$(curl http://169.254.169.254/latest/meta-data/public-ipv4)