Can't set RDS while creating Elastic Beanstalk - amazon-web-services

I'm trying to create a Elastic Beanstalk environment with node.js platform. When I try to add RDS in EB, console is throwing error and I don't know the reason why. If you have any idea, plz leave a comment, thanks.
Configuration validation exception: Invalid option value: '5.6' (Namespace: 'aws:rds:dbinstance', OptionName: 'DBEngineVersion'): Engine Version 5.6 not supported for mysql db
error

You can fix this by running:
$ eb config
The command is going to open a notepad with your configuration settings. Scroll down to the bottom until you see aws:rds:dbinstance add a new setting specifying a newer MySQL version (eg. 8.0) like so:
aws:rds:dbinstance:
HasCoupledDatabase: 'false'
DBEngineVersion: '8.0'
Save and close the file. Your EB environment is going to update and you're then going to be able to change RDS settings via EB Console.

For beginners... you should use "eb cli" to use $eb config
and it worked for me, it is great answer. Thanks #duplxey
Something must gone wrong with elastic beanstalk with my

Related

Unable to connect to Huggingface from EC2 instance

I am running a python code in EC2 instance where I am loading a Huggingface model using the from_pretrained() method. I get the error
OSError: Couldn't reach server at 'https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased-config.json' to download pretrained model configuration file.
while trying to initialize the reader. To get over this, I downloaded the file manually and provided the local JSON path. That worked fine but then I see issues in loading the tokenizer too.
OSError: Couldn't reach server at '{}' to download vocabulary files.
I think my network settings of EC2 are not correct due to which I am unable to connect to external Huggingface repository.
I tried relaxing the inbound rules for EC2 to IP version|Type|Protocol|Port range|Destination=>IPv4|All|traffic|All|All|0.0.0.0/0 but even that doesn't help. The outbound rules are already IPv4|All|traffic|All|All|0.0.0.0/0.
I also tried creating an IAM role with policy AmazonS3ReadOnlyAccess and attached it to the EC2 instance but still getting the same error.
Could someone point what needs to be done to solve this. Thanks.
Here is how i fixed this issue.
i installed pyopenssl like this :
!pip install pyopenssl
then i restarted terminal and re-ran the code and it fixed the issue for me,thanks
might be your network is using proxy
this might help
$ proxies = {"http": 'foo.bar:3128', addyourproxy:'foo.bar:4012'}
$ from transformers import pipeline
$ qt_ans = pipeline('question-answering')

AWS Elastic Beanstalk ERROR: InvalidParameterValueError

While using command - eb deploy
I am getting below error. YAML is fine syntax wise
ERROR: InvalidParameterValueError - Each option setting in configuration file .ebextensions/environ-
v1.config in application version app-4c59-191023_045651 must be a map. Update each option setting in the configuration file.
.config file in .ebextensions folder which is in root of project
option_settings:
aws:elasticbeanstalk:application:environment:
PORT:8081
NODE_ENV:development
aws:autoscaling:launchconfiguration:
SecurityGroups:launch-123
I ran into the same issue running the AWS Deploy a Django App to Elastic Beanstalk (the tutorial does not seem to be up to date).
This AWS page has some info on the latest option setting formatting
It helped me resolve my issue which I think in your case would be including spaces after "PORT: ", "NODE_ENV: ", etc.
Also using an IDE that will highlight different words/parts of the file helped me understand how things were getting recognized.
have you tried double quotes in .config file like
"aws:elasticbeanstalk:application:environment":
instead of
aws:elasticbeanstalk:application:environment:
and, respectively,
"aws:autoscaling:launchconfiguration":
instead of
aws:autoscaling:launchconfiguration:

AWS Elastic Beanstalk .ebextensions' config_options not being used

