w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 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

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

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

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

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 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

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

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

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 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 do I force Amazon EC2 instance to use my Elastic IP when I FTP out to a remote server?
FTP has two modes of operation - active and passive. Quoting wikipedia: FTP may run in active or passive mode, which determines how the data connection is established.In active mode, the client creates a TCP control connection. In situations where the client is behind a firewall and unable to accept incoming TCP connections, passive mode may be used. In this mode, the client uses the control connection to send a PASV command to the server and then receives a server IP address and server port number from the server, which the client then uses to open a data connection from an arbitrary client port to the server IP address and server port number received To summarize, in active mode, the server will attempt to create a connection BACK to the client. Since you client's IP is a private o

Categories : Amazon

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

Reading and writing on Instance store disk of Amazon
No. There are no IO request charges for instance store disk (aka ephemeral disk) from an EC2 instance. However, EBS volumes do incur IO request charges, or pIOPS charges for Provisioned IOPS EBS volumes. You can read more about EBS volume charges here: http://aws.amazon.com/ec2/#EBS

Categories : Amazon

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

itextSharp PDF to text file in c# issue in Amazon EC2 instance
Please debug as follows: Create a FileInputStream to PDFFilePath. Read the bytes of this stream into an array. Check the first five bytes. On your local system, they're '%', 'P', 'D', 'F', '-'. On your Amazon EC2 instance, they aren't. Check all the bytes to see what goes wrong.

Categories : C#

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

Permission denied (publickey) when SSH Access to Amazon EC2 instance
This error message means you failed to authenticate. These are common reasons that can cause that: Trying to connect with the wrong key. Are you sure this instance is using this keypair? Trying to connect with the wrong username. ubuntu is the username for the ubuntu based AWS distribution, but on some others it's ec2-user (or admin on some Debians, according to Bogdan Kulbida's answer)(can also be root, fedora, see below) Trying to connect the wrong host. Is that the right host you are trying to log in to? Note that 1. will also happen if you have messed up the /home/<username>/.ssh/authorized_keys file on your EC2 instance. About 2., the information about which username you should use is often lacking from the AMI Image description. But you can find some in AWS EC2 documen

Categories : Amazon

PHP unable to run MYSQLI functions on Amazon EC2 micro instance
UPDATE: Up to where I understand your PHP installation was compiled with mysqli support but the module is not enabled. Why? Because you specify that the only reference to mysqli in the phpinfo() is the Configure Command. Should it be enabled, a table like should show up. So, maybe, you simply didn't uncomment the extension line in your php.ini file: extension=mysqli.so Initial post: According to the official docummentation: To check whether the system is using a configuration file, try retrieving the value of the cfg_file_path configuration setting. If this is available, a configuration file is being used. In other words, you could check if your php.ini file is being taken into account (it may be in a wrong path). Try: <?php echo 'Configuration file (php.ini) path: ',

Categories : PHP

How to automatically start Tomcat after starting an Amazon EC2 instance
Your best bet (if you want to cut out a lot of trial and error) is probably to reinstall Tomcat with the .exe installer, and explicitly install it to run as a service. (You could certainly accomplish this without reinstalling; I suggest reinstalling merely because when all's said and done, it'll will probably take you less time, unless you have lots of custom Tomcat config.) Once it's installed as a service, go to Services and make sure the Tomcat service's "Startup Type" is "Automatic". (You will probably be able to control the Tomcat service's Startup Type from the Apache Service Monitor in your system tray as well, without opening Services.) Note that running Tomcat as a service may conflict with the way you schedule the starting/stopping Tomcat during business hours, but since it's

Categories : Tomcat

Cannot connect to PostgreSQL Remotely on Amazon EC2 instance using PgAdmin
Do you have a firewall blocking port 5432? A quick nmap shows that it is being filtered. nmap -Pnv -p 5432 ec2-54-251-188-3.ap-southeast-1.compute.amazonaws.com Starting Nmap 6.00 ( http://nmap.org ) at 2013-07-21 11:05 PDT Nmap scan report for ec2-54-251-188-3.ap-southeast-1.compute.amazonaws.com (54.251.188.3) Host is up (0.19s latency). PORT STATE SERVICE 5432/tcp filtered postgresql What does the iptables on your EC2 show for port 5432? iptables -nvL [after OP added more details] Netstat shows that it is listening, but the firewall output doesn't look like the 5432 port is open (I confess to not being much of a network guy). Referring to some of my notes from previous installs, you might need to open up EC2 port 5432 to your IP. To allow input firewall access, replace Y

Categories : Postgresql



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