Amazon web services 无法使用弹性豆茎安装EFS

Amazon web services 无法使用弹性豆茎安装EFS,amazon-web-services,amazon-elastic-beanstalk,ebs,Amazon Web Services,Amazon Elastic Beanstalk,Ebs,我正在尝试使用EBS脚本将EFS装载到amazon beanstalk。storage-efs-createfilesystem.config 但该脚本无法找到一个环境,因此下面3行代码都失败了,并表示没有这样的文件或目录。 代码: 错误:- 2020-07-22 16:51:24595 P5115[信息]命令01_mount 2020-07-22 16:51:24627 P5115[信息]------------------------------------命令输出-------------

我正在尝试使用EBS脚本将EFS装载到amazon beanstalk。storage-efs-createfilesystem.config 但该脚本无法找到一个环境,因此下面3行代码都失败了,并表示没有这样的文件或目录。 代码:

错误:-

2020-07-22 16:51:24595 P5115[信息]命令01_mount 2020-07-22 16:51:24627 P5115[信息]------------------------------------命令输出----------------------- 2020-07-22 16:51:24628 P5115[INFO]/tmp/mount-efs.sh:第3行:/opt/elasticbeanstalk/bin/get-config:没有这样的文件或目录 2020-07-22 16:51:24628 P5115[INFO]/tmp/mount-efs.sh:第4行:/opt/elasticbeanstalk/bin/get-config:没有这样的文件或目录 2020-07-22 16:51:24628 P5115[INFO]/tmp/mount-efs.sh:第5行:/opt/elasticbeanstalk/bin/get-config:没有这样的文件或目录 2020-07-22 16:51:24628 P5115[信息]正在将ITE EFS文件系统装载到目录。。。 2020-07-22 16:51:24628 P5115[信息]正在停止NFS ID映射程序。。。
2020-07-22 16:51:24628 P5115[INFO]rpc.idmapd已停止

发生错误的原因是您正在使用亚马逊Linux 2(AL2)作为您的电子商务平台

但是,脚本尝试使用
/opt/elasticbeanstalk/bin/get config
,该仅在AL1中工作


因此,您要么修改脚本以在AL2中工作,要么使用基于AL1的旧EB平台。

是的,我修改了脚本。谢谢你pointer@RajeshNarayanan没问题。如果答案有帮助,我们将不胜感激。
   EFS_REGION=$(/opt/elasticbeanstalk/bin/get-config environment | jq -r '.REGION')
   EFS_MOUNT_DIR=$(/opt/elasticbeanstalk/bin/get-config environment | jq -r '.MOUNT_DIRECTORY')
   EFS_FILE_SYSTEM_ID=$(/opt/elasticbeanstalk/bin/get-config environment | jq -r '.EFS_ID')