Akshat Uppal
Akshat Uppal

Reputation: 21

ERROR: Your requirements.txt is invalid. Snapshot your logs for details

I am new to AWS CLI USAGE. So do explain me the error clearly so that i don't make that mistake next time.

Here is my requirements.txt file :

    appdirs==1.4.3
    cssselect==1.0.1
    dj-database-url==0.4.2
    Django==1.11
    django-ckeditor==5.2.2
    Markdown==2.6.8
    packaging==16.8
    psycopg2==2.5.4
    pyparsing==2.2.0
    pytz==2017.2
    six==1.10.0

Here are my files inside .ebextensions directory :

And here is my config.yml file inside .ebextensions/.elasticbeanstalk :

 branch-defaults:
     default:
        environment: environment
    environment-defaults:
      environment:
        branch: null
        repository: null
    global:
      application_name: cv_web
      default_ec2_keyname: aws-eb2
      default_platform: Python 3.4
      default_region: ap-south-1
      instance_profile: null
      platform_name: null
      platform_version: null
      profile: eb-cli
      sc: null
      workspace_type: Application

Upvotes: 0

Views: 1416

Answers (1)

morinx
morinx

Reputation: 635

There is a known issue with psycopg2 on AWS. You have to manually sudo install it.

What I usually do is I include the psycopg2 install (reqires installing postgressql-devel first) in .ebextensions so to make sure it's available before requirements.txt kicks off.

Include this in your config file:

container_commands:
  01_postgresql:
    command: sudo yum -y install gcc python-setuptools python-devel postgresql-devel
  02_postgresql:
    command: sudo easy_install psycopg2

Upvotes: 2

Related Questions