I am using .git to deploy eb (PHP), and in the root folder, I've created folder .ebextensions and a file options.config with content
config_options:
aws:elasticbeanstalk:container:php:phpini:
document_root: /laravel/public
However, in the /var/log/eb-activity.log and I find the document_root is never being set
++ export PHP_DOCUMENT_ROOT=
++ PHP_DOCUMENT_ROOT=
In the S3 package I find the .ebextensions is bundled, so what can I do to debug this?
The docs state using option_settings rather than config_options (node.js, python and ruby examples use it, however the PHP specific example is for config_options)
option_settings:
- namespace: 'aws:elasticbeanstalk:container:php:phpini':
option_name: document_root
value: /laravel/public
or shorthand YAML as you are using
option_settings:
aws:elasticbeanstalk:container:php:phpini:
document_root: /laravel/public
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ebextensions-optionsettings.html
Also a simple thing but is the .ebextensions folder in the source root and the options.config in the .ebextensions folder? http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ebextensions.html
This is an old issue (the link) but as it is said in this link:
Having said that, we were concerned when a number of our customers
began reporting issues with setting the Document Root environment
configuration. Many of these environments were inexplicably "going
red" and failing to update correctly under certain conditions. After
some digging, we discovered that while the configuration settings were
being written correctly during a configuration update, they weren't
being written correctly when a new instance was launched (via Auto
Scaling, the AWS Toolkit for Eclipse, or otherwise).
I think your problem is not the configuration, but may be the AMI you are using, which AMI is it? The updated AMI version is:
Amazon Linux 2012.03
Could you please verify your AMI version? Maybe you are using an old custom one?
EDIT
Also in this link, it says there is a document root configuration in the AWS EB PHP console:
To access the configuration options for your PHP environment
1) Open the Elastic Beanstalk console.
2) Navigate to the management console for your environment.
3) Choose Configuration.
4) In the Software Configuration section, choose Edit.
PHP Settings
Document root – The folder that contains your site's default page. If
your welcome page is not at the root of your source bundle, specify
the folder that contains it relative to the root path. For example,
/public if the welcome page is in a folder named public.
Maybe you can configure it from the dashboard?

Elasticbeanstalk with Docker

When I try to create new environment using docker container shows the error message, using eb create or from aws console, yes, if I just try to create an environment from web console the same messages appears.
Unknown or duplicate parameter: WSGIPath
I've followed this tutorial http://victorlin.me/posts/2014/11/26/running-docker-with-aws-elastic-beanstalk
whats's wrong?
is it a bug?
The issue was solved, there was a folder called .ebextensions in project root, just remove it and the deploy worked!

AWS Elastic Beanstalk - ERROR: No Application Version named 'v0_9_2-76-gf5a4' found

I'm trying to deploy my code to AWS Beanstalk and get this error. I researched that it could be that the number of versions is more than 500, so I deleted a lot of versions. But, I still get this error.
eb deploy
ERROR: No Application Version named 'v0_9_2-76-gf5a4' found.
I also tried
git aws.push
Error: Failed to create the AWS Elastic Beanstalk application version
Edit:
Trying with eb deploy --debug I now get:
Instance: i-2ad238d5 Module: AWSEBAutoScalingGroup ConfigSet: null Command failed on instance. Return code: 1 Output: Error occurred during build: Command hooks failed . Script /opt/elasticbeanstalk/hooks/appdeploy/pre/10_bundle_install.sh failed with returncode 18
ebcli.objects.exceptions.ServiceError: Update environment operation is
complete, but with errors. For more information, see troubleshooting
documentation.
Did you update the file .elasticbeanstalk/config.yml ? It may have a wrong setup.
Make a backup of .elasticbeanstalk/ folder and remove it
Execute eb create
Select the same region you deployed it before. You can check the region on .elasticbeanstalk/config.yml backup
A list with the environments will appear, select the right one
Deploy now
Remove the .elasticbeanstalk/config.yml backup
Check for the .elasticbeanstalk/config.yml file
environment: CORRECT_ENV_NAME
global:
application_name: CORRECT_APP_NAME
In my case, I was doing eb deploy X where X was an environment for a different project.
When I had the error
InvalidParameterValueError: No Application Version named 'app-9f5c-180927_071528' found.
I fixed this by specifying the label I wanted to push up.
eb deploy XXX-env -l XXX.0.0.1
The -l flag is documented AWS EB Deploy Docs
most likely, the deploy is trying an incorrect Elasticbeanstalk Application. it could be because you renamed the application in the AWS console.
so double check you're pointing to the correct elasticbeanstalk Environment and Application. it could be picking out default values from your .elasticbeanstalk/config.yml file.