Menu
  • HOME
  • TAGS

SQS: Publish a message when an EC2 instance starts?

amazon-web-services,amazon-ec2,amazon-sqs

To better understand this question and offer a more accurate answer, further information is needed. Are we talking about: New instance created and started from any AMI ? New instance created and started from a specific AMI? Starting an existing AMI that is just in the stopped state? Or creating...

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

tomcat,amazon-ec2,dns,ip

I solved my problem with the help of above answer provide by noname and some google help. As I have unzipped tomcat so, did some env setup as followed- in server.xml changed port 8080 to 80 sudo apt-get authbind. touch /etc/authbind/byport/80. chmod 500 /etc/authbind/byport/80. created setenv.sh in /usr/local/tomcat/bin folder. did...

Failed to Create preset with Amazon Elastic Transcoder

amazon-web-services,amazon-ec2,amazon-s3,amazon,boto

You can write this using unpacking arg list feature in Python: preset_h264_480p_100kbs_mp4_command={ "name":"preset","description": "preset", "container":"mp4","video": {"Codec":"H.264", "CodecOptions":{"Profile":"baseline", "Level":"3", "MaxReferenceFrames":"3"}, "KeyframesMaxDist":"200", "FixedGOP":"false", "BitRate":"600", "FrameRate":"10", "Resolution":"640x480", "AspectRatio":"4:3" },"audio": {"Codec":"AAC","CodecOptions":{"Profile":"AAC-LC"}, "SampleRate":"22050", "BitRate":"32", "Channels":"1" }, "thumbnails":...

EC2 Instance without any attached Volume?

python,amazon-web-services,amazon-ec2,boto,aws-ec2

You can't have an instance without a root volume. So there will always be at least one volume listed in the block device mapping. I'm wrong about that. It has been so long since I launched an instance store backed AMI that I kind of forgot they even existed....

AWS Launch Configuration not picking up user data

amazon-ec2,autoscaling

The direction you are following is right. What is wrong is your user data script. Problem 1: What you have to remember is that user data will be executed as user root, not ubuntu. So if your script worked fine, you would find your file in /root/configure, NOT IN /home/ubuntu/configure....

Timeout using SSTableloader for Cassandra Aws Instance

amazon-ec2,cassandra

You'll need to open the server ports in your security group. Port 80 is not used for inter node communication. The full list is here: http://docs.datastax.com/en/cassandra/2.1/cassandra/security/secureFireWall_r.html

What happens with data when I stop EBS backed instances

amazon-web-services,amazon-ec2,amazon-ebs

When you stop an instance, data on Ephemeral storage is deleted. Data on EBS volumes are preserved as they exist independent of the host. Ephemeral storage is a hard drive attached to the host machine. Since your instance does not maintain affinity with the host when stopped, you wont retain...

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

amazon-ec2,apache2

In this case I had mistakenly updated the DNS record for forwarding rather than for the @ tag, so it was forwarding to the site.

AWS ELB Server certificate trust

amazon-web-services,amazon-ec2,ssl-certificate

The SSL certificate is presented by the server and not the ELB [TCP pass threw]. If you are using TCP pass through, then no, it doesn't matter what the certificate looks like. The ELB is just forwarding the raw TCP data. When using TCP->TCP the ELB doesn't really even...

Multithreading in Ruby in EC2 causing weird behavior

ruby-on-rails,ruby,multithreading,amazon-web-services,amazon-ec2

You've just been getting lucky locally - there is nothing that guarantees that your 10 threads will execute to completion before your program exits. If you want to wait for your threads then you must do so explicitly: threads = 10.times.collect do |i| Thread.new do puts i end end threads.each(&:join)...

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

amazon-web-services,amazon-ec2

No, it is not possible to Stop an instance under Auto Scaling. When a Scaling Policy triggers the removal of an instance, Auto Scaling will always Terminate the instance. However, here's some ideas to cope with the concept of Termination... Option 1: Use pre-configured AMIs You can configure an Amazon...

AWS - t2.micro instance EBS Volume size

amazon-web-services,amazon-ec2

30 GB of EBS is comes with the Free Tier. Go ahead use the 30 GB of EBS. You can break it and use it either way want like 20 + 5 + 3 + 2 GB [ with magnetic or Genral Purpose SSD ]. ...

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

amazon-ec2,ansible

My solution: - name: Find max id host set_fact: id_max_host={{ groups['nodes'] | sort('id' | int) | last }} - name: Find max id set_fact: id_max={{ hostvars[id_max_host]['id'] }} It takes the list of hosts in group nodes, sorts by the hostvar 'id' (which it casts to int, because they're usually strings),...

Setup GoDaddy SSL in Amazon ec2

linux,apache,ssl,amazon-web-services,amazon-ec2

Go to Amazon. Then EC2. Click Security Groups. Add an HTTPS method....

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

mysql,amazon-web-services,amazon-ec2

If you're running MySQL on AWS EC2 as an RDS instance, your database_url will be the RDS instance name (followed by :port of course). See http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ConnectToInstance.html for more info, but this is normally of the form myinstance.123456789012.us-east-1.rds.amazonaws.com (where us-east-1 is the region in this example but might vary depending on...

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

mysql,hibernate,amazon-ec2,tomcat7,rds

Your database url is set to localhost, if you are using RDS this is not the case, instead you should replace it with the hostname provided in the rds console (something like dbname.somerandomchars.rds.eu-west... Sorry I dont have an example to hand so this is a guess from memory it may...

Amazon EC2 Storage lacks

amazon-web-services,amazon-ec2

The size of the EBS volume is whatever you set it to be, it's not tied to the instance type. If you click "Volumes" on the left of the dashboard and find the volume that's attached to your instance, you will probably find that it's only 8GB, which is a...

How can I access Mule ESB Community edition via browser?

amazon-web-services,amazon-ec2,mule,mule-component

If you are trying to access to the Mule Management Console (MMC), that is a separate product from Mule ESB and it is only available to manage Mule ESB Enterprise Edition. In some downloads MMC is included with Mule ESB in a bundle for testing purposes but to run in...

Data access Spark EC2

scala,amazon-ec2,apache-spark

There are a few things you need to do: The default configuration uses the ephemeral hdfs so you need to turn that off $ /root/ephemeral-hdfs/bin/stop-all.sh and turn persistent on $ /root/persistent-hdfs/bin/start-all.sh. Put your file into the persistent hdfs root directory for simplicity $ /root/persistent-hdfs/bin/hadoop fs -put /root/ds_1.csv /ds_1.csv. Now check...

Remove a rule from AWS EC2 Security group using Ansible

amazon-web-services,amazon-ec2,ansible,ansible-playbook

By default, the ec2_groups module will idempotently set the rules specified for any present groups as the purge_rules and purge_rules_egress both default to true. If you had previously had a task to create an EC2 secruity group that looked like: - name: Create HTTP and HTTPS Security Group local_action: module:...

How to automate Amazon aws EC2 for scraping

amazon-web-services,amazon-ec2

You could build this yourself by having your master launch worker instances when needed, send them scrape requests, terminate them when needed and generally code all the orchestration yourself and try to make it highly available. But that's not a good way to do this. Instead, you should take advantage...

EC2ResponseError: 401 Unauthorized using Saltstack boto_vpc module

amazon-web-services,amazon-ec2,boto,salt-stack,amazon-vpc

From reading the salt reference, it looks like keyid represents the access key and key represents the secret key. Have you accidentally transposed them?

Error when i try to install npm with putty

amazon-ec2,npm,install,runtime-error

You must install a supported version of node.js (0.10 or 0.12), you can download it here or you can use NVM

Move files from EC2 to S3 and then delete from EC2

amazon-web-services,amazon-ec2,amazon-s3,aws-php-sdk

I don't see what OS your current ec2 instance is running. But if it is linux you could use S3fs https://github.com/s3fs-fuse/s3fs-fuse/wiki/Fuse-Over-Amazon that will allow you to mount your bucket like a local drive/folder. Then you can simple move the files there. It will upload them to the bucket in the...

SSHFS MacOs Read Only Issue

osx,amazon-ec2,fuse,sshfs

I solved this issue by giving the ec2-user ownership of the folder I wanted to work in: sudo chown ec2-user /workplace...

Windows EC2 initial config from AMI after autoscale boot up

amazon-web-services,amazon-ec2,autoscaling

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). Take a look at userdata. The long and short of it is that you can configure your instances...

Timeout when submitting jobs to EC2 cluster

java,amazon-ec2,apache-spark

You need to open ports by editing security policies, if you want to access ports on your EC2 spark cluster. spark_ec2.py doesn't open ports 7077 and 6066 on master to be accessed from outside the cluster. I use the other way - connect to master machine of your spark cluster...

Installing latest version of vsftpd on an ec2-linux AMI

linux,amazon-ec2,ftp

The answer is in the FAQ file in the tar file: Q) Help! vsftpd doesn't build, it fails with an error about being unable to find -lcap. A) Install the libcap package and retry the build. Seems to affect Debian users a lot. A) Install the libcap-devel. This certainly affects...

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

amazon-web-services,amazon-ec2,amazon-cloudwatch,cloudwatch

Here is a documentation of .NET API http://docs.aws.amazon.com/sdkfornet/latest/apidocs/Index.html

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

Confusing AWS uses 'endpoint' to refer to a couple of different things. Judging by your question are you referring to this: https://aws.amazon.com/blogs/aws/new-vpc-endpoint-for-amazon-s3/ Essentially before VPC endpoints were introduced the only way to access certain AWS services was using a public URL, this is fine unless you are working in a...

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

python-2.7,amazon-web-services,amazon-ec2,amazon-s3,boto

This is a slightly difficult request because Security Groups are used by many different resources, including: Amazon EC2 instances Amazon RDS instances VPC Elastic Network Interfaces (ENIs) Amazon Redshift clusters Amazon ElastiCache clusters Amazon Elastic MapReduce clusters Amazon Workspaces ...and most probably other services, too To obtain a list of...

AMI for EC2 instance with a MongoDB?

mongodb,amazon-ec2

You can actually create an AMI from your server and then terminate the server when you don't need it. When you need it again you can relaunch a new server based on the AMI you created. The downside to this is that your latest data may not be up to...

Enabling SSL on an AWS EC2 instance

apache,ssl,amazon-web-services,amazon-ec2

Great. The error messages helped. You're missing two lines: SSLCertificateFile /directory/to/file.crt SSLCertificateKeyFile /directory/to//file.key Here's a howto on configuring SSL on Apache....

Can't remote into a spawned EC2 instance

amazon-web-services,amazon-ec2

When you say Tried to connect and got the message "Password is not available", do you mean you connected with RDP or do you mean that you were in the AWS console, you right-clicked the EC2 instance and you selected "Get Windows Password"? Unless you explicitly did something to prevent...

Maximum bid price for an AWS EC2 spot instance?

amazon-web-services,amazon-ec2

In case this is why you are asking - there is no bid amount that you can enter that will guarantee your spot instance will remain running - even if you are the highest bidder. EDIT: Thru trial a bit of trial an error after @Michaels comment below, I have...

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

powershell,amazon-web-services,amazon-ec2,aws-powershell

Here's an example that does as you've described: Filters security group objects by FromPort Of the matched security groups, output IpProtocol, IpRanges, ToPort, and UserIdGroupPairs. Code: # Example using port 22 PS C:\> $port = 22 PS C:\> Get-EC2SecurityGroup | ? { $_.IpPermissions.FromPort -eq $port } | % { $_.IpPermissions...

EC2 root volume expansion for CentOS7

linux,amazon-web-services,amazon-ec2,centos,centos7

This is normal behaviour on the Amazon Linux AMI. From Amazon Linux AMI 2014.03 Release Notes: Cloud-Init 0.7.2 Cloud-Init has been updated to the 0.7 series, adding a number of useful features. One example is dracut-modules-growroot, which automatically resizes your root filesystem on boot. I note that CentOS 7 (x86_64)...

EC2 can't access S3 file

django,amazon-ec2,amazon-s3,access-denied

What permissions are set? If you're accessing the Url for the image whilst logged in via the admin panel then you have full permissions to view anything/delete anything etc. If the image url is used in a web site you need to make sure that the S3 object has an...

Django Celery cannot connect to remote RabbitMQ on EC2

django,amazon-ec2,rabbitmq,celery

Turns out I had not created appropriate configuration files. In my case (Ubuntu 14.04), I had to create below two configuration files: $ cat /etc/rabbitmq/rabbitmq-env.conf RABBITMQ_NODE_IP_ADDRESS=<ip_of_ec2_instance> <ip_of_ec2_instance> has to be the internal IP that EC2 uses. Not the public IP that one uses to ssh into the instance. It can...

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

amazon-web-services,amazon-ec2,subnet,amazon-vpc,elastic-ip

Instances created in VPC public subnets will be automatically assigned a public, routable IP address and a corresponding publicly-resolvable DNS entry of the form ip-<dash delimited address>.<region>.compute.amazonaws.com. Any ports allowed in the instance's security groups will be accessible over the Internet. The automatic address cannot be chosen. These public addresses...

Docker hiding IP of calling container [closed]

amazon-ec2,go,docker,iptables,coreos

After a bit of experimenting, I found that running the proxy container in --net=host mode solved the problem. By using this option, the proxy container shares the same networking stack as the host, thus bypassing the the docker0 bridge....

MongoDB on Amazon EC2 - Configuring Mongo Client for Php

php,mongodb,yii,amazon-ec2,yii2

From the error message it seems that you haven't installed the PHP Mongo Driver in your server. To check if you have it, try a php_info() and check if the entry "mongo" is present If it's not present install it using the instructions found in the link above, or check...

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

amazon-web-services,amazon-ec2,amazon-s3,cloudflare

you want geolocation routing for the api endpoints: http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html#routing-policy-geo...

View EC2 Instance Server Files in AWS Console

amazon-web-services,ssh,amazon-ec2

the short answer is no. you cannot view the files in the AWS console. depending on the instance type, if it's EBS backed you may be able to snapshot the volume and start the machine with a new SSH key pair you do have access to.

Who created an Amazon EC2 instance using Boto and Python?

python,amazon-web-services,amazon-ec2,boto,amazon-cloudtrail

I found out the solution to the above problem using lookup_events() function. ct_conn = sess.client(service_name='cloudtrail',region_name='us-east-1') events_dict= ct_conn.lookup_events(LookupAttributes=[{'AttributeKey':'ResourceName', 'AttributeValue':'i-xxxxxx'}]) for data in events_dict['Events']: json_file= json.loads(data['CloudTrailEvent']) print json_file['userIdentity']['userName'] ...

AWS CLI for EBS snapshots

amazon-web-services,amazon-ec2,aws-cli

Use us-west-2 instead of us-west-2b in your Endpoint URL. Most probably, this would be the value of REGION in your configuration file that was created by running aws configure us-west-2 is a region us-west-2b is an availability Zone in that region. You should be connecting to the Region and not...

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

amazon-web-services,amazon-ec2,amazon-cloudwatch,amazon-iam

I assume you're talking about custom CloudWatch metrics. You don't have to restart any instances to enable them. You can create a group in IAM with the following policy and add a user to this group: { "Version": "2012-10-17", "Statement": [ { "Sid": "****************", "Effect": "Allow", "Action": [ "cloudwatch:PutMetricData" ],...

s3cmd put failing with access denied

amazon-ec2,amazon-s3

I think you need to have write permissions for IAM in addition to List: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "ec2:*", "s3:ListAllMyBuckets", "s3:ListBucket" ], "Resource": "*" }, { "Sid": "Stmt1406613887001", "Effect": "Allow", "Action": [ "s3:*" ], "Resource": [ "arn:aws:s3:::mybucket", "arn:aws:s3:::mybucket/*" ] } ] } ...

