w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Login Amazon instance with pem and password
You can use IAM groups and users. The documentation is here. IAM allows you to generate separate access keys for users with restricted usage rights.

Categories : Amazon

Amazon EC2 change instance type, possible issues with volumes?
If the volumes are EBS volumes then you can safely do this (note that terminating an instance can delete EBS volumes if they have the delete on termination flag set, but stopping an instance is ok). The volumes will stay attached to the instance but depending on the operating system and configuration you may need to remount them If they are ephemeral volumes then stopping the instance will lose all data stored on them.

Categories : Amazon

How to uninstall mysql on amazon ec2 micro instance
For right now: Assuming you don't need to keep any data, you can terminate your instance and launch a new one and configure it to your liking. To prevent problems in the future: After you launch your new instance and configure it with MySQL and whatever else you may need, create an Amazon Machine Image (AMI) of the instance. You can launch an instance based on your AMI so you don't have to go through and manually configure the instance from scratch if something were to happen. You shouldn't have to update AMIs too often. I usually only do when there are updates to the OS or something else on the machine. When it comes to persisting data/code the first thing I recommend is looking into some kind of source control system like git. On top of that you can create Snapshots of the Volume att

Categories : Mysql

mysql on ec2 amazon instance attempting to login with incorrect user
Your can't call mysql_real_escape_string without having opened a connection with mysql_connect first. Quoting from the documentation: A MySQL connection is required before using mysql_real_escape_string() otherwise an error of level E_WARNING is generated, and FALSE is returned. The error message refers to your default username @ localhost because you haven't opened a connection with specific credentials yet - it doesn't know what account details to use.

Categories : Mysql

How to install/configure new software in newly created amazon instances using Amazon SDK in java?
The Amazon API primarily controls infrastructure. It does not have any control as to what happens inside the instance. There are a couple of ways you can bootstrap your instance and install software. You can use user-data to pass a script that will run on first launch. You could use a provisioning system like chef or puppet. You could roll your own if it works better for you.

Categories : Amazon

Amazon Flexible Payments Service (Amazon FPS) IPN Verification PHP IPNVerificationSampleCode.php
Put correct define('AWS_ACCESS_KEY_ID', 'XXXXXXXXXXXXXXXXXX'); define('AWS_SECRET_ACCESS_KEY', 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX); it will word correct also change Introduction: Amazon FPS sends you outbound notifications in the form of GET and POST on your ReturnURL and IPN endpoints respectively. When you handle these notifications, we recommend you to validate the signature to ensure that the notification actually originated from us. You can validate the signature using signature version 2 with a server-side call to the VerifySignature API. In this call, you send the entire URL including the HTTP parameters received to FPS VerifySignature API and it will return a Boolean that indicates whether the signature was validated. Samples using this API to validate the signature are in

Categories : Amazon

Host static web site in Amazon S3 without using Amazon route 53
You can, but it wont work very well. You would need to create a CNAME record to map to the endpoint, which you can't use for apex records. You would need some other way of forwarding traffic from the apex to presumably www.domain.com. S3, Cloudfront either a set of IPs or Geo-DNS to determine which IP address will serve a given request. This is not something you can efficiently replicate in your own DNS. The cost of Route53 is pretty low, depending on traffic, it could hit be a $1 or less per month.

Categories : Amazon

is it possible to generate Amazon SES credentials from existing amazon ec2 account?
What do you mean by generate credentials?? AWS comes with a feature called IAM, identity and access management, just have a look, I hope you are looking for the similar service,one can access the ses account using ses api or smtp settings.

Categories : Amazon

Creating amazon ec2 windows AMIs using amazon sdk in java
I don't completely understand what you are trying to achieve. Do you want to start an instance in EC2 or with OpsWorks because your second link points to the OpsWorks documentation. OpsWorks dosen't support Windows right now.

Categories : Amazon

Username / password not specified Calling Amazon S3
Amazon S3 does not support Basic Auth so I suspect you are not actually hitting S3 directly but some intermediate layer that handles authentication. That is where you should be looking for the problem and a possible solution. For information on the currently supported S3 authentication modes, check out: http://s3.amazonaws.com/doc/s3-developer-guide/RESTAuthentication.html

Categories : C#

