amazon-ec2

Wordpress on AWS EC2 - broken after assigning elastic IP

半世苍凉 提交于 2020-12-29 13:10:43
问题 So, I got Wordpress installed and working just fine. I can access the site and the wp-admin via the public DNS that I get from the instance. However, once I create an elastic IP and associate it with the instance, I can no longer access wp-admin and the home page style sheets and JavaScript files are not loaded. I am attempting to access the site and the wp-admin using the new public IP from the elastic IP. Same thing is true if I try to use the public DNS from either the elastic IP or the

Finding my AWS account ID using JavaScript

巧了我就是萌 提交于 2020-12-29 10:19:10
问题 How do I find my AWS account ID using JavaScript/NodeJS? Should work when explicitly providing keys for a root-account or IAM user. Should also work when invoked inside of an ec2-instance which is configured with instance-profile (no keys). 回答1: The best way is via "Security Token Service": var AWS = require('aws-sdk'); // Load credentials and set region from JSON file AWS.config.loadFromPath('./config.json'); var sts = new AWS.STS(); sts.getCallerIdentity({}, function(err, data) { if (err) {

Finding my AWS account ID using JavaScript

纵饮孤独 提交于 2020-12-29 10:16:50
问题 How do I find my AWS account ID using JavaScript/NodeJS? Should work when explicitly providing keys for a root-account or IAM user. Should also work when invoked inside of an ec2-instance which is configured with instance-profile (no keys). 回答1: The best way is via "Security Token Service": var AWS = require('aws-sdk'); // Load credentials and set region from JSON file AWS.config.loadFromPath('./config.json'); var sts = new AWS.STS(); sts.getCallerIdentity({}, function(err, data) { if (err) {

Finding my AWS account ID using JavaScript

可紊 提交于 2020-12-29 10:15:05
问题 How do I find my AWS account ID using JavaScript/NodeJS? Should work when explicitly providing keys for a root-account or IAM user. Should also work when invoked inside of an ec2-instance which is configured with instance-profile (no keys). 回答1: The best way is via "Security Token Service": var AWS = require('aws-sdk'); // Load credentials and set region from JSON file AWS.config.loadFromPath('./config.json'); var sts = new AWS.STS(); sts.getCallerIdentity({}, function(err, data) { if (err) {

Finding my AWS account ID using JavaScript

我怕爱的太早我们不能终老 提交于 2020-12-29 10:15:04
问题 How do I find my AWS account ID using JavaScript/NodeJS? Should work when explicitly providing keys for a root-account or IAM user. Should also work when invoked inside of an ec2-instance which is configured with instance-profile (no keys). 回答1: The best way is via "Security Token Service": var AWS = require('aws-sdk'); // Load credentials and set region from JSON file AWS.config.loadFromPath('./config.json'); var sts = new AWS.STS(); sts.getCallerIdentity({}, function(err, data) { if (err) {

EC2: Waiting until a new instance is in running state

元气小坏坏 提交于 2020-12-29 09:27:46
问题 I would like to create a new instance based on my stored AMI. I achieve this by the following code: RunInstancesRequest rir = new RunInstancesRequest(imageId,1, 1); // Code for configuring the settings of the new instance ... RunInstancesResult runResult = ec2.runInstances(rir); However, I cannot find a wait to "block"/wait until the instance is up and running apart from Thread.currentThread().sleep(xxxx) command. On the other hand, StartInstancesResult and TerminateInstancesResult gives you

How to send webcam video to Amazon AWS EC2 Instance

馋奶兔 提交于 2020-12-29 07:57:47
问题 Suppose I want to stream video captured by my webcam to an Amazon AWS EC2 Instance for the purposes of image processing in the cloud. How would one do this? The only means for file transfer that I am aware of, is scp to copy files to the remote host. I have no idea where to begin in regards to streaming video to AWS EC2. Google turned up nothing for me. Any ideas? 回答1: Here is what worked. There are likely many other methods. 1) Create a free tier Amazon AWS EC2 instance with Ubuntu Server 16

How to send webcam video to Amazon AWS EC2 Instance

十年热恋 提交于 2020-12-29 07:57:27
问题 Suppose I want to stream video captured by my webcam to an Amazon AWS EC2 Instance for the purposes of image processing in the cloud. How would one do this? The only means for file transfer that I am aware of, is scp to copy files to the remote host. I have no idea where to begin in regards to streaming video to AWS EC2. Google turned up nothing for me. Any ideas? 回答1: Here is what worked. There are likely many other methods. 1) Create a free tier Amazon AWS EC2 instance with Ubuntu Server 16

How can I get list of only running instances when using ec2-describe-tags

a 夏天 提交于 2020-12-29 04:58:17
问题 How can I get list of only running instances when using ec2-describe-tags . I am using my command like this: ec2-describe-tags --filter "resource-type=instance" --filter "value=somevalue" --filter "key=key" 回答1: It is easy using the aws-cli: aws ec2 describe-instances --query 'Reservations[*].Instances[*].[InstanceId]' --filters Name=instance-state-name,Values=running --output text 回答2: Expanding on John Rotenstein's answer you can definitely do this with describe-instances. This will list

Can I set ~/.ssh/config to look up dynamic EC2 hostnames?

霸气de小男生 提交于 2020-12-13 10:36:51
问题 I have an EC2 instance on a dynamic IP, and it isn't doing any sort of DDNS to keep a public hostname pointed at it. I'd like to set up a shortcut in my ssh_config for the server, and ask aws to tell me what the IP or hostname is. $ aws ec2 describe-instances \ --filters Name=key-name,Values=FOO \ --query 'Reservations[*].Instances[*].PublicDnsName' \ --output 'text' ec2-XXX-XXX-XXX-XXX.compute-X.amazonaws.com But I can't work out how to delegate the public IP or hostname resolution out to