Error while installing the VCpp redistributalble uisng .ebextensions

0

I have a an ASP.NET Core web application which publishes to AWS using ElasticBeanstalk. In order to configure the windows environment I am using .ebextensions, which will copy the vcpp redistributables from S3 and installs them while creating the environment.

When published I am getting the error 'Error occurred during build: Command 01_instlVCx64 failed". Below is the command in my .ebextensions


files:
  "c:\\vcpp-redistributables\\vc_redist_x64.exe":
    source: https://<bucket_name>.s3.eu-west-2.amazonaws.com/vcpp-redistributables/vc_redist_x64.exe
    authentication: S3Access
commands:
  01_instlVCx64:
    command: c:\\vcpp-redistributables\\vc_redist_x64.exe /q /norestart

Below is the trace back from the logs

2022-03-22 15:31:35,876 [ERROR] Error encountered during build of prebuild_0_GWebApp: Command 01_instlVCx64 failed
Traceback (most recent call last):
  File "cfnbootstrap\construction.pyc", line 578, in run_config
  File "cfnbootstrap\construction.pyc", line 146, in run_commands
  File "cfnbootstrap\command_tool.pyc", line 127, in apply
cfnbootstrap.construction_errors.ToolError: Command 01_instlVCx64 failed
2022-03-22 15:31:35,876 [ERROR] -----------------------BUILD FAILED!------------------------

Could you please let me know what am I missing?**** Thanks in advance

asked 2 years ago178 views
1 Answer
0

Found the issue couple of days before. So, thought of answering my own question, so that it will be useful for others.

The issue is Elastic beanstalk instance (Windows server 2019) already has VCpp redistributables installed and which is later version that I am trying to install as part of .ebextensions. So, when I tried to install, it failed.

I figured it out, by enabling RDP connection on the EC2 instance that is created as part of Elastic beanstalk and run the scripts manually, which gave a detailed error message.

Hope it helps someone in the future.

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions