AWS SSM Parameter Store as Secrets Backend (Airflow 1.10.10+)


Airflow 1.10.10 includes feature that allows you to use Environment Variables to sync Airflow Connections + Variables to secrets held in a few different secret backends, including Hashicorp Vault, GCP Secrets Manager and AWS Parameters Store.

On Astronomer’s 1.10.10 image, the following additional backends are included (not yet available in core Airflow’s 1.10.10 release):

  • AWS Secrets Manager
  • AWS Vault

Airflow Instructions:

AWS Parameter Store Example

1. Enable with Env Vars

ENV AIRFLOW__SECRETS__BACKEND =airflow.contrib.secrets.aws_systems_manager.SystemsManagerParameterStoreBackend

=’{“connections_prefix”: “/airflow/connections”, “variables_prefix”: “/airflow/variables”}’


2A. Set your connection in AWS Parameter Store:

First, set connections_prefix as /airflow/connections. The connection itself has three parts:

  • Connection Name
  • Type
  • Value

param = {

    'Name': '/airflow/connections/example_postgres',

    'Type': 'String',

    'Value': 'postgresql://airflow:airflow@host:5432/airflow'

Note: SecureString Parameter Type is not yet supported, only String type.

2B. Supply AWS Profile

To authenticate, you can either supply a profile name to reference aws profile, e.g. defined in ~/.aws/config or set the following Env Vars:


3. Airflow Hook to pull Connection

Given the example above, using the following in your DAG - BaseHook.get_connection(conn_id="example_postgres") should give a Connection object with:

  • host=host
  • port=5432
  • login=airflow
  • password=airflow

Hello Paola, thanks for posting this. I’ve been working on using AWS Secrets manager as the secrets backend. It seems that AWS Param Store and AWS Secrets Manager are similar … but also completely different.

I tried following these instructions for setting up AWS secrets manager .

No joy.

At the time of writing the link above has theSecretsManagerBackend class at

I am using astronomerinc/ap-airflow:1.10.10-buster-onbuild and I have the theSecretsManagerBackend class at airflow.contrib.secrets.aws_secrets_manager.SecretsManagerBackend

I was able to retrieve secrets from AWS Secret Manager with these settings in the dockerfile:

ENV AIRFLOW__SECRETS__BACKEND="airflow.contrib.secrets.aws_secrets_manager.SecretsManagerBackend"
ENV AIRFLOW__SECRETS__BACKEND_KWARGS="{"connections_prefix": "/airflow/connections"}"

Within AWS Secrets Manager I stored my connections with name prefix = airflow/connections and with the value using the URI format (


I retrieved secrets with:

myconn = BaseHook.get_connection(“secret-name”)

1 Like

Hi @abazuaye! Thanks for posting this. Am I understanding correctly that you got AWS Secrets Manager to work then? If not, let me know what specific issues you’re running into and we can see if our team can help.

Also, we’ve updated our official Astronomer documentation with more specific instructions for Hashicorp Vault and AWS SSM Parameter Store here:

Would love to add an “AWS Secrets Manager” section. If you can confirm that you got it to work with the instructions above, that’d be helpful :slightly_smiling_face:

Hi @paola
yes, the config that I posted above is working for me in Astronomer cloud.
I am now able to retrieve connections from AWS Secret Manager

1 Like