【以下的问题经过翻译处理】 我已经尝试运行下面这个配置文件,但是组件无法获取变量:SECRET_ARN = os.getenv('SECRET_ARN')
RecipeFormatVersion: '2020-01-25'
ComponentName: "{COMPONENT_NAME}"
ComponentVersion: "{COMPONENT_VERSION}"
ComponentDescription: ''
ComponentPublisher: "{COMPONENT_AUTHOR}"
ComponentConfiguration:
DefaultConfiguration:
secretArn: 'no_secret'
Manifests:
- Platform:
os: linux
Artifacts:
- URI: s3://BUCKET_NAME/COMPONENT_NAME/COMPONENT_VERSION/secret_loader.zip
Unarchive: ZIP
Lifecycle:
Setenv: SECRET_ARN={configuration:/secretArn}
Install: python3 -m pip install --user -r {artifacts:decompressedPath}/secret_loader/requirements.txt
Run: |
export SECRET_ARN={configuration:/secretArn}
python3 -u {artifacts:decompressedPath}/secret_loader/main.py