Showing posts with label AWS. Show all posts
Showing posts with label AWS. Show all posts

Wednesday, July 15, 2015

Unable to SSH to new AWS servers, until: route table

Symptoms: I've had an AWS account for years, and I went back and created some instances this past week but then I couldn't access them (via SSH: "Operation timed out"). One oddity was that my old instances had no VPC ID, but every new instance had one (and the VPC was created if none existed).

Solution: I found this troubleshooting guide for connecting, and I followed the step on route tables and added a route with a destination of 0.0.0.0/0 and target of igw... (which is auto-filled with my internet gateway ID).

I've never had to do this before.  Hopefully I'll remember!

Tuesday, May 5, 2015

PermanentRedirect when accessing AWS S3 bucket

When running this on the command-line:
aws s3 ls s3://my-bucket/
I kept getting this error:
A client error (PermanentRedirect) occurred when calling the ListObjects operation: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.
The problem was that my region wasn't set. I did this to fix it:
export AWS_DEFAULT_REGION=us-west-2
This is a pretty stupid situation: when using the web console, the S3 service says that there's no need to choose a region, and it won't even let you select one. But obviously it's very important for configurations. Dumb.

Thursday, September 4, 2014

Solutions for Vagrant deployment to AWS


Here are a bunch of notes from troubleshooting Vagrant out to AWS:





An active machine was found with a different provider. Vagrant currently allows each machine to be brought up with only a single provider at a time. A future version will remove this limitation. Until then, please destroy the existing machine to up with a new provider. Machine name: default Active provider: virtualbox Requested provider: aws

 ... yep, destroy it



<br /><span style="font-family: Arial, Helvetica, sans-serif;">Here are a bunch of old notes on errors I got while trying to use Vagrant with AWS.</span><br /> The box you're attempting to add doesn't support the provider you requested. Please find an alternate box or use an alternate provider. Double-check your requested provider to verify you didn't simply misspell it. Name: hashicorp/precise64 Address: https://vagrantcloud.com/hashicorp/precise64 Requested provider: [:aws] ... change to the dummy box There was an error talking to AWS. The error message is shown below: UnauthorizedOperation =&gt; You are not authorized to perform this operation. ... IAM... had to make user with that key ID have power access




==&gt; default: Warning! Vagrant might not be able to SSH into the instance. ==&gt; default: Please check your security groups settings. /Users/tlarson/.vagrant.d/gems/gems/excon-0.39.5/lib/excon/middlewares/expects.rb:6:in `response_call': The image id '[ami-21e6e964]' does not exist (Fog::Compute::AWS::NotFound) from /Users/tlarson/.vagrant.d/gems/gems/excon-0.39.5/lib/excon/middlewares/response_parser.rb:8:in `response_call' from /Users/tlarson/.vagrant.d/gems/gems/excon-0.39.5/lib/excon/connection.rb:363:in `response' from /Users/tlarson/.vagrant.d/gems/gems/excon-0.39.5/lib/excon/connection.rb:233:in `request' from /Users/tlarson/.vagrant.d/gems/gems/fog-1.23.0/lib/fog/xml/sax_parser_connection.rb:35:in `request' ... had to find an AMI, in the right zone ==&gt; default: Warning! Vagrant might not be able to SSH into the instance. ==&gt; default: Please check your security groups settings. /Users/tlarson/.vagrant.d/gems/gems/excon-0.39.5/lib/excon/middlewares/expects.rb:6:in `response_call': The key pair 'halfpricedgranite-workbook' does not exist (Fog::Compute::AWS::NotFound) from /Users/tlarson/.vagrant.d/gems/gems/excon-0.39.5/lib/excon/middlewares/response_parser.rb:8:in `response_call' from /Users/tlarson/.vagrant.d/gems/gems/excon-0.39.5/lib/excon/connection.rb:363:in `response' from /Users/tlarson/.vagrant.d/gems/gems/excon-0.39.5/lib/excon/connection.rb:233:in `request' from /Users/tlarson/.vagrant.d/gems/gems/fog-1.23.0/lib/fog/xml/sax_parser_connection.rb:35:in `request' ... again, in the right zone ==&gt; default: Waiting for instance to become "ready"... ==&gt; default: Waiting for SSH to become available... ^C ... because networking is restricted: security_groups ... and may want to name it