ec2

How Can I Download a File from EC2 [closed]

匿名 (未验证) 提交于 2019-12-03 02:44:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: What scp arguments should I use to download a file from an Amazon EC2 instance to local storage? 回答1: Use scp: scp -i ec2key.pem username@ec2ip:/path/to/file . where: ec2key.pem is your PEM key username is the username you log in with ec2ip is the IP or DNS alias of the instance /path/to/file is the location where the file is stored This will copy the file into the current folder on the local machine. You can read more here on how to access your instance with ssh if you haven't done already: http://docs.aws.amazon.com/gettingstarted/latest

/usr/bin/env bad interpreter

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Trying to get Amazon's EC2 command line tools to work. This is what my .bash_profile looks like. I get the error: /users/zmjones/.ec2/bin/ec2-add-keypair: /usr/bin/env: bad interpreter: Operation not permitted PATH=/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/bin:$PATH PATH=/opt/local/sbin:/usr/local/bin:/usr/x11/bin:/usr/texbin:$PATH PATH=/usr/local/texlive/2011/bin/x86_64-darwin:$PATH PATH=/Library/Frameworks/EPD64.framework/Versions/Current/bin:$PATH EC2_HOME=~/.ec2 PATH=$PATH:$EC2_HOME/bin EC2_PRIVATE_KEY=`ls $EC2_HOME/pk-*.pem` EC2_CERT=`ls

Shutdown EC2 instances that do not have a certain tag using Python

匿名 (未验证) 提交于 2019-12-03 02:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using this script by mlapida posted here: https://gist.github.com/mlapida/1917b5db84b76b1d1d55#file-ec2-stopped-tagged-lambda-py The script by mlapida does the opposite of what I need, I'm not that familiar with Python to know how to restructure it to make this work. I need to shutdown all EC2 instances that do not have a special tag identifying them. The logic would be: 1.) Identify all running instances 2.) Strip out any instances from that list that have the special tag 3.) Process the remaining list of instances to be shutdown Any

Curl fails on sftp password authentication

匿名 (未验证) 提交于 2019-12-03 02:33:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When I manually sftp using username and password it works fine, when using curl it fails. The same script will successfully connect to other servers with no problem. Because I can manually log in and other clients don't have a problem the server admins aren't much help. Here is the curl failed attempt: curl -v --insecure --user username:password sftp://someurl.com * Trying 199.187.***.***... * Connected to someurl.com (199.187.***.***) port 22 (#0) * SSH MD5 fingerprint: 6831eae63f230952a1775e0f67f80e7b * SSH authentication methods available

Curl amazon EC2 instance

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a web server running on an Ubuntu Amazon EC2 instance at port 3000. 15.0.0.10 is the private ip of this EC2 instance. After I ssh into this instance and run the following command curl localhost:3000/index.html , it returns me the html source of my index.html page. But when I run curl 15.0.0.10:3000/index.html , it says : curl: (7) couldn't connect to host Why is this happening ? What can I do to make the second command also return the content? 回答1: You need to ensure that the server is running on 0.0.0.0 if you need it to be reachable

How to find OS of an EC2 instance using AWS CLI

匿名 (未验证) 提交于 2019-12-03 02:26:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: How can you find out the OS running on an EC2 instance using AWS CLI. The ec2 describe-instance command spits out a lot of information , but there is nothing indicating the OS . I also tried ec2 describe-images on a specific image. Again, there doesn't seem to be any indication of OS. Help..? 回答1: Here's a quick way to list the Platform field, which at least distinguishes between Windows and Linux: aws ec2 describe-instances --query 'Reservations[*].Instances[*].[InstanceId,Platform]' --output text i-78b4ef47 windows i-b8ae3386 windows i

Ruby on Rails: permission denied when using “rails generate controller welcome”

匿名 (未验证) 提交于 2019-12-03 02:16:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I used Ruby on Rails on Red Hat server. When I trying to generate a controller file, I got this error: [ec2-user@ip-172-31-22-128 testApp4]$ rails generate controller welcome /home/ec2-user/.rvm/gems/ruby-2.1.2/gems/spring-1.1.3/lib/spring/server.rb:22:in `initialize': Permission denied @ rb_sysopen - /tmp/spring/fea371aaf9d69cfa58bd12f69b3f1bf6.pid (Errno::EACCES) from /home/ec2-user/.rvm/gems/ruby-2.1.2/gems/spring-1.1.3/lib/spring/server.rb:22:in `open' from /home/ec2-user/.rvm/gems/ruby-2.1.2/gems/spring-1.1.3/lib/spring/server.rb:22:in

Add EBS to Ubuntu EC2 Instance

匿名 (未验证) 提交于 2019-12-03 02:16:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm having problem connecting EBS volume to my Ubuntu EC2 Instance. Here's what I did: From the Amazon AWS Console, I created a EBS 150GB volume and attached it to an Ubuntu 11.10 EC2 instance. Under the EBS volume properties, "Attachment" shows: "[my Ubuntu instance id]:/dev/sdf (attached)" Tried mounting the drive on the Ubuntu box, and it told me "mount: /dev/sdf is not a block device" sudo mount /dev/sdf /vol So I checked with fdisk and tried to mount from the new location and it told me it wasn't the right file system. sudo

How to deploy with Gitlab-Ci to EC2 using AWS CodeDeploy/CodePipeline/S3

匿名 (未验证) 提交于 2019-12-03 02:16:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've been working on a SlackBot project based in Scala using Gradle and have been looking into ways to leverage Gitlab-CI for the purpose of deploying to AWS EC2. I am able to fully build and test my application with Gitlab-CI. How can I perform a deployment from Gitlab-CI to Amazon EC2 Using CodeDeploy and CodePipeline? Answer to follow as a Guide to do this. 回答1: I have created a set of sample files to go with the Guide provided below. These files are available at the following link: https://gitlab.com/autronix/gitlabci-ec2-deployment

Opening port 80 EC2 Amazon web services [closed]

匿名 (未验证) 提交于 2019-12-03 01:58:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've opened port 80 in the web console on my E2C instance's security group but I still can't access it via the public dns in the browser. Any ideas? 回答1: This is actually really easy: Go to the "Network & Security" -> Security Group settings in the left hand navigation Find the Security Group that your instance is apart of Click on Inbound Rules Use the drop down and add HTTP (port 80) Click Apply and enjoy 回答2: Some quick tips: Disable the inbuilt firewall on your Windows instances. Use the IP address rather than the DNS entry. Create a