EC2 server - Writing permissions on server for Tomcat Java Spring application

I am deploying Tomcat EC2 instances through ElasticBeanStalk and would like to write a few files on the EC2 server (to add Spring search lucene files). However, this does not seem to be working.

I am trying to use .ebextensions configuration (.config) file as such :

    "/home/ec2-user/" :
        mode: "000755"
        owner: root
        group: root
        content: |
            chmod o+x /home
            chmod o+x /home/ec2-user
            chown ec2-user /home
            chown ec2-user /home/ec2-user

        command: sudo /home/ec2-user/
        ignoreErrors: false

What am i doing wrong ?