.NET 6 MVC (C#) app not deploying .ebextensions on elastic beanstalk host

0

I'm having trouble with my .ebextensions files deploying with my .NET application to my elastic beanstalk environment. I've verified the yaml, even using some test code to simplify things.

commands:
  create_test_file:
    command: "echo 'This is a test file' > /tmp/test.txt"

Directory & file is included in the publish zip file (file is copy always). When I publish, the above test.txt file is not created (nor any other configurations have worked). I also don't see anything in the logs references ebextensions. I'm publishing with the AWS toolkit "Publish to AWS Elastic Beanstalk...", all other changes do get deployed (i.e. code changes), just not .ebextensions.

Edit: Tested another configuration file in my .ebextensions folder and it seemed to work, but for a different path:

files:
    "/etc/httpd/conf.d/filelimit.conf":
        mode: "000755"
        owner: root
        group: root
        content: |
            LimitRequestBody 102400

Copied that file and created a second .conf file:

files:
    "/etc/nginx/conf.d/proxybuffer.conf":
        mode: "000755"
        owner: root
        group: root
        content: |
            proxy_buffer_size 256k

And this one did NOT work. Then I modified the same file to change nginx to httpd to drop this same file in that folder, and it worked.

So it's something to do with /etc/nginx - looking at permissions all of the folders have the same drwxr-xr-x (755), so that doesn't seem to be it. Is there some additional protection on the nginx folder? Going to maybe try putting the file in source and copying it.

asked a year ago246 views
1 Answer
0
Accepted Answer

Resolved:

For some reason using .ebsettings and yaml did not work only for the nginx conf.d folder. Was really strange, never got to the bottom of why. It would create and/or copy files to other folders no problem.

Solution: Added a .platform folder to the root of my .net project. .platform\nginx\confd\nginx-proxybuffers.conf containing the nginx config modifications. That worked for some reason. Problem solved for folks who may have this problem in the future.

answered a year 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