Deploy to AWS Beanstalk not working

nick.young.356's Avatar


14 Feb, 2017 03:13 PM

I followed the guide in this blog post:

The build and deployment succeed. I see in beanstalk the application update and result in "Environment update completed successfully.". However, after reviewing the deployed site, it does not contain any updates. I manually reviewed the zip file loaded to S3 and it is correct, but somehow it's not getting to IIS.

Deploying manually from visual studio using the AWS deploy tool works just fine. Here is my deploy script:

$packageweb = $artifacts.values | Where-Object { $_.path -like '*' }
$exe = "C:\Program Files (x86)\AWS Tools\Deployment Tool\awsdeploy.exe"

&$exe -w "-DDeploymentPackage=$($packageweb.path)" "-DEnvironment.Name=AppEnvironmentName" "-DApplication.Name=AppName" "-DRegion=us-east-1" "-DAWSAccessKey=$env:AWSAccessKeyId" "-DAWSSecretKey=$env:AWSSecretKey" "-r" "C:\projects\projectName\awsdeploy.txt"

  1. 1 Posted by Ilya Finkelshte... on 14 Feb, 2017 05:51 PM

    Ilya Finkelshteyn's Avatar

    Hi Nick,

    I wonder if * filter works OK. Can you please try to add write-host $packageweb.path as second line in the script and see if it actually returns something?


  2. 2 Posted by nick.young.356 on 14 Feb, 2017 06:41 PM

    nick.young.356's Avatar

    Good thought. We could already infer the path is getting properly set because the correct zip is loaded to S3. However, I added this line anyway and verified it does print a valid path.

  3. 3 Posted by Ilya Finkelshte... on 14 Feb, 2017 07:49 PM

    Ilya Finkelshteyn's Avatar

    Could you please send us full appveyor.yml (or use Export YAML menu if you use UI). It is safe if you use secure variables, but please feel free to make conversation private if needed.


  4. 4 Posted by nick.young.356 on 14 Feb, 2017 07:58 PM

    nick.young.356's Avatar

    YAML is attached.

  5. 5 Posted by Ilya Finkelshte... on 14 Feb, 2017 08:19 PM

    Ilya Finkelshteyn's Avatar

    This looks good, maybe something on Amazon side. I will try to run it on my lab and see if this works for me and let you know.

  6. 6 Posted by Ilya Finkelshte... on 15 Feb, 2017 09:01 AM

    Ilya Finkelshteyn's Avatar

    I was able to make it work.

    Please note that I will delete this site and YAML in a day or two.

    Did you check All Applications > AppName > Application versions in AWS Beanstalk? Does it list your deployments from VS and from AppVeyor?


  7. 7 Posted by korenb on 07 Jul, 2017 10:43 AM

    korenb's Avatar

    I have absolutely the same problem
    I checked All Applications > AppName > Application versions and it's ok, i see list of deployments from VS and AppVeyor.
    Moreover, nothing is changed when i switch among thouse versions. The version is worked fine that was published via VS, not AppVeyor

  8. 8 Posted by nick.young.356 on 07 Jul, 2017 01:36 PM

    nick.young.356's Avatar

    @korenb Yeah I never found the root cause. We're still doing manual deploys since neither AppVeyor nor Amazon have taken ownership of the issue.

    The next step I was going to try was to deploy using the AWS CLI using the same commands defined in the AppVeyor deployments. If that works from the CLI, it points to an AppVeyor issue. If it does not, it points to an Amazon issue. I suspect it will not work from the CLI.

  9. 9 Posted by korenb on 10 Jul, 2017 10:44 AM

    korenb's Avatar

    @nick.young.356, I have executed deploy-script on my local machine. the result still the same. so AppVeyor isn't guilty.

  10. 10 Posted by Ilya Finkelshte... on 10 Jul, 2017 08:59 PM

    Ilya Finkelshteyn's Avatar

    @korenb Thank you for update! We have a hard time reproducing it. If you could share some response from Amazon support here, it would be great.

    Also if you (or @nick.young.356) by any chance can try to create new beanstalk application (side by side with existing one), and run the same script (with only -DEnvironment.Name changed) against it, will it help?

  11. 11 Posted by nick.young.356 on 17 Jul, 2017 12:21 PM

    nick.young.356's Avatar

    We have multiple beanstalk applications all with the same, or extremely similar, configs. The deploy fails for all of them.

  12. 12 Posted by Ilya Finkelshte... on 17 Jul, 2017 05:23 PM

    Ilya Finkelshteyn's Avatar

    @nick.young.356 does it work if you run the same script from local machine?

  13. 13 Posted by nick.young.356 on 19 Jul, 2017 12:09 PM

    nick.young.356's Avatar

    No it doesn't. I'll be working with AWS when I have time to see if I can find a solution. I'll update the thread once I've done that.

  14. 14 Posted by Ilya Finkelshte... on 17 Aug, 2018 04:04 PM

    Ilya Finkelshteyn's Avatar

    Please note that built-in Amazon Elastic Beanstalk deployment is available and also special packaging option for ASP.NET Web application was added.

    Original problem described in this issue was related to the fact that DeployIisAppPath should be set to Default Web Site in publishing profile when packaging, as described in step 10 here. New Beanstalk specific packaging option takes care of that.

  15. Ilya Finkelshteyn closed this discussion on 17 Oct, 2018 09:00 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac