php 如何将Secret Manager与弹性Beanstalk集成

u5i3ibmn  于 2023-05-27  发布在  PHP
关注(0)|答案(1)|浏览(97)

我想用Elastic Beanstalk配置Secret Manager,为此,我在弹性Beanstalk属性中设置Secret Manager参数,如下所示
'''$(aws secretsmanager get-secret-value --secret-id arn:aws:secretsmanager:ca-central-1:465688179233:secret:CNP-staging-Secret-credentials-tiQrEv --region ca-central-1| jq --raw-output '.SecretString'| jq -r .DB_USERNAME)'''
在更新环境变量后,弹性beanstalk工作得很好,但当我使用AWSCodepipeline部署代码时,整个环境(EB)降级,并出现以下错误
'''SQLSTATE[HY 000] [1045]用户'$(aws secrets manager get-secret-value --secret-i '@'192.168.136.223'(使用密码:YES)(SQL:select * from information_schema.tables where table_schema = ebdb and table_name = migrations and table_type = 'BASE TABLE')'''您能告诉我如何将secret manager与Elastic beanstalk集成吗

相关问题