FAQ Database Discussion Community


Amazon web services phpmyadmin: The mbstring extension is missing

php,mysql,amazon-web-services,amazon-ec2,phpmyadmin
I have installed phpMyAdmin on the hand of this tutorial: https://gist.github.com/suvozit/8998731 and connected my RDS instance as host in the /var/www/html/phpmyadmin/config.inc.php file. Now I got the following error when I visit example.com/phpmyadmin/index.php: The mbstring extension is missing. Please check your PHP configuration. So I searched the internet for this error...

Windows EC2 initial config from AMI after autoscale boot up

amazon-web-services,amazon-ec2,autoscaling
I'm looking at autoscaling an off-the-shelf Amazon provided Windows AMI (as opposed to a custom one). After a new instance gets booted (and before!! it gets added to load balancer), I want some initialization tasks injected and ran on the new instance (say, running a powershell script). Secondly, the loadbalancer...

Failed to Create preset with Amazon Elastic Transcoder

amazon-web-services,amazon-ec2,amazon-s3,amazon,boto
I am using Amazon Elastic transcoder and boto library to create a preset. This code works for me without any problem: preset1=transcode.create_preset('preset', 'preset', 'mp4', {"Codec":"H.264", "CodecOptions":{"Profile":"baseline", "Level":"3", "MaxReferenceFrames":"3"}, "KeyframesMaxDist":"200", "FixedGOP":"false", "BitRate":"600", "FrameRate":"10", "Resolution":"640x480", "AspectRatio":"4:3" }, {"Codec":"AAC","CodecOptions":{"Profile":"AAC-LC"}, "SampleRate":"22050", "BitRate":"32", "Channels":"1" }, {"Format":"png",...

Using Java web service on Amazon cloud

java,web-services,amazon-web-services,amazon-ec2
I want to make a web service in java which will take arguments and do processing and return a json response. I am not been able to figure out how to deploy this service on amazon ie (on ec2 or some where else) . what will be the url to...

SSHFS MacOs Read Only Issue

osx,amazon-ec2,fuse,sshfs
I've mounted an EC2 instance to my Mac using SSHFS and FUSE. The command I'm using to mount is: sshfs [email protected]_ADDRESS:/ ~/ec2Server/ It works fine, and I get the FUSE drive and I can see all the files. However, it's read only. How can I give myself read and write...

How can I access properties of the IpPermissions property of Get-EC2SecurityGroup?

powershell,amazon-web-services,amazon-ec2,aws-powershell
I am trying to get a list of security groups. (Successful - Using Get-EC2SecurityGroup) Get a list of the specific IPPermissions associated with each security group. ( Successful - Using (Get-EC2SecurityGroup).IpPermissions ) Only return results where the FromPort = "xxx" ( Unsuccessful - Not sure how to access the...

AWS EC2 Container Service / Elastic Beanstalk Docker Container Port udp binding

amazon-web-services,amazon-ec2,docker,elastic-beanstalk,ec2-container-service
According to the documentation of ECS task definitions, this is how we define port mappings. "portMappings": [ { "containerPort": integer, "hostPort": integer } ... ] By default this is binding port over tcp. How to achieve udp port bindings to docker containers running in AWS Elastic Beanstalk (Multi-container) or with...

Trouble setting up a Loopback production host on AWS EC2

amazon-web-services,amazon-ec2,permissions,loopbackjs,strongloop
I'm having trouble setting up a StrongLoop LoopBack production host on AWS EC2. I'm following these directions. This is what I tried. I created an EC2 server that's a Ubuntu Server 14.04 LTS. Then I: $ ssh -i ~/mykey.pem [email protected][ec2-ip-address] $ sudo apt-get update $ sudo apt-get install build-essential $...

Remove a rule from AWS EC2 Security group using Ansible

amazon-web-services,amazon-ec2,ansible,ansible-playbook
I have an Ansible script to create EC2 security group. It looks like this: - name: Create HTTP Security Group local_action: module: ec2_group region: "{{ region }}" vpc_id: "{{ vpc }}" name: sg_http description: Security group for HTTP access rules: - proto: tcp from_port: 80 to_port: 80 cidr_ip: 0.0.0.0/0 register:...

Amazon DynamoDB table w/ Elastic Beanstalk not setting up correct parameters

java,amazon-web-services,amazon-ec2,amazon-dynamodb
I have an example Dynamodb project from Amazon that when uploaded to an instance of Elastic Beanstalk environment, generates a Dynamodb table. Howevever, after generating the table is missing a few parameters. Here is the code to the Elastic Beanstalk instance: /* * Copyright 2010-2013 Amazon.com, Inc. or its affiliates....

AMI for EC2 instance with a MongoDB?

mongodb,amazon-ec2
I am running an Amazon EC2 instance with a MongoDB running on it. Since I will need to use it only for some time, I was wondering if it is possible to keep only image of the system for the usage time with Amazon Machine Image. Any idea?

Who created an Amazon EC2 instance using Boto and Python?

python,amazon-web-services,amazon-ec2,boto,amazon-cloudtrail
I want to know who created a particular instance. I am using Cloud Trail to find out the statistics, but I am not able to get a particular statistics of who created that instance. I am using Python and Boto3 for finding out the details. I am using this code-...

Using the AWS SDK during a chef run errors but running it outside of chef works

ruby,ssl,amazon-ec2,chef,aws-sdk
I have a helper library that AWS-SDK to pull information so it can return a list of names like so: def get_load_balancer_names self.elb_client.describe_load_balancers[:load_balancer_descriptions].map { |elb| elb[:load_balancer_name] } end when this code is run during the chef run I get this error: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate...

Cloud watch custom metrics creation with C# (.net) possible or not?

amazon-web-services,amazon-ec2,amazon-cloudwatch,cloudwatch
Is it possible to create AWS CloudWatch custom metrics using .net SDK provided by AWS. The developer guide talks about publishing custom metrics through Command line tools. Is it possible by the .net SDK. if yes, please provide the links or tutorials for that..

Ruby aws-sk: undefined method

ruby,amazon-ec2,aws-sdk
Trying to get ruby working with the ruby AWS sdk, but keep getting the following error: aws.rb:10:in <main>': undefined methodinstances' for # (NoMethodError) From other postings on StackOverflow, v2 of the aws-sdk changed from AWS to Aws. I also tried Aws::EC2.new require 'aws-sdk' ec2 = Aws::EC2::Client.new( access_key_id: 'mudd', secret_access_key: 'butt',...

Reverting DEIS in AWS

amazon-web-services,amazon-ec2,deis
I am trying to setup DEIS in AWS. So I am in the process of learning and it is expected that I will have to provision and setup many times before I master things. Let's say I run provision-ec2-cluster and for some reason, I want to revert everything that was...

pom file java version spec for Maven

linux,java,amazon-ec2,compilation,maven
I am a new user to Maven, as I am trying to use it to build apache spark on amazon EC2 VMs. I have mannually installed java version 1.7.0 on the VMs. However as I was running the Maven, the following error occurs: Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.2.0:testCompile (scala-test-compile-first) on...

How to export database from Amazon RDS MySQL instance to local instance?

mysql,amazon-web-services,amazon-ec2,export,amazon-rds
AWS documentation has this page that talks about importing and exporting data from MySQL server, but it's mostly about import. The only thing I see in their documentation is a way to export 5.6 data using replication, which is documented here. I was wondering if there is a simpler way...

Docker hiding IP of calling container [closed]

amazon-ec2,go,docker,iptables,coreos
Disclaimer: I am a networking newbie. Forgive me if I don't use proper vocabulary to describe my problem. Context: So I have a couple of app containers (Docker) that are to run on CoreOS. Each container must have different IAM roles. Since there will be potentially be N containers with...

Map multiple domains to subfolders in EC2

amazon-web-services,amazon-ec2,dns,subdomain
I have an ec2 instance running a LAMP stack. I plan on hosting some client mockups, static sites, etc. what i want to achieve is havethe sites in /var/www/sites/site1, /var/www/sites/site2 and so on. then mapping a url to each so it will end up like example.com mapping to /var/www/sites/site1. How...

MongoDB on Amazon EC2 - Configuring Mongo Client for Php

php,mongodb,yii,amazon-ec2,yii2
I am pretty new to Amazon EC2. I followed the instructions given in mongodb official site for installing mongodb on Amazon Linux. I have a Yii-2(basic) project to host on my amazon Linux server. mongoDB is already installed in the and even I Imported some dumps over there. But when...

How to set a variable using dynamic inventory using Ansible

amazon-web-services,amazon-ec2,ansible,ansible-playbook,rds
I am looking for method to set a variable in ansible playbook using inventory information received from dynamic inventory. For example if we have a sample playbook like --- - hosts: localhost connection: local tasks: - set_fact: rds_hostname="{{ rds_mysql }}" #set rds endpoint from ec2.py - debug: var=rds_hostname I am...

View EC2 Instance Server Files in AWS Console

amazon-web-services,ssh,amazon-ec2
Is it possible to browse server files (.php, etc.) inside the AWS Console (in the browser) and not via a SSH or FTP client? For example; view files just like in CPanel on a regular web host. I am working on a EC2 instance of a Debian OS that was...

Maximum bid price for an AWS EC2 spot instance?

amazon-web-services,amazon-ec2
What is the maximum bid price for an AWS EC2 spot instance of a given instance type (Eg:m2.xlarge, m3.medium etc) ? Where can I find that out?

Spring war file deployed on ec2 showing hibernate persistence failure connecting to rds

mysql,hibernate,amazon-ec2,tomcat7,rds
Our company has an app that has been hosted on media temple, we since are moving to amazon ec2. I've been through all tutorials, and got apache, php, mysql, java, and tomcat7 running just fine. Also, I have been able to connect to the rds instance with mysql workbench. However,...

access tomcat deployed application (aws) by domain name (www.mydomain.com)

tomcat,amazon-ec2,dns,ip
I am new to aws hosting, please help me out in pointing the domain name to tomcat hosted application. During configuration following steps are taken- 1- I have created ec2 ubuntu instance. Configured with java, tomcat. Deployed my war files on tomcat. I am able to access the application successfully....

AWS S3 utilizing for website static images

php,amazon-web-services,amazon-ec2,amazon-s3
We currently are moving our website to EC2 utilizing OpsWorks. Right now we reference all media files for the site with relative URL's in the coding... "/images/image1.jpg" and so on. Is there a way to alias the /images directory in our coding to utilize an S3 bucket? What we'd like...

s3cmd put failing with access denied

amazon-ec2,amazon-s3
I am trying to copy some files from my EC2 instance to S3 and using the following command s3cmd put datafile s3://mybucket/datafile and get the following error ERROR: S3 error: Access Denied I have the following IAM policy { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "ec2:*", "s3:ListAllMyBuckets",...

Is there a way to STOP not TERMINATE instances using auto-scaling in AWS?

amazon-web-services,amazon-ec2
I am looking at using AWS auto-scaling to scale my infrastructure up and down based on various performance metrics (CPU, etc.). I understand how to set this up; however, I don't like that instances are terminated rather than stopped when it is scaled down. This means that when I scale...

Timeout when submitting jobs to EC2 cluster

java,amazon-ec2,apache-spark
I've been trying to make this work with no luck thus far. I launch a cluster with ./spark-ec2 -k keyname -i ~/.keys/key.pem --region=us-east-1 -s 5 launch "my test cluster" Then I submit a job with bin/spark-submit --verbose --class com.company.jobs.AggregateCostDataWorkflow --master spark://ec2-54-157-122-49.compute-1.amazonaws.com:7077 --deploy-mode cluster --conf spark.executor.memory=5g /Users/my.name/scala-proj/target/scala-2.10/scala-proj-0.1.0.jar --outputPath,s3n://my-bucket/my-name/ec2-spark-test/ Where outPutPath is...

Missing Perl dependencies not actually missing

perl,amazon-web-services,amazon-ec2,otrs
I'm trying to install OTRS Help Desk on an EC2 instance of Amazon Web Services. I'm following the installation instructions here. But when I try to install otrs, I get the following errors: Error: Package: otrs-4.0.8-02.noarch (/otrs-4.0.8-02.noarch) Requires: perl(Archive::Zip) Error: Package: otrs-4.0.8-02.noarch (/otrs-4.0.8-02.noarch) Requires: perl(Template) You could try using --skip-broken...

AWS - t2.micro instance EBS Volume size

amazon-web-services,amazon-ec2
I was trying to create t2.micro instance via AWS console. I hope its free for one year, but it does not come with any instance storage. So i wanted to add EBS Volume in this instance? is it free? What is the maximum EBS volume i can add in t2.micro...

How can I know the database url of AWS EC2 MySQL?

mysql,amazon-web-services,amazon-ec2
I would like to import gtfs files into mysql by using a tool from github, runing the follwoing command: gtfsdb-load --database_url <db url> <gtfs file | url> How can I get the database_url of mysql located in AWS EC2?...

AWS EC2 scp from private subnet instance to bastion

amazon-ec2
I am using a jump server (bastion) to connect to a private ec2 instance. The connection is successful, however I am not able to scp a jar file from private ec2 instance to the jump server location. Command: [[email protected] ~]$ scp x.jar [email protected] .XX.XX5:/home/user Result: I get "ssh: connect to...

AWS CloudWatch — Signature Expired

amazon-web-services,amazon-ec2
I'm setting up CloudWatch for several of my EC2 instances, using AWS custom CloudWatch metrics. Everything is going fine, except one of my instances gives me the below error: [email protected]:~$ /etc/aws-scripts-mon/mon-put-instance-data.pl --mem-util --disk-space-util --disk-path=/ --aws-credential-file=/etc/aws-scripts-mon/awscreds.template ERROR: Failed to call CloudWatch: HTTP 400. Message: Signature expired: 20150515T204709Z is now earlier than...

Move files from EC2 to S3 and then delete from EC2

amazon-web-services,amazon-ec2,amazon-s3,aws-php-sdk
I'm migrating files from one remote server to S3. There are about 10k files (all accessible via http URLs from the remote server). The total size is about 300GB (no individual file is more than 1GB). I'm trying to figure out the most efficient way to make this migration. So...

Multithreading in Ruby in EC2 causing weird behavior

ruby-on-rails,ruby,multithreading,amazon-web-services,amazon-ec2
I have the following code that I run in a rake task in rails: 10.times do |i| Thread.new do puts "#{i}" end end When I run this locally, I get the following: 0 3 5 1 7 8 2 4 9 6 (with new lines) However, when I run the...

Spring Boot War file gets 404 on ec2

tomcat,amazon-ec2,spring-boot,.war
I put together a simple Eclipse Spring Boot Rest program. Just a couple of endpoints that return some stings. I am building it with the Eclipse Gradle plug-in. No problems, it runs fine in the Eclipse provided Tomcat instance. I also ran it on a native windows Tomcat. I deployed...

Rails scheduled task behind a load balancer

ruby-on-rails,amazon-ec2,cron,whenever,whenever-capistrano
I was wondering how to properly schedule a task for a rails application that sits behind an elastic load balancer. This task is an automated weekly email that is to be sent out every Monday from the application. We currently have multiple EC2 instances that sit behind a LB. I...

Deploying a Java web application to Amazon

java,mysql,amazon-web-services,amazon-ec2,elastic-beanstalk
I am sure this question has been asked and answered before multiple times. But unfortunately, I am still not clear. Here is my issue. I have a JSP, Servlet application which uses MySQL as the database. I have built the WAR file as well. Now I am in need of...

Loop through list of AWS-instances shows only first item

ruby-on-rails,amazon-web-services,amazon-ec2,each,aws-sdk
I am working on a simple customer frontend for AWS. I want a list of all the users machines for start/stopping the EC2s. While the logic works I can only show the first of the machines in my view. I guess it's related to the AWS APIs pageable response format,...

Running Python RESTful API on Amazon EC2

python,rest,amazon-ec2
I have a working RESTful API written in python which works well in my local machine. Now I am having some serious trouble getting started with Amazon EC2. I have managed to create an account and managed to create an instance , and lauch the instance as well. I have...

How to actually deploy to a serious host?

amazon-web-services,deployment,meteor,amazon-ec2,elastic-beanstalk
It's so undescribably discouraging and frustrating that deploying is such a pain. There are no step-by-step guides and every information source is outdated. I have NO idea where to begin! I want to deploy Meteor apps to AWS (EC2 or Elastic Beanstalk) but now I've learned that it doesn't support...

Cloud Init Fails to Install Packages on CentOS 7 in EC2

amazon-ec2,centos7,cloud-init
I have a cloud config file defined on my EC2 instance in the user data. Many of the parts/actions are run by the server properly, but package installation seems to fail invariably: #cloud-config package-update: true package-upgrade: true # ... packages: - puppet3 - lvm2 - btrfs-progs # ... I see...

How to find Unused Security Groups of all AWS Security Groups?

python-2.7,amazon-web-services,amazon-ec2,amazon-s3,boto
How to find all the used security groups attached with all the aws resources using Boto? Currently the following script which is giving only ec2 instances- sec_grps = ec2_conn.get_all_security_groups() for group in sec_grps: print group, " Instances attached ", group.instances() Is there any way to get all security groups which...

copy key pair to amazon

amazon-web-services,ssh,amazon-ec2,ubuntu-server
I have run into trouble I have ec2 instance. I connected to it via ssh. I wanted to set up POST hook for git. And accidentally removed authorised_keys from /.ssh directory My question is : if I am still connected to my aws instance can I copy myKey.pem to /.ssh...

Deploy vaadin 7 war file in EC2

amazon-ec2,tomcat7,vaadin,war,vaadin7
I'm trying to deploy a Vaadin 7 example.war file in tomcat 7, using an EC2 server. I upload the file to /var/lib/tomcat7/webapps but then when I go to myIp:8080/example it doesn't find the resource. Any idea why? Thanks!...

How do I SSH into EC2 with .pub?

amazon-web-services,ssh,amazon-ec2
When I create a new Elastic Beanstalk environment it asked me if wanted to create a new keypair. I say yes, and it created two file in my .ssh folder locally called app and app.pub. Normally to ssh into an instance I use a app.pem file. i.e ssh -i app.pem...

Data access Spark EC2

scala,amazon-ec2,apache-spark
After following instruction to install cluster via ec2 script, i'm not able to correctly launch my .jar because they don't find the data file which i put on /root/persistent-hdfs/ on the master and slave nodes. I read on an other post that i need to prefix the file location with...

SSH aws ec2 elastic beanstalk without keypair

ssh,amazon-ec2,elastic-beanstalk
I have a running instance that was created without a keypair, as I understand is not possible to apply a keypair to a running instance, I need to ssh connect to the instance to get some logs, how can I do that? Right click on the instance -> Connect, shows...

How to transfer files from iPhone to EC2 instance or EBS?

ios,iphone,amazon-ec2,amazon-s3,amazon-ebs
I am trying to create an iOS app, which will transfer the files from an iPhone to a server, process them there, and return the result to the app instantly. I have noticed that AWS offers an SDK to transfer files from iOS app to S3, but not to EC2...

Run Kubernetes on EC2

ssh,amazon-ec2,coreos,kubernetes
I am trying to run kubernetes on EC2 and I used CoreOs alpha channel ami.I configured Kubectl ssh tunnel for the communication between Kubectl client and Kubernets API. But when I try kubectl api-versions command, I am getting following error. Couldn't get available api versions from server: Get http://MyIP:8080/api: dial...

EC2ResponseError: 401 Unauthorized using Saltstack boto_vpc module

amazon-web-services,amazon-ec2,boto,salt-stack,amazon-vpc
I'm trying to create a vpc using Saltstack and boto_vpc module. This is my state: vpc_create: module.run: - name: boto_vpc.create - cidr_block: '10.0.0.0/24' - vpc_name: 'myVpc' - region: 'us-east-1' - key: 'ADJJDNEJFJGNFKFKFKIW' - keyid: 'SJDJNFNEJUWLLLCLCLENNRBFLGSLSLKEMFUHE' The keys that I'm using are correct but I got this error: [INFO ] Running...

What happens with data when I stop EBS backed instances

amazon-web-services,amazon-ec2,amazon-ebs
What happens with data in Ephemeral storage when I stop EBS backed instances? AWS makes a snapshot and store it in EBS - not losing data AWS makes a snapshot and store it in S3 - not losing data AWS makes a snapshot and store it in EBS - losing...

How to automatically deregister EC2 instance from AWS ELB on termination?

amazon-web-services,amazon-ec2
If an EC2 instance is a member of an AWS Elastic Load Balancer (ELB), terminating this EC2 instance won't remove it from the ELB. It will be marked as N/A, and out of service. Our monitoring system then notify us of unhealthy instances in the ELB. Our current solution is a boto...

Unable to ssh with user created under Plesk (Amazon Ec2)

linux,ubuntu,amazon-ec2,plesk
I've manually installed Plesk under ubuntu instance (EC2), and created a system user using Plesk, so When I try to SSH with that user I get: Permission denied (publickey). I have a pem key that I use to ssh with ubuntu user. My main goal is to have a git...

Timeout using SSTableloader for Cassandra Aws Instance

amazon-ec2,cassandra
I'm trying to use sstableloader to load SSTable (.db) files into a Cassandra Cluster running on an AWS EC2 instance. This error occurrs: Established connection to initial hosts Opening sstables and calculating sections to stream Streaming relevant part of C:\Users\SNCUser\dataquest\CassandraLoader\WrDir\beed5b97-0b52-45d7-be5d-fbbac00ac607\device_data\blob\device_data-blob-ka-1-Data.db to [/172.*.*.*] ERROR 16:08:36 [Stream #1114a0d0-1054-11e5-9ccc-65ee5fdd8902] Streaming error occurred java.net.ConnectException:...

Except homepage, the requested URL was not found on this server (AWS EC2 wordpress)

wordpress,amazon-web-services,amazon-ec2,apache2
I host two wordpress on AWS EC2 (say site1 and site2). The site1 works perfectly, but the site2 can only access the homepage, for other pages, encountering the following error: Not Found The requested URL /just-for-test/ was not found on this server. Apache/2.4.7 (Ubuntu) Server at site2.com Port 80 Both...

Ansible conditional with pattern match using variables

amazon-ec2,ansible,ansible-playbook
I am using Ansible roles to provision AWS EC2 instances, I have created a series of task in ec2 roles which gets execute for each server. - name: Provisioning EC2 instance ec2: region: "{{ region }}" key_name: "{{ key }}" instance_type: "{{ instance_type }}" image: "{{ ami }}" wait: yes...

WebSocket connection failed: WebSocket opening handshake was canceled

javascript,amazon-web-services,amazon-ec2,websocket
I have recently setup an EC2 instance (in a VPC with no load balancer) and admittedly the configuration is a bit odd, but it is what is required for the web application we're running. The web server (in Haskell) is running on port 4433 (standard ports are reserved for an...

Do I need to create a endpoint to use Elastic Load Balancer on my VPC?

amazon-web-services,amazon-ec2,amazon-elb,amazon-vpc,vpc
I'm creating a VPC to host a web app at AWS, and I want to use load balancers. Do I need to create a endpoint for elb like I have to s3?

AWS CloudFormation: How to get subnet list from VPC?

amazon-web-services,amazon-ec2,subnet,amazon-cloudformation,amazon-elasticache
In CloudFormation, I'm creating a VPC, two EC2 instances, and an Elasticache in front of them. In the template, I'm trying to add the elasticache to the vpc. The problem's happening in creating the AWS::Elasticache::SubnetGroup "CacheSubnetGroup" : { "Type" : "AWS::ElastiCache::SubnetGroup", "Properties" : { "Description" : "Subnets available for the...

How can I access Mule ESB Community edition via browser?

amazon-web-services,amazon-ec2,mule,mule-component
I am trying to access it via browser, I had no issue with EE but CE is proving difficult. On Putty I have it saying: Mule is already running. And when I go to http://ec2----.us-west-2.compute.amazonaws.com:8585/ it won't load properly. I do have the port 8585 open for inbound traffic as...

Django on Amazon Web Service (AWS)

python,django,amazon-web-services,amazon-ec2,amazon-elastic-beanstalk
I have read these tutorials : https://realpython.com/blog/python/deploying-a-django-app-to-aws-elastic-beanstalk/ and http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html I use Django 1.8.2 and it seems that the amazon's doc is a little bit outdated (they still used django-admin.py instead of django-admin), and some parts of it are not working (when stuff does not work, i fallback to the realpython...

AWS EC2: Migrating from Windows to Linux Server

linux,windows,amazon-web-services,amazon-ec2,server
I am currently using Amazon Web Services EC2 Windows 2012 instance for my application. I want to migrate over to an EC2 Linux server. What's the best way do this? I have been unable to find sufficient resources on this topic. We are currently using Hibernate and Spring frameworks with...

How to automate Amazon aws EC2 for scraping

amazon-web-services,amazon-ec2
Hi I'd like to set up some amazon EC2 instances (multiple) to scrape data from arbitrary sites. The way I imagine it being set up is one amazon instance that's a master which will programatically set up other instances to scrape. Right now I have php scripts that can scrape...

Is there a way to cluster different machines running Tomcat instances

tomcat,amazon-ec2
I have setup multiple tomcat instances in a single machine to launch more threads, however, if I have to make use of 10 EC2 instances with Tomcat installed as a cluster, how would I achieve this. Any good resources to look at?

AWS RDS on Eclipse

eclipse,amazon-web-services,amazon-ec2,amazon-rds
I know this question seems a repeat, but it's not and I have tried all the solutions I could find PROBLEM: I am running an AWS RDS instance for the database. It works fine when I connect to it using AWS EC2 instance(uses linux) but when I try it with...

AWS Launch Configuration not picking up user data

amazon-ec2,autoscaling
We are trying to build an an autoscaling group(lets say AS) configured with an elastic load balancer(lets say ELB) in AWS. The autoscaling group itself is configured with a launch configuration(lets say LC). As far as I could understand from the AWS documentation, pasting a script, as-is, in the user...

aws elastic beanstalk “Request-URI Too Long”

apache,amazon-web-services,amazon-ec2,elastic-beanstalk
I have a setup running a python flask app on elastic beanstalk. My Issue is that I'm getting this 414 error code. I have added LimitRequestLine 200000 to httpd.conf, and restarting with sudo httpd service restart on the shell of the ec2 instance, but it seems to not do the...

EC2 Instance without any attached Volume?

python,amazon-web-services,amazon-ec2,boto,aws-ec2
Is it Possible to have instances without any volume(root-device or attached volume)? Lets say the instance_ids are [i-120cd3fe,i-23e46634] Is it possible that any Instances are present without any attached volume in AWS? conn=get_ec2_connection(region=region) instances = conn.get_only_instances(instance_ids=instance_ids) volumes_list=[] for instance in instances: dev_mappings = instance.block_device_mapping for block_device in dev_mappings.keys(): volume_id =...

how to fix stream_socket_enable_crypto(): SSL operation failed with code 1

laravel-4,amazon-ec2,ssl-certificate,apache2.4,php-5.6
stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed Im using Laravel 4.2 PHP 5.6 Apache 2.4 I have GoDaddy SSL installed in Amazon ec2 Linux. SSL working fine when i visit the site with https. The error happened when I call my function :...

Amazon EC2 Storage lacks

amazon-web-services,amazon-ec2
I have launched Amazon EC2 instance of "m3.large" type. According to this page, m3.large should have 2vCPUs, 7.5GiB Memory and 1x32GB SSD Storage. But df -ah returns following results. It seems that the instance lacks the volume. Filesystem Size Used Avail Use% Mounted on /dev/xvda1 7.9G 797M 6.7G 11% /...

Ansible - find the maximum value of a hostvar and the name of that host [closed]

amazon-ec2,ansible
I have an inventory with a hostvar that increases: [nodes] node_0 id=0 node_1 id=1 I want to find the highest value of id and host that has it. I found another answer for doing the search on nodes with a for loop (Ansible - Find max value and run action...

Determine Deployment Group from appspec.yml

bash,amazon-web-services,amazon-ec2,aws-code-deploy
I am using the elb scripts from https://github.com/awslabs/aws-codedeploy-samples/tree/master/load-balancing/elb to remove my ec2 instances from the load balancer before I do my code updates. I need to define the load balancer in the ELB_LIST variable of the common_functions.sh bash script. This load balancer will be different for each environment (or deployment...

SQLite3 Unable to write to database file on Amazon AWS but only in certain instances

php,amazon-ec2,sqlite3,ubuntu-14.04
I have setup and EC2 instance on AWS and as part of this instance I am using a SQLite3 database to handle certain data. All of the database operations are routed through a single PHP file, with a single connection: function dataQuery($query) { // establish database connection try { $dbh...

EC2 can't access S3 file

django,amazon-ec2,amazon-s3,access-denied
I have a very strange error on my website. I keep getting this Django error: Attempted access to 'http:/***.s3.amazonaws.com/media/banderas/Cambodia-flag.png' denied. But when I access that file directly from my admin panel, it works fine. It fails only when the main page wants to access that file. Any ideas what can...

EC2 root volume expansion for CentOS7

linux,amazon-web-services,amazon-ec2,centos,centos7
My EC2 is running with CentOS 7 HVM community image which comes default as xfs file system, and I had a root volume with 10GB which I extended to 15GB after detaching > creating snap > reattaching to /dev/sda1 but I noticed that I did not had to run any...

Error when i try to install npm with putty

amazon-ec2,npm,install,runtime-error
here is what i get when i try to execute this command (the 3rd command - in ec2 amazon) The next step is to install NPM(Node package manager). Type the following commands: 1. git clone https://github.com/isaacs/npm.git 2. cd npm **3. sudo make install** and here is the error i get:...

why does my domain name immediately switch to showing its ip address once page loads?

amazon-ec2,apache2
I just registered a new domain name and set it to point to an AWS EC2 instance. When I enter the domain name, it loads fine, but then as soon as the page loads, the browser address text is updated to show the ip address (replaces the domain name). I...

Microservices and cloud resource limitations

amazon-web-services,amazon-ec2,spring-cloud,microservices,amazon-elastic-beanstalk
I am at the beginning of a large migration from a single monolithic web service to a collection of microservices using Spring Cloud/Spring Cloud Netflix. Through my research of microservices I understand that the lines of demarcation between services should mirror the separations of concerns between them. An additional factor...

AWS Elastic Beanstalk Post Deploy Script

ruby-on-rails,amazon-web-services,amazon-ec2,elastic-beanstalk
I'm attempting to add a post deployment script to my Elastic Beanstalk. I've read a few blog posts (read the references) that reference adding a config file to the .elasticbeanstalk directory. The config file is supposed to create a shell script and copy it to the directory: /opt/elasticbeanstalk/hooks/appdeploy/post In my...

How to run Django in development on EC2 so that it is accessible to the internet?

django,amazon-ec2
I have Django app. It's running on an EC2. The EC2 has a private IP address and an elastic public IP address. I want the web app to be available locally as well as Developer's IP address which is outside the network. Let's define these three IP addresses as: EC2_PRIVATE_IP...

Installing latest version of vsftpd on an ec2-linux AMI

linux,amazon-ec2,ftp
I installed vsftpd on my Amazon ec2-linux AMI using sudo yum install vsftpd. However, it installs version 2.2.2. How do I install version 3.0.2? I downloaded the tar file from https://security.appspot.com/vsftpd.html, extracted it, and followed the instruction from the INSTALL file. However, when I try to run the "make" command,...

Enabling SSL on an AWS EC2 instance

apache,ssl,amazon-web-services,amazon-ec2
On an EC2 instance that services multiple domains via Virtual Hosts, I have set up a Load Balancer that forwards HTTPS traffic from port :443 to :8443 for one of the domains, in part following this example: http://elwoodicious.com/2009/12/23/using-elb-to-serve-multiple-domains-over-ssl-on-ec2-for-giggles/ My working httpd.conf Virtual Hosts look like this: NameVirtualHost *:80 <VirtualHost *:80>...

Can't access Ganglia on EC2 Spark cluster

amazon-ec2,apache-spark,ganglia
Launching using spark-ec2 script results in: Setting up ganglia RSYNC'ing /etc/ganglia to slaves... <...> Shutting down GANGLIA gmond: [FAILED] Starting GANGLIA gmond: [ OK ] Shutting down GANGLIA gmond: [FAILED] Starting GANGLIA gmond: [ OK ] Connection to <...> closed. <...> Stopping httpd: [FAILED] Starting httpd: httpd: Syntax error on...

Setup GoDaddy SSL in Amazon ec2

linux,apache,ssl,amazon-web-services,amazon-ec2
Apache Version Apache/2.4.12 (Amazon) OpenSSL/1.0.1k-fips PHP/5.6.8 I have Elastic IP Amazon ec2-user Linux, Free tier. I have Godaddy SSL. I have Godaddy Domain (kenn.com) Pointing to Amazon Route 53 Host Zone I tried to open the website it works perfectly. No issues in pointing. I already have this files: I...

Django Celery cannot connect to remote RabbitMQ on EC2

django,amazon-ec2,rabbitmq,celery
I created a rabbitmq cluster on two instances on EC2. My django app uses celery for async tasks which in turn uses RabbitMQ for message queue. Whenever I start celery with the command: python manage.py celery worker --loglevel=INFO OR python manage.py celeryd --loglevel=INFO I keep getting following error message related...

How to route traffic by proximity from Route 53 to closest NGINX server?

amazon-web-services,amazon-ec2,amazon-s3,cloudflare
I'm trying to set up a web server stack in the following way: Use Route 53 for my DNS Serve static content with Cloudflare from S3 buckets Route API calls to nearest NGINX server that sits in front of some Nodejs servers. So all static content is done easily enough...

AWS CLI for EBS snapshots

amazon-web-services,amazon-ec2,aws-cli
I am trying to get AWS CLI going to backup my EC2 instances. I can't see why AWS don't make it easy to schedule this via the console but they don't so I am pushing ahead with CLI. I installed on one of my instances. Problem 1, it won't work...

Why not to run Node.js and Neo4j on one Amazon EC2 instance

linux,node.js,amazon-web-services,amazon-ec2,neo4j
I'm about to set up a server architecture on Amazon. I'm not familiar with best practices and pretty much learn as I go. My boss told me to launch an Amazon EC2 instance with Node.js and Neo4j (Graph-Database) running on one and the same instance. Both should use different numbers...

AWS ELB Server certificate trust

amazon-web-services,amazon-ec2,ssl-certificate
Background: I have an IIS application running behind a AWS ELB. The SSL certificate is presented by the server and not the ELB [TCP pass threw]. Question: Does the ELB have to trust the Certificate presented by IIS?...

Can't remote into a spawned EC2 instance

amazon-web-services,amazon-ec2
I am not able to remote desktop into a T2.micro instance that I spawned from the AWS Java API. Here is what I did: Created an instance using the Amazon console Successfully remoted into it Created an AMI of the instance Wrote a Java program to runInstance using the same...

Can't see my EC2 instances on the management console?

amazon-web-services,amazon-ec2
I'm a beginner to AWS and servers in general I logged into AWS on laptop 1 and set up an EC2 instance. Next day I logged into AWS console on laptop 2, then the instance was gone. So I set up another EC2 instance to play with. Then logging into...

SQS: Publish a message when an EC2 instance starts?

amazon-web-services,amazon-ec2,amazon-sqs
Is there a way to automatically publish a message on SQS when an EC2 instance starts? For example, could you use Cloudwatch to set an alarm that fires whenever an instance starts up? All the alarms on Cloudwatch appear to be related to a specific EC2 instance, rather than the...

AWS public subnet vs Assigning elastic IP address to an instance of a VPC

amazon-web-services,amazon-ec2,subnet,amazon-vpc,elastic-ip
What is difference between two terminologies, having a public subnet vs assigning elastic IP address to an instance of VPC over AWS ?

Is it possible to enable CloudWatch on a running EC2 instance?

amazon-web-services,amazon-ec2,amazon-cloudwatch,amazon-iam
It looks like Amazon has a ready-built IAM role to grant instances CloudWatch write access. ( A more restrictive one could also be created if necessary) But it appears you cannot attach an IAM role to a running instance. Am I missing something? Do I really have to re-instantiate my...

Cannot find created database from AWS EC2 Instance

mysql,wordpress,amazon-web-services,amazon-ec2
I followed this tutorial to install a Wordpress website on an Amazon EC2 instance successfully. After creating an EC2 instance and opening your terminal, the tutorial explains the following steps: Login by your elastic ip: ssh [email protected] -i pem-location Update server: sudo yum update Switch to super user: sudo su...

Amazon RDS MySQL tmpdir location

amazon-web-services,amazon-ec2,magento-1.7,rds
We are facing a strange problem. We are running a magento based store. In our admin, when we try to see orders, we are getting the error: SQLSTATE[HY000]: General error: 126 Incorrect key file for table '/rdsdbdata/tmp/#sql_20b_0.MYI'; try to repair it After lot of research, I found that tmp folder...

What is the best (and most cost effective way) to run automated server operations on a certain day or time by it self?

amazon-web-services,amazon-ec2,webserver,bigdata,analytics
I am using a load balancer (and server) to start other servers to run large database updates and analytics, etc. I am paying quite a bit for running servers. I assumed this enterprise solution would cost quite a bit but I think I might be doing things a little differently...