I am trying to mount EFS to amazon beanstalk with EBS script. storage-efs-createfilesystem.config But that script is not able to find an environment so below 3 lines are failing and says no such file or directory. Code:
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')
ERROR:
2020-07-22 16:51:24,595 P5115 [INFO] Command 01_mount 2020-07-22 16:51:24,627 P5115 [INFO] -----------------------Command Output----------------------- 2020-07-22 16:51:24,628 P5115 [INFO] /tmp/mount-efs.sh: line 3: /opt/elasticbeanstalk/bin/get-config: No such file or directory 2020-07-22 16:51:24,628 P5115 [INFO] /tmp/mount-efs.sh: line 4: /opt/elasticbeanstalk/bin/get-config: No such file or directory 2020-07-22 16:51:24,628 P5115 [INFO] /tmp/mount-efs.sh: line 5: /opt/elasticbeanstalk/bin/get-config: No such file or directory 2020-07-22 16:51:24,628 P5115 [INFO] Mounting ITE EFS filesystem to directory ... 2020-07-22 16:51:24,628 P5115 [INFO] Stopping NFS ID Mapper... 2020-07-22 16:51:24,628 P5115 [INFO] rpc.idmapd is already stopped!