This repository is used to simplify the process of cloning the SSM documents across the AWS regions.

Overview

SSM Cloner

Introduction


  • This module is created in order to simplify the process of copying the SSM documents from one region to another regions.

  • As an organisation or team can have multiple regions in which they operate. And in order to replicate the SSM documents from one region to another.

  • It becomes a tedious task if you are developing or if you need to update a document and replicate the change across the regions.

  • To resolve this issue, ssm-cloner comes for your help.

  • Just execute this module and pass on the parameters and it will clone the documents for you.

  • You can also use it to unclone or create new version for your documents.

Pre-requisites


  • AWS CLI should be installed on the system. For installing AWS CLI, visit the link: Install AWS CLI

  • Python should be installed. For installing Python, visit this link: Installing Python

  • Python package boto3 should be installed.

    pip3 install boto3 #(Linux)
    or
    pip install boto3 #(Windows)

How to setup environment


  1. For using it with AWS IAM users, set up the default profile using aws configure. The project will execute in that account.

  2. For AWS SSO users, copy and paste the temporary credentials in the terminal in which you want to execute the script.

  3. For IAM Role, this feature will be supported in future.

Execution Types


  1. Execute from command line as command line program

  2. Use it as a module - PENDING

  3. Use it as a installer - PENDING

Minimal Permission


  • In order to run the program, your user needs to have the sufficient permission.

  • Below is the permissions that is required for the program to run.

    {
      "Version": "2012-10-17",
      "Statement": [
          {
              "Sid": "VisualEditor0",
              "Effect": "Allow",
              "Action": [
                  "ssm:GetDocument",
                  "ssm:ListDocuments",
                  "ssm:DeleteDocument",
                  "ssm:CreateDocument"
              ],
              "Resource": "*"
          }
       ]
    }

Execution Steps


  1. Clone the repo in your system

  2. Go to the directory where the repo is cloned

  3. Open the terminal in the directory and run the below commands.

  4. Execute the program using below syntax (For Linux):

     #For Cloning (Linux)
     python3 ssm_cloner.py -c -d <doc_name> -sr <source_region> -dr <command_separated_destination_regions>
    
     #For Uncloning (Linux)
     python3 ssm_cloner.py -uc -d <doc_name> -sr <source_region> -dr <command_separated_destination_regions>
  5. For windows, follow the below syntax:

     #For Cloning (Windows)
     python ssm_cloner.py -c -d <doc_name> -sr <source_region> -dr <command_separated_destination_regions>
    
     #For Uncloning (Windows)
     python ssm_cloner.py -uc -d <doc_name> -sr <source_region> -dr <command_separated_destination_regions>

Command Line Parameters Description


  1. -d / --doc-name (Required): This parameter is used to define the document name that needs to be cloned.

  2. -sr / --source-region (Required): This parameter is used to define the source region from which the main document will be fetched

    • Type: string
    • Example: us-east-1
  1. -dr / --destination-regions (Required): This parameter is used to define the destination regions to which the cloned documents will be created.

    • Type: Command Separated values
    • Example: us-east-1,us-east-2,us-west-1
  1. -c / --clone (Required): This parameter is used to specify program to clone the document. This parameter cannot be used together with "-uc / --unclone" parameter.

    • Type: None
    • Example: -c or --clone
    • Usage:
      python3 ssm_cloner.py -c #(Short hand parameter)
      
      # OR
      
      python3 ssm_cloner.py --clone #(Descriptive parameter)
  1. -uc / --unclone (Required): This parameter is used to specify program to unclone the document. This parameter cannot be used together with "-c or --clone" parameter.

    • Type: None
    • Example: -uc or --unclone
    • Usage:
      python3 ssm_cloner.py -uc #(Short hand parameter)
      
      #OR
      
      python3 ssm_cloner.py --unclone #(Descriptive parameter)

Roadmap


  • Add the functionality to make the program, a module
  • Add the functionality to execute the program across the accounts/region
  • Support for gov cloud

Links


A bot framework for Reddit to manage threads, wiki pages, widgets, menus and more.

Sub Manager Sub Manager is a bot framework for Reddit to automate a variety of tasks on one or more subreddits, and can be configured and run without

r/SpaceX 3 Aug 26, 2022
A head unit UI designed to replace the RTx/SMEG/RNEG/NG4/RCC/NAC

HeadUnit UI (Come discuss about it on our Discord!) Intro This is the UI part of a headunit project from OpenLeo, based on python and kivy, it looks l

