New answers tagged

0

You have two options: Re-build the server from scratch and restore data from your backups. Attach the root EBS volume from the hung instance to another EC2 instance, mount it, then poke around and fix whatever is broke. Honestly if I were you, I'd just do #1. If you aren't able to do #1, then that's a huge red flag, and you should prioritize being able ...


0

This is a designed-in limitation: If either VPC in a peering relationship has one of the following connections, you cannot extend the peering relationship to that connection: A VPN connection or an AWS Direct Connect connection to a corporate network http://docs.aws.amazon.com/AmazonVPC/latest/PeeringGuide/invalid-peering-configurations....


0

A coworker pointed me to this blog post, it helped out properly installing cmu sphinx and its dependencies. http://jrmeyer.github.io/installation/2016/01/09/Installing-CMU-Sphinx-on-Ubuntu.html


0

Force detach the system volume. Then you will be able to stop instance. Re-attach volume and start instance. Viola!


1

No one will fake your IP range to get pass a firewall. The only way to do this is easily if your app is all UDP. That said just allowing your office's IP in is the first start. You might want to expand on that as the company grows. Like does everyone in the office need access to the whole AWS VPC? If not then you are looking at site to site VPN connection ...


0

Using the following dummy names: source MySQL = ec2-source.compute-1.amazonaws.com, ip-source.ec2.internal external MySQL wanting access = ec2-external.compute-1.amazonaws.com, ip-external.ec2.internal To create a user that can access the source from external with read-only permissions, while limiting access to the IP of your external machine, run this on ...


0

I have found the cause of this. My Ansible playbook was removing a package from Ubuntu called "unattended-upgrades" which presumably the Amazon utilities use. Likewise, my second playbook was removing the ubuntu user. The Amazon utility may also use that. When I disable these roles, the AMI works with user data as expected.


0

I know i can block them on nginx level You should do that. In fact, you should have already been doing that in your own interests -- nginx or any front-side service with the capability, should be configured to throw back errors (503, 502, pick your poison) on any unexpected host header coming in. Since the domain in question does not seem to be ...


0

Looks like you have a new server, and it's IP earlier belonged to as.eu.angsrvr.com. The reason why you still receiving those requests is that either the visitors have the IP cached in their DNS (usually it should expire in less than two days) or the IP is hard-coded in configs (good lesson how NOT to do configs) Another reason is admin at angsrvr.com ...


0

# sudo adduser USERNAME # sudo passwd USERNAME Edit /etc/ssh/sshd_config : PasswordAuthentication yes Then do # sudo service ssh restart


0

[ec2_master].compute.amazonaws.com looks like the hostname for a public IP address. You should be using the private IP address of the EC2 machine, inside VPC. RDS instances may not have access to the VPC's DNS resolver, which would otherwise cause the public hostname to resolve to the private IP address for queries that originate from inside, if the VPC is ...


-1

we solved it commenting out the Ciphers line on /etc/ssh/ssh_config


3

Instead of trying to dereference the AWSELB cookie, instead, have the EC2 instance tell you it's instance ID. When your web server is processing a request: Get the instance ID from the EC2 instance metadata: http://169.254.169.254/latest/meta-data/instance-id Include the instance ID in a header returned to the client. On the client, inspect the response ...


4

Is my VPC isolated from other clients/accounts? In short: Yes. You get your own network that is logically separated from from the other AWS customers and whatever (RFC1918 or other) ip-address range you decide on using, within that VPC you don't share ip-addresses with anybody else. See this introduction. Would it be possible for other EC2 instances ...


1

