Deploy to AWS Beanstalk not working
I followed the guide in this blog post: https://www.appveyor.com/blog/2016/11/07/aws-elastic-beanstalk/.
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 '*AppName.zip' }
$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"
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
| ? | 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

1 Posted by Ilya Finkelshte... on 14 Feb, 2017 05:51 PM
Hi Nick,
I wonder if
*AppName.zipfilter works OK. Can you please try to addwrite-host $packageweb.pathas second line in the script and see if it actually returns something?Ilya.
2 Posted by nick.young.356 on 14 Feb, 2017 06:41 PM
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 Posted by Ilya Finkelshte... on 14 Feb, 2017 07:49 PM
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.Ilya.
4 Posted by nick.young.356 on 14 Feb, 2017 07:58 PM
YAML is attached.
5 Posted by Ilya Finkelshte... on 14 Feb, 2017 08:19 PM
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 Posted by Ilya Finkelshte... on 15 Feb, 2017 09:01 AM
I was able to make it work.
YAML
Commit
Build
Updated site
Please note that I will delete this site and YAML in a day or two.
Did you check
All Applications > AppName > Application versionsin AWS Beanstalk? Does it list your deployments from VS and from AppVeyor?Ilya.
7 Posted by korenb on 07 Jul, 2017 10:43 AM
I have absolutely the same problem
I checked
All Applications > AppName > Application versionsand 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 Posted by nick.young.356 on 07 Jul, 2017 01:36 PM
@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 Posted by korenb on 10 Jul, 2017 10:44 AM
@nick.young.356, I have executed deploy-script on my local machine. the result still the same. so AppVeyor isn't guilty.
10 Posted by Ilya Finkelshte... on 10 Jul, 2017 08:59 PM
@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.Namechanged) against it, will it help?11 Posted by nick.young.356 on 17 Jul, 2017 12:21 PM
We have multiple beanstalk applications all with the same, or extremely similar, configs. The deploy fails for all of them.
12 Posted by Ilya Finkelshte... on 17 Jul, 2017 05:23 PM
@nick.young.356 does it work if you run the same script from local machine?
13 Posted by nick.young.356 on 19 Jul, 2017 12:09 PM
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 Posted by Ilya Finkelshte... on 17 Aug, 2018 04:04 PM
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
DeployIisAppPathshould be set toDefault Web Sitein publishing profile when packaging, as described in step 10 here. New Beanstalk specific packaging option takes care of that.Ilya Finkelshteyn closed this discussion on 17 Oct, 2018 09:00 PM.