Renew Let's Encrypt on Amazon Linux 2 instanace [LightSail]

I have a AWS LightSail instance with OS as Amazon Linux 2. SSL is already available, but its getting expired soon. Now I am trying to renew with below cmd

sudo certbot renew --dry-run

but it gives me below error

 https://aws.amazon.com/amazon-linux-2/
 [ec2-user@ip-xxxxxx ~]$ sudo certbot renew --dry-run
 sudo: certbot: command not found
 [ec2-user@ip-xxxxx ~]$ 

Can anyone guide me or provide any reference link to fix above mention issue

For more detail: In AWS Lightlai Linux instance I have installed docker. Inside docker i have Asp.net core, Mysql, NginX below is the docker-compose.yaml

version: '3.4'

services:
  blogmenia:    
    build:
            context: .
            dockerfile: Blogmenia/Dockerfile
    container_name: blogmenia
    ports:
            - 1699
    restart: always
    depends_on:
            - db
            - reverse-proxy
    networks:
            - app-network
    volumes:
            - app-data:/app/wwwroot/mediaUpload

  db:
    image: mysql:8.0
    container_name: mysql-db
    restart: always
    command: --default-authentication-plugin=mysql_native_password
    environment:
            MYSQL_DATABASE: "xxxxxxx" 
            MYSQL_ROOT_PASSWORD: "xxxxxxx"
    ports:
            - 3306
    restart: always
    volumes:
            - mysql-data:/var/lib/mysql
    networks:
            - app-network

  reverse-proxy:
    image: nginx
    container_name: nginx-proxy
    restart: always
    volumes:
            - ./nginx-conf:/etc/nginx/conf.d
            - ./nginx-conf/letsencrypt:/etc/letsencrypt
    ports:
            - 80:80
            - 443:443
    networks:
            - app-network

volumes:
    mysql-data:
    app-data:

networks:
        app-network:
                driver: bridge

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.