# Export secrets as environement variables for the next steps

**URL:** <https://discuss.circleci.com/t/export-secrets-as-environement-variables-for-the-next-steps/31354>\
**Category:** Build Environment\
**Tags:** security\
**Created:** [July 15, 2019, 5:17pm UTC](https://discuss.circleci.com/t/export-secrets-as-environement-variables-for-the-next-steps/31354 "2019-07-15T17:17:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![maximelebastard](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@maximelebastard](https://discuss.circleci.com/u/maximelebastard)\
**Post date:** [July 15, 2019, 5:17pm UTC](https://discuss.circleci.com/t/export-secrets-as-environement-variables-for-the-next-steps/31354/1 "2019-07-15T17:17:59Z")

</div>

Hi,

we’re thinking about switching to Circle CI and are currently testing a few CI providers. All our secrets are curently stored on AWS Secrets Manager and we’d like to be able to load them as environment variables for the next jobs.

Is there a way to export env variables from a job ? Codefresh exposes a file env\_vars\_to\_export where we can write to expose env vars on the whole pipeline. We wrote a test plugin for that and it works well [https://github.com/PathMotion/aws-secrets-manager-codefresh-step](https://github.com/PathMotion/aws-secrets-manager-codefresh-step)

What would be the CircleCI equivalent of that ?

---

<div class="post-metadata">

**Author:** ![halfer](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/halfer/32/9083_2.png) [@halfer](https://discuss.circleci.com/u/halfer)\
**Post date:** [July 15, 2019, 5:52pm UTC](https://discuss.circleci.com/t/export-secrets-as-environement-variables-for-the-next-steps/31354/2 "2019-07-15T17:52:31Z")

</div>

If you want to share data between jobs in a single workflow, then use workspaces. This is a way of saving/loading a folder. You could create a file per variable, or store them all in XML/JSON etc, and load them into env vars from there.
