aws dms describe-replication-tasks --query 'ReplicationTasks'[*]['ReplicationTaskIdentifier'] --output text --region [region]
--- example output ---
prod-sync-task
uat-sync-task
dev-sync-task
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 { App, CfnParameter, Stack, StackProps } from 'aws-cdk-lib'; | |
import * as iam from 'aws-cdk-lib/aws-iam'; | |
import { Construct } from 'constructs'; | |
export class MyStack extends Stack { | |
constructor(scope: Construct, id: string, props: StackProps = {}) { | |
super(scope, id, props); | |
const accountPrincipal = new CfnParameter(this, 'accountid', { | |
default: '', | |
description: 'trainerAccountId', |
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 ast | |
def dict_or_str(object: any): | |
if type(object) is dict: | |
print("I am DICT") | |
return object | |
elif type(object) is str: | |
print ("I am Str") | |
resp = False |
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
#!/bin/bash | |
if [ $# -gt 0 ]; then | |
INPUT="$1" | |
fi | |
ECS_CLUSTER_NAME=${INPUT-default} | |
yum remove podman-docker -y | |
echo 'net.ipv4.conf.all.route_localnet = 1' >> /etc/sysctl.conf |
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
#!/bin/bash | |
sudo amazon-linux-extras install nginx1 -y | |
sudo systemctl start nginx |
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
count = 0 | |
while True: | |
# Start of game? | |
if count == 0: | |
start_time = time.time() | |
num = random.randint(1, 100) | |
print "I'm thinking of a number from 1 to 100. Try to guess it! (Enter 0 to exit)" | |
# Guess a number |
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
#!/bin/bash | |
apt-get update | |
apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg | |
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null | |
apt-get update | |
apt-get install -y docker-ce-cli | |
docker version |
import { STS, GetCallerIdentityCommandOutput } from '@aws-sdk/client-sts';
import { fromInstanceMetadata } from '@aws-sdk/credential-provider-imds';
let data: GetCallerIdentityCommandOutput;
( async ()=> {
let sts: STS;
sts = new STS({
credentials: fromInstanceMetadata({
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
#!/bin/bash | |
sudo su - ec2-user | |
sudo yum update -y | |
sleep 15 | |
sudo yum install docker git vim -y | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash | |
env VERSION=`python tools/getnodeversion.py` make install DESTDIR=`nvm_version_path v$VERSION` PREFIX="" | |
nvm install --lts | |
npm |