Configuring Amazon SES Feedback Notifications via Amazon SNS in ASP.NET MVC (C#)
You are on the right track - for the missing part 4 you need to implement receiving of a message from the Amazon SQS message queue you created in step 1. See my answer to Example of .net application using Amazon SQS for where to find a respective example - it boils down to the following code: // receive a message ReceiveMessageRequest receiveMessageRequest = new ReceiveMessageRequest(); receiveMessageRequest.QueueUrl = myQueueUrl; ReceiveMessageResponse receiveMessageResponse = sqs. ReceiveMessage(receiveMessageRequest); if (receiveMessageResponse.IsSetReceiveMessageResult()) { Console.WriteLine("Printing received message. "); ReceiveMessageResult receiveMessageResult = receiveMessageResponse. ReceiveMessageResult; foreach (Message message in receiveMessageResult.Me

Categories : C#

Amazon MWS - How can we update the inventory on Amazon instantly?
The answer is astonishingly simple: If you're running out of stock, don't wait for the next update cycle (the wall clock hitting *:05 again), but send an inventory update right away. Since you're posting the inventory, it is your choice when to do it. Just a side note: You probably will need to limit those updates in some way so that you don't send inventory updates more often than about every 5 minutes, otherwise they'll queue up (in my testing at least). Queued inventory updates won't do you any good.

Categories : Amazon

How to access Amazon AMI ec2 instance in GUI
Very brief answer. It is not amazon linux specific because I don't use it but should give you enough hints because it is Red Hat based AFAIK. Basically you need to install the GUI you want to use (xfce, gnome, kde, etc.) and vnc server. try yum search vnc and yum search gnome to find out what packages do you need to install. You then start vnc server on the machine. You do the above through command line console. If it works for you you may make VNC start with machine boot. I don't know which tutorial is good for putty port forwarding because not using windows but this looks promising to me: http://martybugs.net/smoothwall/puttyvnc.cgi With linux (perhaps if you install cygwin on your windows that will be possible for you as well) one usually can start a remote vnc session with automati

Categories : Linux

Cant get Amazon EC2 instance work
You need to check the security group that is associated with the instance. Make sure that you open up port 80. Also make sure that apache is started, and configured to start on boot. If you're logged in, you should be able to use wget localhost to verify if apache is serving up pages.

Categories : Amazon

Asset Precompile on Amazon Linux
Seems like you do not have imagemagick installed. Depending on your distro, it should be either sudo yum install ImageMagick ImageMagick-devel or sudo apt-get install imagemagick. You can test it whether it installed successfully by issuing the commands convert or identify. However, the documentation recommends that your precompile on your own local machine, not on the remote server. Meaning, you issue bundle exec rake assets:precompile on your own machine first. That would avoid having to precompile on the remote server.

Categories : Ruby On Rails

terminate instance; Amazon cloudwatch
you have to add these two lines PutMetricAlarmRequest alarmreq=new PutMetricAlarmRequest() .withActionsEnabled(true) .withAlarmActions("arn:aws:automate:us-east-1:ec2:stop"); //This stops the instance in the requests

Categories : C#

How do I download an Amazon RDS database from an instance?
There is no other way but connecting to your instance and using any tool you might want to use to do the job - backup This question was answered before. download RDS snapshot

Categories : PHP

How to figure out the 'Public DNS Name' from within an Amazon EC2 instance?
Take a look here, but use public-hostname instead of instance-id.

Categories : Windows

When reserving an Amazon EC2 instance, what does it mean for the Platform to be the same?
You would choose "Linux/Unix". Flavors of Linux such as Redhat and SUSE include additional licensing fees not charged for other versions of linux, which is why they are considered separate platforms.

Categories : Amazon

How to change the instance type in amazon ec2
For whatever reason, Amazon's HVM based AMI is not compatible with the t1.micro size. Amazon has hardware virtual machine (HVM) based AMIs, and paravirtual machine (PVM) based AMIs. From that error message, AWS is saying that your current instance is HVM based, and t1.micro size will only support PVM based instances. The way round this would be to create a new AMI from your instance and launch a new instance from that AMI as t1.micro size. Be careful, though, this may just create an HVM-based AMI, in which case you will need to snapshot the volume for your current instance and create a new AMI from that. Some more information on HVM: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html#concepts_cluster_compute_hvmAMI http://aws.amazon.com/ec2/faqs/#Does_use_of

Categories : Amazon

Amazon AWS SDK PHP 2 - Filter tags by instance?
The API docs for Ec2Client.describeTags show that Value should actually be Values and should be an array. Try the following: $oModel = $oEC2Client->describeTags(array( "Filters" => array( array("Name" => "resource-id", "Values" => array($sInstanceId)) ) ))->toArray();

Categories : PHP

In java, how can I get an Amazon EC2 Instance to see its own tags?
You should be able to get the current instance id by sending a request to: http://169.254.169.254/latest/meta-data/instance-id. This only works within ec2. With this you can access quite a bit of information about the instance. However, tags do not appear to be included. You should be able to take the instance id along with the correct authentication to get the instance tags. If you are going to run this on an instance, you may want to provide an IAM user with limited access instead of a user which has access to everything in case the instance is compromised.

Categories : Java

Deploying code to Amazon EC2 instance
It is, but consider that... If you have SLAs, and they fall within SQS Limits (Maximum 4 Days), you could consider publishing your task queues into SNS/SQS, and use CloudWatch to track the number of needed instances. If you have a clear division of roles (more like a workflow), and the long-running tasks are not of much concern and you can retry, also consider using AWS SWF instead. It goes a bit beyond of a SQS/SNS Combo, and I think it could fit nicely with CloudWatch (thats just a theory, I haven't looked further). Cons are the extreme assh*le AWS Flow Framework for writing the Workflow Processes If your workload is predictable (say, around 5K processes to process today), meaning you have no need for real-time and you can batch those requests, then consider using Elastic MapReduce for

Categories : Java

Installing Perl DBI on amazon instance
So After some googling I found this link about make failure on Ubuntu Forum And post#3 worked for me sudo apt-get install libyaml-perl sudo perl -MCPAN -e 'install DBI' Install DBI (apart from the step in above question) a) sudo apt-get install build-essential autoconf automake libtool gdb b) sudo cpan DBI install DBD::mysql a) sudo apt-get install mysql-server b) sudo apt-get install libmysqlclient-dev c) sudo cpan DBD::mysql I need all of the above steps as I have fresh instance

Categories : Perl

Amazon autoscaling scale-down instance
you need to specify ami id for template ami only. all will be scaled up and down based on this single ami id. PLEASE NOTE: it is an ami id or image id that will be utilized and not an instance id. The scale will be a range from 1 to 3 and will be configured in your autoscaling group with these tags: --min-size 1 --max-size 3 based on the metrics that you supply in the autoscaling policy. With a minimum size of 1 instance, 1 instance will always be running. With a maximum size of 3 instances, 3 can run. There is not a need to scale non running instances. Here is a complete tutorial: http://www.cardinalpath.com/autoscaling-your-website-with-amazon-web-services-part-2/

Categories : Amazon

Which directories should in put in new volume in Linux server Amazon EC2
The idea of being stateless is that the instance stores no persistent data (database, user files, etc). That way you could duplicate the instance, put it behind a load balancer and scale horizontally to more traffic without duplicating persistent data. Using multiple volumes on a stateless machine is optional. It can help if you need to increase io throughput, but outside of that it doesn't provide many advantages. It can make it more difficult if you are trying to build stateless instances since an AMI will only include the root volume.

Categories : Linux

What could break after changing instance type on Amazon EC2 AWS?
If you're talking about just changing the instance type, nothing. You should keep backups anyway in case amazon goofs, but remounting the EBS to a larger instance shouldn't break anything as long as you restart all the services and recompile whatever's necessary to be safe.

Categories : Amazon

How to SFTP into Amazon EC2 Ubuntu t1.micro instance?
I really like sshfs. SSHFS lets you mount a remote file system and have it show up as a local mount point on your local system. https://help.ubuntu.com/community/SSHFS A simple example is: 1. From the client make sure that you have sshfs installed: "sudo apt-get install sshfs" 2. From the client system: "sudo sshfs user@ubuntuServer:/remote/path /local/path -o allow_other" This will mount /remote/path on the ubuntu server to /local/path on your machine. The "-o allow_other" says that any user on the client system and read/write to the mount point assuming that the "user@" user has permissions on the ubuntu server to read/write to the "/remote/path".

Categories : Osx

amazon spot instance termination issue
In short answer if another user is bidding more for the instances and there are no more spare available instances then the spot price increases and the first group of instances that fall below that price are SHUTDOWN instantly. Quoting http://aws.amazon.com/ec2/spot-instances/ Spot Instances allow you to name your own price for Amazon EC2 computing capacity. You simply bid on spare Amazon EC2 instances and run them whenever your bid exceeds the current Spot Price, which varies in real-time based on supply and demand.

Categories : Amazon

Connecting to ubuntu instance in amazon ec2 without java
You can connect over ssh using an ssh key without using their web based java ssh program. Read the documentation here about halfway down the page.

Categories : Java

How To read through environment variables of an Amazon EC2 instance on the fly in PHP
try this print_r($_ENV); print_r($_SERVER); print_r($GLOBALS); phpinfo(); you should find the vars there (reference - https://forums.aws.amazon.com/message.jspa?messageID=447927)

Categories : PHP

Scalability of database on an Amazon EC2 micro instance?
If the load on your application increases the database on EC2 instance will not scale itself. It will fail if you do not take any steps. All you can do is vertical scaling. And you can have read replicas. The same is true for RDS. With RDS, DB server does not scale automatically, you need to upscale it your self if the traffic increases. So RDS decreases your DB management overhead.

Categories : Amazon

allow others to see your Sinatra local server through amazon instance
I'm not sure if there is a specific reason that you want to do this from an Amazon server or not, but if you just want someone else to see your sinatra app, you could simply use localtunnel. Using this, you can simply run localhost on your OWN computer, then run localtunnel PORTNUMBER and it will give you a URL that your app will now be visible from. You can then give that URL to anyone you want. Example of use: $ ruby myapp.rb $ localtunnel 4567 A URL will then be displayed for you to copy-paste to a friend. Easy as that. I use this a lot when developing web apps to be mobile friendly and want to quickly look at the app on my phone without having to deploy to a server.

Categories : Ruby

How to extract price from Amazon Url without Amazon API
I had same problem and this is my fix: I run script again if image is not parsed. image is parsed first in my php script so I check if it works and amazon gives information. I hope it helps. if($html->find('#main-image')) { foreach($html->find('#main-image') as $e) { echo '<span href="'. $e->src . '" class="imgblock parseimg"> <img src="'. $e->src . '" class="resultimg" alt="'.$name.'" title="'.$name.'"> </span> <input type="hidden" name="my-item-img" value="'. $e->src . '" />'; } } else { gethtml($url,$domain); die; }

Categories : PHP

Amazon S3 HTTPS not loading with Chrome and wget on Linux
works here in Ubutnu Linux with Chromium and with wget. It only works in wget if you put " " around the URL, which contains special characters. Otherwise I do get 403 forbidden. I receive a jpeg file, 5.1k. It looks like the same drawing I get on chromium. The URL produces a picture of some kind of rough drawing with black lines. wget version is 1.13.4 chromium about: Chromium 25.0.1364.160 (Developer Build 25.0.1364.160-0ubuntu0.12.10.1) Ubuntu 12.10 OS Linux WebKit 537.22 (trunk@137939) JavaScript V8 3.15.11.16 Flash 11.2 r202 User Agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Ubuntu Chromium/25.0.1364.160 Chrome/25.0.1364.160 Safari/537.22 Command Line /usr/lib/chromium-browser/chromium-browser --flag-switches-begin --sync-keystore-e

Categories : Linux

Hosting Java Webservice on Amazon Linux AMI 2013.03
The likeliest problem is that the security group for this EC2 machine does not allow access on port 8080. Have a look here for more details: Create and Configure Your Amazon EC2 Security Group Once you modify the security group, the change is applied immediately so you do not need to start a new EC2 machine.

Categories : Java

Celery not automatically starting on Amazon Linux AMI 2013.03.1
You need to write a simple startup script: Create a file called celeryd.sh vim /etc/init.d/celeryd.sh Inside that file: #!/bin/sh ##Starts the celery on boot up### /etc/init.d/celeryd start Change permission: chmod +x celeryd.sh Done. You can do init 6 and test, if it works or not. More on : http://www.cyberciti.biz/tips/linux-how-to-run-a-command-when-boots-up.html

Categories : Apache

How can I resolve an ORA-12514 when connecting to an Amazon RDS instance using Java
The JDBC connection string is incorrect. The string should be: jdbc:oracle:thin:[user/password]@//<host><:port>/<service> Changing the connection string resolved the issue.

Categories : Java

How to install edited ruby gem from github on Amazon EC2 instance?
You can build gem from installed source after some modifications and install it. Just locate to source, find mygem.gemspec file, then gem build mygem.gemspec and gem install mygem. Read more on http://docs.rubygems.org/read/chapter/5. Does it address your needs and solve your problem?

Categories : Ruby

Unable to connect to MSSQL server on Amazon RDS using NAT instance
Your problem is a little bigger than security group changes. The main problem is that your private vpc is private as in 'not internet accessible'. You have several options to connect from outside: Use a bastion machine as an intermediate hop (on the public net) and add relevant SG rules to hop form that machine into your precious DB. Your users will need to connect to that machine and then either run client tools on that machine to connect to the DB or setup a SSH tunnel to your DB (so your office machine could connect). This is not a great solution in term of users experience and in term of security (the bastion become a very big security risk) but it is simple to setup. (Note: since you are MS dude then please switch SSH for RDP [and cancel the tunneling thing]) Setup a VPN - bring a

Categories : Database



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.