I am reluctant to refer you to aws-cli V2 because it is way more involved to install. No idea why aws moved away from their original distribution method...
However, the V2 is going to be the way to go moving forwards :/
Didn't they move away exactly because of issues like this? As I understand it, aws-cli v2 is still written in Python but ships everything it needs self-contained so it can avoid Python dependency hell[1]
cat -n shell.nix
{ pkgs ? import <nixpkgs> {}
}:
pkgs.mkShell {
name = "dev-env";
buildInputs = with pkgs; [
awscli2
];
}
And then you can have it available when entering shell with nix-shell.