AWS CodeBuild, ECS, ECR, gradle, jib troubleshooting

I am using a jib plugin to build and push docker images to ECR and jib requires docker-credential-ecr-loginfor interacting with AWS ECR and that can be installed with help of amazon-linux-extra, which is pre-installed or can be installed in amazon-linux2 or other linux OS, however when you execute the command `amazon-linux-extras enable docker`, you will be facing with this python error, /usr/local/bin/python: No module named amazon_linux_extrasthat you can solve with giving a environment variable PYTHON to python2 which indicating amazon-linux-extras to run with python2 not default phython3.