On your instance, run host ec2-123-123-123-123.eu-central-1.compute.amazonaws.com (your instance's public DNS hostname). See that it does not, in fact, resolve to 123.123.123.123, but rather to an RFC 1918 address (probably 10.x.x.x)? Amazon uses split-view DNS, so the hostname resolves to the public IP outside the region/VPC, but resolves to the private ...


0

There were three problems: You need information from another server to use in the current server you're configuring. The other server you need information from is hosted in AWS. The other server you need to access information about has a variable name. The solution to 3 is to specify the variable in the command line using extra-vars like so: ansible-...


1

Here's the explanation on how you can perform the upgrade. http://docs.aws.amazon.com/cli/latest/userguide/installing.html Here's what did the job for me: To install the AWS CLI using the bundled installer Download the AWS CLI Bundled Installer using wget or curl. Unzip the package. Run the install executable. On Linux and OS X, here are the three ...


0

For some reason, the Registered KMS Machine name wasn't set. When I ran: slmgr /dlv There was no "Key Management Service client information" section. The fix then, was to run the following to manually set a KMS: slmgr /skms 169.254.169.250:1688 After which, you can activate windows again with the following: slmgr /ato


0

Answering my own question. When you are creating volume from EC2 Management Console, it allows you to specify the size in GiBs. It also calculates and shows IOPS for the newly created volume. If you specify volume size above 30 GiB, it shows IOPS by using the formula: your_specified_size * 3 = IOPS If you specify size smaller than 30 GiB, it still shows ...


3

AWS does not provide either of your requirements, certainly not as an IAM policy. AWS does not track how many instances a specific user has created AWS will not terminate instances for you after a set period of time You can create an IAM policy that will limit creation to a single region/AZ, but you can't limit the number of instances that user has ...


0

If you have a robust application running on multiple servers. I highly advise utilizing New Relic for server monitoring https://newrelic.com/


0

@smoser from the irc #cloud-init helped me look in /var/lib/cloud/instance/scripts/ you'll see one file named runcmd and the other files that are in your multipart are named by their filename. The scripts in that directory are run in C locale sorted order (as if by runparts) So if you change the name of the script you've added from filename="00-...


1

I received confirmation from Amazon that a vCPU is in fact a single hyperthread on a single core. On a side note, this was news to the software vendor we were working with (one of the biggest enterprise companies out there) and they were nice enough to adjust the terms of the licenses for software running in AWS environments.


1

It's still consuming credits, it's just getting new credits at the same rate or faster than it uses them up. One CPU credit is equal to one vCPU running at 100% utilization for one minute. Other combinations of vCPUs, utilization, and time are also equal to one CPU credit; for example, one vCPU running at 50% utilization for two minutes or two vCPUs ...


2

I have created a script that may be helpful for creating swap on ephemeral devices. It uses lvm to create the swap volume and also creates a volume that might be useful as /tmp. You could use cloud-init to trigger it. bootcmd: - [ cloud-init-per, once, mk-eph, /usr/local/sbin/mk-eph.sh] # Filesystem setup fs_setup: - label: 'tmp' filesystem: 'xfs' ...


1

In the top right of the console window, click the drop-down where it currently should say "Oregon" and choose the region you want, before starting the process to launch the instance. Most AWS services are very strictly regional. When you work in a region, you're dealing with resources completely isolated to that region and independent of any centralized ...


1

When working in the AWS Management Console, or the AWS CLI tool, you are always working in one specific region. In your case, you're working in the us-west-2 region (Oregon). To make the availability zone choices you want, you need to change the region you're working in. For the AWS Management Console, choose the region by selecting it from the region menu ...


0

Does every EC2 instance has "Instance Store Volume"? No, they do not. Only certain Instance type can be allocated instance stores. See the EC2 Instance Types page. Many types listed there are "EBS Only" (including the t2.micro that you are trying to create), meaning instance store volumes are not possible.


0

The following steps worked for me Step 1. Create snapshot of root ebs volume and create new volume from snapshot (let's call this volume-copy) Step 2. Create new instance with ebs root volume with desired size. (let's call this volume-resized) This ebs volume will have the correct partition for booting. (Creating a new ebs volume from scratch didn't ...


0

try running fdisk -l just to make sure /def/sdf is the actual block name, so probably it should mount with: sudo mount /dev/sdf1 /vol-a


0

It would not surprise me at all if this is Dropbox. You have to stay awake long enough (not easy when reading most of what qualifies as cloud-related "news") to find this nugget in the article @ceejayoz linked to: Despite those accidents and everything else, Dropbox made its deadline. And it dropped those contracts with Amazon. The company continues to ...


0

What ended up working for me was to create a directory for the .p12 key and giving ownership of the directory and key to the nodejs user. sudo mkdir -p /etc/foo sudo chown nodejs /etc/foo sudo chmod 700 /etc/foo sudo cp my_key.p12 /etc/foo sudo chown nodejs /etc/foo/my_key.p12 sudo chmod 600 /etc/foo/my_key.p12


0

Using pssh could be a good solution. Here is an example. pssh -i -h /root/spark-ec2/slaves dir The dir command will run on all slaves. pssh comes preinstalled on all cluster.


2

The connections you see could simply be web pages employees are surfing that are run from or supported off of AWS or an employee is connecting to their own AWS servers. I have seen a lot where people want to learn about AWS and they do not limit their learning to off company work hours or the company's IT department hasn't met some need of theirs and they ...


1

In response to your original question, you could install mpssh- Mass Parallel SSH and use it to run commands on all your instances. The first time you run it, you may need to type "yes" 150 times, unless you want to ignore host key checking.


1

The IPs of the servers are part of the discoverable facts about the hosts. These facts are retrieved automatically when you run a playbook, unless you explicitly disable gather_facts. And even then, you can explicitly use the setup module to collect facts. This values can then be used in the next tasks. As an example: $ ansible -c local -m setup -a '...


2

You could do this with EC2 Run Command if you have that agent installed, though it may be a better fit for something like a Cloud-Init configuration that you put in the user-data for each instance. Alternatively consider using AWS OpsWorks to configure the nodes as desired at boot time, or generate a golden image with Packer such that the config is placed ...


1

Try using s3-cli instead of s3cmd. I used it instead of s3cmd to upload files to my s3 bucket and it made my deployment faster almost by 17 minutes (from 21 to 4 minutes)! Here's the link : https://github.com/andrewrk/node-s3-cli


1

Recapitulating my prior comment, AWS will not restart a stopped instance on its own. AWS Cloudtrail is the place to look for who/what made the API call to restart the instance.


0

We have found a viable solution: Use Vault or similar to manage the actual secrets, grouped by role, with short keys to unlock each set of secrets. Automate Instance creation with something scriptable (ie: Cloudformation, Terraform, aws cli), as part of the creation script... create and populate a short-lived S3 bucket with the Vault key provide a ...


0

Yes. If you have access to a secure host X, but you need to access to vast, but potentially insecure, computing resources at Y, you can use homomorphic encryption on the data. In this way, computations can be carried out on Y, without ever leaking data from X.


0

By modifying the Cipher suites, I accidentally disallowed RDP connections to my EC2 instance, and there is no way to gain access via RDP to that instance as a result. I had to terminate the instance, and create a new EC2 instance from scratch and set it up how I needed it. Let this be a lesson, if you are making any system changes to an EC2 instance, to ...


1

You could create a Virtual LAN (VLAN) for the VPN users. Then you would configure the VPN router to deny access to specific ports/IP addresses/domain. You could also configured the EC2 instance to allow access based on the users IP address: "IpAddress": { "aws:SourceIp": "xxx.xxx.xxx.xxx/24" } Found that here: http://blogs.aws....


0

You can use auto-scaling with 'max instances' set to 1. If the only server fails, it'll be terminated and new server created in different or the same AZ, but only in the same region. If http healthcheck isn't enough then you can create a custom one. Make sure you have all necessary data on s3 or somewhere else and that you are deploying the data during ...


0

Double check in Amazon Web Services the followings settings for your instance: Security Group for your instance is allowing Inbound SSH access (check: view rules). For VPC instance, check its attached Route table which should have 0.0.0.0/0 as Destination and your Internet Gateway as Target. Double check your route info in System Log in Networking of the ...


0

Log-in to Amazon Web Services and check the followings: Security Group for your instance is allowing Inbound SSH access (check: view rules). For VPC instance, check its attached Route table which should have 0.0.0.0/0 as Destination and your Internet Gateway as Target. Double check your route info in System Log in Networking of the instance. For more ...


-1

The only substantial difference between Amazon Linux and CentOS is that Amazon Linux has its own RPM repos (hosted by Amazon) so you may find that versions of software that are available in CentOS are not available in Amazon Linux. This isn't that frequent that it would cause a problem for standard usage situations. On the other hand, Amazon Linux is ...


-1

It is really similar to RH/CentOS, so most solutions will work fine. Besides paid support, you can also try on their forums, but form my experience it's quite difficult to get response there in reasonable amount of time.


0

As pointed here all you need to do is remove us-east-1.ec2 from the URL. sudo sed -i 's/us-east-1\.ec2\.//g' /etc/apt/sources.list


3

You can use -W option when creating the array. From the manual: -W, --write-mostly subsequent devices listed in a --build, --create, or --add com‐ mand will be flagged as 'write-mostly'. This is valid for RAID1 only and means that the 'md' driver will avoid reading from these devices if at all ...



Top 50 recent answers are included