diff --git a/Dockerfile b/Dockerfile
index 806af9d3e2f6392a3f0ae56cb2d06ca9576118bb..609c49ee924ff3cb5534f8cbe9acf08c69e7d17f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -21,11 +21,6 @@ ARG AGENT_URL="https://common.${REGION}.informaticacloud.com/package-manager/fil
 ARG USER=agent
 ENV INFA_HOME=/home/$USER/infaagent
 
-# this better bypass python trying to use pip install
-RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
-RUN unzip awscliv2.zip
-RUN ./aws/install
-
 # install system tools
 RUN apt-get update && apt-get install -y \
 curl \
@@ -41,7 +36,13 @@ unixodbc \
 unzip \
 wget \
 libidn11 \
-python3
+python3 \
+pipx
+
+# all this to run python properly
+RUN pipx ensurepath
+ENV PATH="$PATH:/root/.local/bin"
+RUN pipx install awscli
 
 RUN python3 --version