Getting doppler into an AWS Amplify react app?

We have some environment variables for our frontend react application-- nothing that we need to be concerned about being available in the browser. Our important env vars are only in our backend application.

Anyway, I’m having trouble getting my doppler envs into aws amplify.

It seems that you can use AWS Parameter store to get vars into a BACKEND amplify application but I’m not sure that works for frontend application (like our react app). Has anyone been able to confirm this?

Ended up with something like this for the amplify.yaml which requires generating a service token but at least works.

version: 1
applications:
  - frontend:
      phases:
        preBuild:
          commands:
            - export DOPPLER_TOKEN='dp.st.stage.123'
            - yarn install
        build:
          commands:
            - curl -Ls https://cli.doppler.com/install.sh | sh && doppler setup --no-interactive --configuration /doppler-staging.yaml
            - doppler run -- yarn build
      artifacts:
        baseDirectory: build
        files:
          - '**/*'
      cache:
        paths:
          - node_modules/**/*
    appRoot: ui