Slider

How To Host Telegram Bot on AWS - Amazon Web Services

How To Host Telegram Bot on AWS - Amazon Web Services Deploy Marie Bot using AWS infotel infotel bot
2
How to Deploy Marie Bot using AWS 

Configure your Instance;

    1. Create an AWS account!

    Link : https://portal.aws.amazon.com/billing/signup#/start

    2. Launch an EC2 instance.

    3. Convert PEM file to PPK file using PuTTY

    Download PuTTY : https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

    4. Connect to EC2 instance using PuTTy

5. Some required commands,
        sudo apt update
        sudo apt upgrade
        sudo apt-get install python3-pip

NOTE: Use Enter key to run your commands.

Use right click to paste your copied command into terminal.

Now your instance is ready to USE!

Configure Marie Bot REPO;

1. Clone the source code of Marie

Source code: https://github.com/TGExplore/Marie-2.0-English


2. Create config.py file from sample_config.py

    Bot Token : from Bot Father @botfather

    Owner ID : from Rose ( /id ) @MissRose_bot

    Owner username : Any name

    Database URL : from AWS


Deploy your Marie REPO in AWS instance;

1. Using screens is a better way to run your programs.

        screen -S marie

This will open a new screen inside our main terminal.


2. Clone your source code to your instance

        git clone <your_repo_url>

Enter your GitHub username and password and hit enter!


3. Change your current directory

        cd <repo name>

4. Install required dependencies.

        pip3 install -r requirements.txt

5. Start your BOT !

        python3 -m tg_bot

Your BOT is ready to use :)


Some Usefull commands;

> To detach from current screen

Ctrl + a + d ( hold Ctrl and press a and d sequentially )

> To see all active screens

screen -ls

> To attach to a screen

screen -r number

>To detach from a screen

screen -d number

>To logout from terminal with BOT running in screen

Ctrl + a + d

Note: 

AWS Free Tier Has many limitations. Some Important things to know!!

> Free tier instances will be available for 1 year! After that it will be charged. You need to either pay or need to delete the instance.

> It will be completely free for 1 Year if you stay within the limits!!

> Free Tier has 15GB Bandwidth limit/Month. That is, You cant host any bots that transfers data outside of server. Like Rename or Upload bots! Because Uploading your file to telegram counts as Outbound traffic. And 15 GB is too less for that!

> Max Storage allocated for free tier is 30GB! If you select above that, Your card will be billed!

> AWS RDS Postgres DB used for Marie BOT is free for 12 months. You must delete you DB Before free tier ENDS or else your card will be billed!
If you plan to use free, all you filters will be lost after 1 year!
So better use any other DB instead of AWS RDS if you want to keep your filters. Heroku Postgres DB is also a option!
Simply copy the DB URL from heroku and paste in config.py file :)

> Only make one instance in free tier! If you make two, you will be Billed!

This is just a TUTORIAL on how to host bots inside a VPS or VPC etc!
We are not responsible if you exceed any limits and YOU are charged..


If you are willing to pay for VPS there are many better options other than AWS such as Digital Ocean, Scaleway, Hetzner etc..

Credits: @prgofficial

2
( Hide )
  1. Please find some free hosting services like heroku and make video about it.

    ReplyDelete
  2. maa chuda behinchod

    ReplyDelete

Disqus for infotelbot

disqus, infotelbot

DON'T MISS

beta, news, bot, features, bot, tutorial, Userbot, telegram
© All Rights Reserved
Made With By InFoTel