Awscli autocompletion not working in zsh

The auto-completion for awscli commands is not working. I am using zsh with oh-my-zsh enabled and the aws plugin.

$ nixos-version 
19.09pre180443.4dd5c93998d (Loris)
$ nix-channel --list 
nixos https://nixos.org/channels/nixos-unstable
zsh = {
  enable = true;
  enableCompletion = true;
  ohMyZsh = {
      enable = true;
      theme = "steeef";
      plugins = [ "z" "aws" ];
  };
};
$ aws --version
aws-cli/1.16.106 Python/2.7.16 Linux/4.19.44 botocore/1.12.96

Trying to debug the issue I have checked what other packages do for adding auto-completion. It looks like all of them are moving the auto-completion scripts to $out/share/zsh/site-functions. And somehow all the folders are available to zsh via $FPATH. I can see many directories in my $FPATH, but none about awscli.

Any help would be much appreciated. I have looked for similar issues in Github with no luck. Am I misconfiguring something?

I had similar problem, but with docker. I had docker dir in my $FPATH but docker completion didn’t work. I’ve disabled ohMyZsh entirely in the config and completion started to work, not from ohMyZsh plugins.

I think there is some problem with ohMyZsh. But I don’t know what exactly. I wont investigate this since I stop using it. I switched to POWERLEVEL9K for prompt bells and whistles, and the only thing that I need from ohMyZsh is substring history search, which I’ve installed from the package.