AWS elastic beanstalk initialization error while deploying Django app - django

I tried to install the awsebscli package in my virtualenv, first trying the below command
pip install awsebcli
then the next command that initializes eb
eb init
then when I choose a region number from the given list, it says the following error given below.
UnicodeDecodeError: ascii codec can't decode byte 0xe2 in position 20:
ordinal not in range(128)
This error shows up when I am selecting the region using its number.

Related

Deserialize the protobuf message in AirFlow

As I understood correctly, to deserialize the protobuf message, I have to generate a special python class using the command protoc -I=$SRC_DIR --python_out=$DST_DIR $SRC_DIR/scheme.proto (https://developers.google.com/protocol - buffers/documents/pythontutorial).
But how can I do it in AirFlow? Let's say I'm just a user and don't have access to execute a command on the command line.
And an even deeper question, how do I do this in AirFlow on AWS? We install a new python package via a text file by simply adding a new line with the package and version. If I create a package anywhere with a python class from a .proto file - how can I install it on AWS?

Upgrade reviewboard 2.x to 3.x

I am getting following error after upgraing reviewboard
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe7 in position 0: invalid continuation byte
1- Restore DB to new host
2- Convert all tables from MYIsam to Innodb
I got the answer.
We need to copy the SECRET_KEY from the settings.py file on the old host into the one on the new server.

AWS Elastic Beanstalk commands return no output

I am very new to the Amazon Web Services and have been trying a learn-by-doing approach with them.
In summary I was trying to set up Git with the elastic beanstalk command line interface for my web-app. However, I wanted to use my SSH key-pair to authenticate (aws-access-id, secret) and in my naivety and ignorance, I just supplied this information (the SSH key files) and now I can't get it to work. More specifically stated below.
I have my project directory with Git set up so that it works. I then open the git bash window MINGW64 (I am on Windows 10) and attempt to set up eb.
$ eb init
It then tells me that my credentials are not set up and asks me for aws-access-id and the secret. I had just set up the SSH key-pair and try to enter these files; what's the harm in trying? EB failure, it turns out. Now, the instances seem to run fine still, looking at their status on the AWS console website. However, whatever I type into the bash:
$ eb init
$ eb status
$ eb deploy
$
There is no output. Not even an error. It just silently returns to awaiting a new command from me.
When using the --debug option with these commands, a long list of operations is returned, ending with
botocore.parsers.ResponseParserError: Unable to parse response (no element found: line 1, column 0), invalid XML received:
b''
I thought I would be able to log out or something the like, so that I could enter proper credentials which I messed up from the beginning. I restarted the web-app from the AWS webpage interface and restarted my PC. No success.
Thanks in advance.
EDIT:
I also tried reinstalling awscli and awsebcli:
pip uninstall awsebcli
pip uninstall awscli
pip install awscli
pip install awsebcli --upgrade --user
Problem persists, but now there is one output (previously seen only upon --debug option):
$ eb init
ERROR: ResponseParserError - Unable to parse response (no element found: line 1, column 0), invalid XML received:
b''
$
It sounds like you have replaced your AWS credentials in ~/.aws/credentials and/or ~/.aws/config file(s) with your SSH key. You could manually replace these or execute aws configure if you have the AWS CLI installed.

ERROR: Unknown or duplicate parameter: WSGIPath

I'm currently trying to deploy a Django 1.7, Python 3.4 WebApp to AWS Elastic Beanstalk. I'm following the guide on the AWS site, but when I try using their config files in the .ebextensions directory, the line "option_name: WSGIPath" seems to give me the error "ERROR: Unknown or duplicate parameter: WSGIPath"
I had the same issue on eb create command, but I solved this problem a moment ago.
It's because I have selected the incorrect option ( fourth ) while I executing eb init command on CLI,
Select a platform version.
1) Python 3.4
2) Python 2.7
3) Python
4) Python 3.4 (Preconfigured - Docker)
(default is 1): 4
So I started the sample project again, At this time I just selected the first, then I was able to finish the AWS guide.

elastic beanstalk: incremental push git

When I would like to push incremental changes to the AWS Elastic Beanstalk solution I get the following:
$ git aws.push
Updating the AWS Elastic Beanstalk environment None...
Error: Failed to get the Amazon S3 bucket name
I've already added FULLS3Access to my AWS users policies.
I had a similar issue today and here are the steps I followed to investigate :-
I modified line no 133 at .git/AWSDevTools/aws/dev_tools.py to print the exception like
except Exception, e:
print e
* Please make sure of spaces as Python does not work in case of spaces.
I ran command git aws.push again
and here is the exception printed :-
BotoServerError: 403 Forbidden
{"Error":{"Code":"SignatureDoesNotMatch","Message":"Signature not yet current: 20150512T181122Z is still later than 20150512T181112Z (20150512T180612Z + 5 min.)","Type":"Sender"},"
The issue is because there was a time difference in server and machine I corrected it and it stated working fine.
Basically the Exception will helps to let you know exact root cause, It may be related to Secret key as well.
It may have something to do with the boto-library (related thread). If you are on ubuntu/debian try this:
Remove old version of boto
sudo apt-get remove python-boto
Install newer version
sudo apt-get install python-pip
sudo pip install -U boto
Other systems (e.g. Mac)
Via easy_install
sudo easy_install pip
pip install boto
Or simply build from source
git clone git://github.com/boto/boto.git
cd boto
python setup.py install
Had the same problem a moment ago.
Note:
I just noticed your environment is called none. Did you follow all instructions and executed eb config/eb init?
One more try:
Add export PATH=$PATH:<path to unzipped eb CLI package>/AWSDevTools/Linux/ to your path and execute AWSDevTools-RepositorySetup.sh maybe something is wrong with your repository setup (notice the none weirdness). Other possible solutions:
Doublecheck AWSCredentials (maybe you are using different Key IDs / Wrong CredentialsFile-format)
Old/mismatching versions of eb client & python (check with eb -v and python -v) (current client is this)
Use amazons policy validator to doublecheck if your AWS User is allowed to perform all actions
If all that doesn't help im out of options. Good luck.