OpenLeo 6 Nov 23, 2022
If you are in allot of groups or channel and you would like to leave them at once use this

Telegram-auto-leave-groups If you are in allot of groups or channel and you would like to leave them at once use this USER GUIDE ๐Ÿ‘ฃ Insert your telegr

Julius Njoroge 4 Jan 03, 2023
bot for hearthstone mercenaries

Hearthstone-Mercenaries-game-bot - prevention: Bot is not ready and now on the development stage estimated release date - 21.10.21 The main idea of th

Andrew Efimov 59 Dec 12, 2022
Schedule Twitter updates with easy

coo: schedule Twitter updates with easy Coo is an easy to use Python library for scheduling Twitter updates. To use it, you need to first apply for a

wilfredinni 46 Nov 03, 2022
discord.xp Bot, counts XP for members

discord.xp Bot, counts XP for members. How to setup and run? You must have an mysql database Download libs from the requirements.txt file Configurize

irwing 4 Feb 05, 2022
Automation application was made by me using Google, Sheet and Slack APIs with Python.

README This application is used to transfer the data in the xlsx document we have to the Google Drive environment and calculate the "total budget" wit

3 Apr 12, 2022
๐Ÿ“ˆ A Discord bot for displaying the download stats of a repository made with Python, the Hikari API and PostgreSQL.

๐Ÿ“ˆ axyl-stats axyl-stats is a Discord bot made with Python (with the Hikari API wrapper) and PostgreSQL, used as a download counter for a GitHub repo.

Angelo-F 2 May 14, 2022
๐Ÿ VerificaC19 SDK implementation for Python

VerificaC19 Python SDK ๐Ÿ VerificaC19 SDK implementation for Python. Requirements Python version = 3.7 Make sure zbar is installed in your system For

Lotrรจk 10 Jan 14, 2022
Dumps to CSV all the resources in an organization's member accounts

AWS Org Inventory Dumps to CSV all the resources in an organization's member accounts. Set your environment's AWS_PROFILE and AWS_DEFAULT_REGION varia

Iain Samuel McLean Elder 2 Dec 24, 2021
๐Ÿ”Ž Hunt down social media accounts by username across social networks

Hunt down social media accounts by username across social networks Installation | Usage | Docker Notes | Contributing Installation # clone the repo $

Sherlock 38.2k Jan 01, 2023
Data Platform com AWS CDK

Welcome to your CDK Python project! This is a blank project for Python development with CDK. The cdk.json file tells the CDK Toolkit how to execute yo

Andre Sionek 8 Jul 02, 2022
Its The Basic Commands Of Termux

Its The Basic Commands Of Termux

ANKIT KUMAR 1 Dec 27, 2021
Fully automated YouTube Channel. Using Reddit and YouTube API.

Fully Automated YouTube Shorts Channel This code will show you how to setup and fully autmated YouTube Channel. Content is gathered from Reddit using

Jacob Lower 96 Dec 25, 2022
Music cog for discord bots. Supports YouTube, YoutubeMusic, SoundCloud and Spotify.

dismusic Music cog for discord bots. Supports YouTube, YoutubeMusic, SoundCloud and Spotify. Installation python3 -m pip install dismusic Usage from d

Md Shahriyar Alam 59 Jan 08, 2023
This repository contains the best Data Science free hand-picked resources to equip you with all the industry-driven skills and interview preparation kit.

Best Data Science Resources Hey, Data Enthusiasts out there! Finally, after lots of requests from the community I finally came up with the best free D

Mohit Kumar 415 Dec 31, 2022
Tools convert cookies facebook menjadi token facebook.

Tools convert cookies facebook menjadi token facebook.

Muhammad Latif Harkat 2 Jul 17, 2022
Telegram group manager moderen and simple.

Upin Robot A Advanced Powerful, Smart And Intelligent Group Management Bot With New And Powerful Features ... Written with Pyrogram and Telethon... If

Muhammad Nawawi 3 Dec 23, 2021
A BOT TO FIND ID OF A STICKER.

sticker id A BOT TO FIND ID OF A STICKER. THIS REPOSITORY HAVE TWO BRANCHES FOR DEPLOY WITH COMMAND & WITHOUT COMMAND. Mandatory variables API_ID - Ge

Ashik Muhammed 3 Dec 29, 2022
Linky bot, A open-source discord bot that allows you to add links to ur website, youtube url, etc for the people all around discord to see!

LinkyBot Linky bot, An open-source discord bot that allows you to add links to ur website, youtube url, etc for the people all around discord to see!

AlexyDaCoder 1 Sep 20, 2022