Hot answers tagged

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


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


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


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


3

If all your servers are in the same AWS account then you should be able to go to the console and paste the IP into the EC2 console. Otherwise you'll need to iterate through all of your accounts to see which has that IP allocated. Alternatively AWS support might be able to more quickly tell you which account owns that IP so you can shorten your search.


3

No, you can't do it. You can only route Amazon IPs to AWS instances.


3

Your problem seems to be that you have have given the third party a copy of the private key that is used to access the server. You could just disable access for that private key, but it would seem that other people are also using it, so your Network Administrator doesn't want to do that. You really should have asked the 3rd party to generate their own key ...


3

Use EC2 instances behind an ELB. Upon launch, your nodes should download and install the latest security updates and do whatever other configuration is necessary to get your application running. As for cycling out your instances, once a day: Create a second EC2 node Wait for it to configure itself and become available Add the second node to the ELB ...


2

To correct it afterwards, spin down your original server, spin up a new with auto assign public IP enabled and the existing volumes attached. You can then discard the original instance.


2

Despite AWS claiming that ELB supports all HTTP verbs as of late 2013, I am experiencing the same issue and have had to settle for using TCP forwarding to get BITS uploads to work through the ELB. Details: I have two Server 2012 R2 VMs, one on an vSphere 5.5 cluster at a colo (VM1), the other at AWS (VM2), both fully patched as of 6/1/2016. VM1 utilizes ...


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


2

The systemd service file for OpenVPN (/lib/systemd/system/openvpn@.service) must be updated with a After=network.target network-online.target entry: [Unit] Description=OpenVPN connection to %i PartOf=openvpn.service ReloadPropagatedFrom=openvpn.service Before=systemd-user-sessions.service After=network.target network-online.target # This is needed ...


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


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


2

You will almost certainly want to raise the keepalive timer per the ELB recommendation, because ELB reuses connections. It will hold them until the timeout expires and if another request arrives at the ELB, it will often use one of the already open connections to send it to you. 504 Gateway Timeout is an odd error for this condition but it appears that's ...


1

You can't change the instance type of a running instance. You need to shutdown the instance in order to change the instance type. However you can resize EBS volumes attached to an running instance. The best and risk free way of migration to another instance type is to setup a new instance, deploy the environment and change the elastic ip when the setup is ...


1

Not sure about your environment, just as a hint: Is the machine in question publicly reachable? If so, implement authentication / authorization, or use a VPN. If this is valid, how can I fix the error "Too many open files"? Probably, because it's listening to that many ports, your nginx, runs against limits, specifically the ones dealing with file ...


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


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


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

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


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


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


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


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.


1

The easiest way to deal with rogue instances is to Stop them Create a new instance in the same region and same zone (i.e., us-east-1b), t2.micro is fine for this Detach the volume from the rogue instance (helps to name it) Attach that volume to the new instance (just like plugging in a new disk drive) Log into your new instance Mount the volume and ...


1

requests to www.mydomain.com/blabla... will be redirected to the same mydomain but without the www This is done by creating an empty bucket in S3 named www.example.com, configuring it to redirect all requests to a different hostname (example.com) and pointing DNS at it. If you want it to support https request redirection on the www side, you create a ...


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


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



Only top voted, non community-wiki answers of a minimum length are eligible