Django on Amazon Web Service (AWS)

python,django,amazon-web-services,amazon-ec2,amazon-elastic-beanstalk

It turns out "aws:elasticbeanstalk:container:python:staticfiles" maps files in your directory on your EC2 instance (/opt/python/current/app/static/) to /static/ setting STATIC_ROOT in settings.py to os.path.join(BASE_DIR, '..','static') fixed the issue...

How to actually deploy to a serious host?

amazon-web-services,deployment,meteor,amazon-ec2,elastic-beanstalk

Use Meteor Up. Its README has some thorough documentation, and its primary hosting destination is AWS. And yes, AWS supports Websockets. Just follow the Meteor Up instructions.

Rails scheduled task behind a load balancer

ruby-on-rails,amazon-ec2,cron,whenever,whenever-capistrano

As zwippie said Perhaps this converation is still relevant, it mentions that the tasks will only run on the machine with the :db role. I believe that roles are the best solution to this problem currently....

Amazon RDS MySQL tmpdir location

amazon-web-services,amazon-ec2,magento-1.7,rds

I ssh into my server Not really. Your database is on an RDS instance, which can't be accessed over SSH. You must have ssh'ed into your web server, instead. RDS provides you with a managed server with MySQL -- and nothing else -- running on it. It's not the...

aws elastic beanstalk “Request-URI Too Long”

