I am trying to deploy my Laravel application into ElasticBeanstalk environment. I am using "eb deploy" command for the deployment. The command was working fine. I had been deploying my application successfully. At some point, I updated my CloudFormation template to change the environment name of the ElasticBeanstalk.

Then I also updated the .elasticbeanstalk/config.yml file as follow.

branch-defaults:
  master:
    environment: PatheinDirectoryTesting
    group_suffix: null
environment-defaults:
  MyanEat-test-env:
    branch: null
    repository: null
global:
  application_name: PatheinDirectoryApplication
  default_ec2_keyname: null
  default_platform: arn:aws:elasticbeanstalk:eu-west-1::platform/64bit Amazon Linux
    2 v3.1.0 running PHP 7.3
  default_region: eu-west-1
  include_git_submodules: true
  instance_profile: null
  platform_name: null
  platform_version: null
  profile: null
  sc: git
  workspace_type: Application

Then in the terminal, I updated the "eb" command to use the right environment running the following command.

eb use PatheinDirectoryTesting

Then I run "eb deploy" to deploy my application. It deployed the zip file successfully. Then it threw the error after uploading the zip.

enter image description here

Then I run the "eb logs" to get the error in the logs. This is the error I found in the logs.

2020/08/29 21:42:29.413325 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-init -s arn:aws:cloudformation:eu-west-1:733553390213:stack/awseb-e-gntnptfj8v-stack/90004470-ea3e-11ea-8e57-02d39f83e350 -r AWSEBAutoScalingGroup --regio
n eu-west-1 --configsets Infra-EmbeddedPostBuild
2020/08/29 21:42:31.691170 [ERROR] An error occurred during execution of command [app-deploy] - [PostBuildEbExtension]. Stop running the command. Error: Container commands build failed. Please refer to /var/log/cfn-init.log for more
 details.

I tried deleting the CloudFormation template and deploying again. Then I deploy the application. The error persists. How can I fix it?

0

There are 0 answers