The lookup plugin 'amazon.aws.aws_secret' failed: Failed to find secret

adamatrfx
Fri, 16 Jan 2026 06:00:50 +0000
Get Help

I am trying to use the amazon.aws.aws_secret lookup but I can’t figure out how.

This command returns the result I am expecting:

ansible localhost -m shell -a “aws secretsmanager get-secret-value --secret-id ansible/private-key --output text --query SecretString --profile the-honor-flight-application”

But this task in my playbook isn’t

- name: Lookup secretsmanager secret in the the-honor-flight-application profile
ansible.builtin.debug: msg=“{{ lookup(‘amazon.aws.aws_secret’, ‘ansible/private-key’, ‘region=us-east-1’, ‘profile=the-honor-flight-application’) }}”

Error while resolving value for ‘msg’: The lookup plugin ‘amazon.aws.aws_secret’ failed: Failed to find secret ansible/private-key (ResourceNotFound)"}

Anyone have an idea as to which piece to the puzzle I am missing?

5 posts - 4 participants