apache,amazon-web-services,amazon-ec2,elastic-beanstalk

LimitRequestLine should reside within <VirtualHost> section. Its quite tricky to do it in Elastic Beanstalk since you need to add this line to /etc/httpd/conf.d/wsgi.conf which is autogenerated after both commands and container_commands are run. Following idea from this blog, adding the following to config file under .ebextensions worked: commands: create_post_dir:...

Cannot find created database from AWS EC2 Instance

mysql,wordpress,amazon-web-services,amazon-ec2

You have installed MySQL on your EC2 instance, not created an RDS instance. You would not be able to "see" this database through any sort of AWS console or CLI actions. If you truly want your database to be on RDS (which I would actually recommend rather than running on...

AWS CloudFormation: How to get subnet list from VPC?

amazon-web-services,amazon-ec2,subnet,amazon-cloudformation,amazon-elasticache

If your template created the VPC then presumably your template also created the subnets for that VPC. Can't you just populate SubnetIds from the individual subnet IDs for each subnet you created? Something like this: "SubnetIds" : [ {"Ref":"mysubnet1"}, {"Ref":"mysubnet2"} ] ...

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

django,amazon-ec2

I figured it out. I need to open up the port on Windows Firewall as well!

Microservices and cloud resource limitations

amazon-web-services,amazon-ec2,spring-cloud,microservices,amazon-elastic-beanstalk

As mentioned in the above comments, AWS will raise your limits if you have a legit use case - why wouldn't they? they are in the business of selling you services. But since you have asked for suggestion other than increasing those limits, and since you are in the early...

copy key pair to amazon

amazon-web-services,ssh,amazon-ec2,ubuntu-server

If you can't find the public key that corresponds to your current .pem file, just generate a new key pair, and add that public key to your ~/.ssh/authorized_keys file! You could use AWS to generate the new key pair, or check out these popular instructions from GitHub: help.github.com/articles/generating-ssh-keys.

Reverting DEIS in AWS

amazon-web-services,amazon-ec2,deis

This is an ideal use case for AWS CloudFormation. Either use the official Deis published info on CloudFormation at http://docs.deis.io/en/latest/installing_deis/aws/. Note that with CloudFormation, you can with a single command launch all resources, or destroy all resources. Or, alternatively, for a more sophisticated example with Terraform, a third-party alternative to...

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

wordpress,amazon-web-services,amazon-ec2,apache2

With the help of @Giles Hunt and @kittykittybangbang, I add .htaccess to my website whose content is as follows: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> And now it works....

AWS EC2 scp from private subnet instance to bastion

amazon-ec2

Do your security group rules allow traffic to the bastion from the private instance, or is it just from the bastion to the private? I assume from your description you're copying from private to bastion? If your rules are one way have you tried running the reverse scp. So: Scp...

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

ruby,ssl,amazon-ec2,chef,aws-sdk

As far as I know this is related to Mozilla, who removed 1024 bit Root CA certs in late 2014. Technically, this is good but unfortunately broke many legacy certificate chains. The issue is described here in the section "RSA-1024 removed" http://curl.haxx.se/docs/caextract.html. And in ChefDK at https://github.com/chef/chef-dk/issues/199#issuecomment-60643682 Recent ChefDK and...

Can't access Ganglia on EC2 Spark cluster

amazon-ec2,apache-spark,ganglia

The fact that ganglia is not available is related to these errors - ganglia is php application and it won't run without php module for apache. Which version of spark you are using to start cluster? It is wierd error - these file should be present in AMI image....

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

amazon-web-services,amazon-ec2,docker,elastic-beanstalk,ec2-container-service

UDP support has been missing still from the GA release of the Amazon EC2 Container Service, see Ports are assumed to be TCP (issue #2) of the Amazon ECS Container Agent. Luckily this surprising gap has already been addressed and the new ECS agent version is pending release - I...

Spring Boot War file gets 404 on ec2

tomcat,amazon-ec2,spring-boot,.war

I've answered a similar question here. You are running your external tomcat under a Java 1.7 JRE, while having compiled your code against 1.8. Strangely, there is no error, and the app appears in the manager app, but then you get a 404 when you're trying to access it. One...

Cloud Init Fails to Install Packages on CentOS 7 in EC2

amazon-ec2,centos7,cloud-init

Evidently there was a bug fixed with later versions of the image. If this is happening to you, it may be a legitimate bug in Cloud-Init or your servers implementation of it. A package upgrade may fix the problem, also an update to the image will fix it globally.

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

bascially run the smallest server you can and use crontab which is usually fine. you can see more options at http://programmers.stackexchange.com/questions/171211/execute-code-every-hour

How to set a variable using dynamic inventory using Ansible

amazon-web-services,amazon-ec2,ansible,ansible-playbook,rds

I was able to solve my above problem by using something like this set_fact: rds_hostname="{{ groups.rds_mysql[0] }}" Also during my research I found a nice ansible galaxy code which allows you to dump all variables accessible to ansible-playbooks https://galaxy.ansible.com/list#/roles/646 Hope this helps someone :)...

Is there a way to cluster different machines running Tomcat instances

tomcat,amazon-ec2

Confirmed, @sri asked for load balancer in AWS. Please go through the document aws elb Elastic Load Balancing automatically distributes incoming application traffic across multiple Amazon EC2 instances in the cloud. It enables you to achieve greater levels of fault tolerance in your applications, seamlessly providing the required amount of...

AWS RDS on Eclipse

eclipse,amazon-web-services,amazon-ec2,amazon-rds

Okay, per the comments on the question, I'm going to give an answer that works around the question. In other words, the straightforward answer is to do an insecure thing (open the database to public). Here's the TLDR on the answer: create a tunnel to an ec2 instance, then tell...

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

laravel-4,amazon-ec2,ssl-certificate,apache2.4,php-5.6

Try changing the app/config/email.php smtp to mail...

AWS EC2: Migrating from Windows to Linux Server

linux,windows,amazon-web-services,amazon-ec2,server

First thing is realizing the main problem is not the server software and operating system but your application. You need to be sure that your application runs on Linux and you don't have any Windows dependent libraries. Then you can create a Linux EC2 instance (Ubuntu, RedHat or any other...

Determine Deployment Group from appspec.yml

bash,amazon-web-services,amazon-ec2,aws-code-deploy

Well then, after searching the forums on aws, I see they now support deployment specific environment variables. So I can reference the deployment group from within bash and set the load balancer: if [ "$DEPLOYMENT_GROUP_NAME" == "Staging" ] then ELB_LIST="STAGING-ELB" fi RE http://blogs.aws.amazon.com/application-management/post/Tx1PX2XMPLYPULD/Using-CodeDeploy-Environment-Variables...

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

php,amazon-ec2,sqlite3,ubuntu-14.04

After hours of reading and kibitzing and scratching my head, I finally figured out what was causing the issue. The application uses a mixture of web and command-line calls to the database depending on the action being taken. These include full-time services, CRON jobs and exec's of PHP scripts from...

Loop through list of AWS-instances shows only first item

ruby-on-rails,amazon-web-services,amazon-ec2,each,aws-sdk

As far as I know, the method in the controller will return the last object in the loop, so if you have 5 objects it will loop through each and will return the last one, cause that's where the controller method ends in your case. You need to pass the...

SSH aws ec2 elastic beanstalk without keypair

ssh,amazon-ec2,elastic-beanstalk

You can download the logs using tail logs or full logs option in the console http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.loggingS3.title.html The above will get you the default set of log files from the instance. If you want to get your files from one of the non-default locations you will need to update your environment...

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

java,amazon-web-services,amazon-ec2,amazon-dynamodb

The schema of DynamoDB tables only specifies the hash key, optional range key, and optional index keys. The schema does not cover attribute fields that are uninvolved in a key or index. I believe that is why your BuruMsg field does not appear in the management console UI. You can...

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

amazon-web-services,amazon-ec2

I can understand the problem of having the need for polling as you have taken the Pull Design [ poll for changes and pull the boto script to make the changes ]. The simpler approach would be to use a Push Method i.e. make the instance or remove the instance...

AWS Elastic Beanstalk Post Deploy Script

ruby-on-rails,amazon-web-services,amazon-ec2,elastic-beanstalk

The right place to drop your config file is .ebextensions directory in your app and not . elasticbeanstalk. You should then see your shell script in the /opt/elasticbeanstalk/hooks/appdeploy/post directory. As noted in the forum post "Dropping files directly into the hooks directories is risky as this is not the documented...

Running Python RESTful API on Amazon EC2

python,rest,amazon-ec2

Like a firewall, you have to open up the server's ports. You do this via adding rules to the security group while you're configuring the EC2 instance. Add the HTTP rule, and allow all IP addresses (0.0.0.0/0) to access that. See here: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html#adding-security-group-rule You can also set SSH, HTTPS, and...

Amazon web services phpmyadmin: The mbstring extension is missing

php,mysql,amazon-web-services,amazon-ec2,phpmyadmin

You need to install the PHP 5.6 version. yum install php56-mbstring...

Trouble setting up a Loopback production host on AWS EC2

amazon-web-services,amazon-ec2,permissions,loopbackjs,strongloop

You can install NodeJS from a PPA using the following commands as documented in this blog post: $ curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash - $ sudo apt-get install -y nodejs The other ideas suggested in the comments also have potential. However, this was the one I was able to...

AWS CloudWatch — Signature Expired

amazon-web-services,amazon-ec2

The system time of the problem EC2 instance is off by several minutes. See AWS SDK Error - Signature not yet current This is likely the solution!...

pom file java version spec for Maven

linux,java,amazon-ec2,compilation,maven

It's two different things <java.version>1.6</java.version> is the java version used and <aws.java.sdk.version>1.8.3</aws.java.sdk.version> is the AWS SDK for Java version used. The minumum requirement of AWS SDK 1.9 is Java 1.6+ so there is no compatibility issues....

AWS S3 utilizing for website static images

php,amazon-web-services,amazon-ec2,amazon-s3

If you're using Apache then you could proxy all the /images URL's using Apache's built-in proxy support. You would want to add something like this to your Apache configuration: ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass /images/ http://images.s3-website-us-east-1.amazonaws.com/ This actually creates a reverse proxy. When the...

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

mysql,amazon-web-services,amazon-ec2,export,amazon-rds

Sure. Take the dump from the remote RDS Server: mysqldump -h rds.host.name -u remote_user_name -p remote_db > dump.sql When prompted for password, provide the password for user=remote_user_name (remote server) Upload it to your local mySql instance: mysql -u local_user_name -p local_db < dump.sql Also, if you own an ec2 server...

How do I SSH into EC2 with .pub?

amazon-web-services,ssh,amazon-ec2

It seems that you need to create your key first in the AWS console, this will allow you to download the correct file app.pem which you add to .ssh folder (Mac). You can then resign the new key by doing eb ssh --setup. WARNING This deletes all instances and recreates!...

Run Kubernetes on EC2

ssh,amazon-ec2,coreos,kubernetes

Reason for this issue was that I haven't set the kubernetes_master environment variable properly. As there is a ssh tunnel between the kubectl client and API, kubernetes master environment variable should be set to localhost.

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

linux,ubuntu,amazon-ec2,plesk

Okay so I found the solution. First I had to login as the main user (for me it was ubuntu) using the pem key provided with Amazon. Then I had modify this file: sudo nano /etc/ssh/sshd_config and changed PasswordAuthentication no to PasswordAuthentication yes Then I had to restart the ssh...

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

amazon-web-services,amazon-ec2

Ok I found the answer. I somehow ended up making multiple accounts under the same email address (don't ask). Didn't realise it was possible. Anyway hope this helps...

Ruby aws-sk: undefined method

ruby,amazon-ec2,aws-sdk

V1 and v2 of the Ruby SDK have different approaches here. In v2 you decide between using the client APIs or the resource APIs. The client APIs provide a 1-to-1 mapping of methods to API operations. The resource apis provide an object oriented interface similar to the V1 SDK. You...

Map multiple domains to subfolders in EC2

amazon-web-services,amazon-ec2,dns,subdomain

Easily with AWS: Set up virtual hosts on your EC2 instance for each of your client web projects. If you are using Apache for example, each vhost configuration basically just tells Apache what the domain will be, where the files live and which ports to listen on. Your EC2 instance...

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

ios,iphone,amazon-ec2,amazon-s3,amazon-ebs

Allowing an app to write directly to an instance file system is a non starter, short of treating it as a network drive which would be pretty convoluted, not to mention the security issues youll almost certainly have. This really is what s3 is there for. You say you are...

WebSocket connection failed: WebSocket opening handshake was canceled

javascript,amazon-web-services,amazon-ec2,websocket

There was an SSL certificate mismatch between the Haskell server and the Apache server. The Haskell server had to be rebuilt with information concerning the new certificates for the instance. Further complicating this the proper SSL library (libssl0.9.8 libssl-dev) was not installed on the EC2 instance which was causing me...

Using Java web service on Amazon cloud

java,web-services,amazon-web-services,amazon-ec2

This is pretty standard in terms of deployment. First - create a EC2 box, this will be your server, you'll need to configure the firewall to allow connections over HTTP port 8080. Second - install Tomcat on said EC2 box. Third - upload your war file to said Tomcat instance....