is it possible to inject secret env into apprunner's build phase?

33 Views Asked by At

Actually I've this configuration

version: 1.0
runtime: nodejs18

build:
  commands:
    pre-build:
      - npm install
    build:
      - npm run build
    post-build:
      - npm test
run:
  runtime-version: 18.19.0
  command: npm run start
  network:
    port: 8000
    env: SERVER_PORT
  secrets:
    - name: SECRETS
      value-from: arn:aws:secretsmanager:eu-central-1:936969959426:secret:xxxxxx-xxxxxx

However, I need to use the same secret in the build phase of this configuration. This secret contains all reserved env variables and I can't share it with my config. Indeed, this project is on GitHub and AWS Apprunner detects any update to the codebase. Any solution or suggestion?

0

There are 0 best solutions below