Questions tagged [amazon-web-services]

Amazon Web Services (AWS) is a cloud service that offers IaaS (Infrastructure as a Service) and SaaS (Software as a Service) solutions. Only questions about programming in relation to AWS are on-topic. General server help can be obtained at https://serverfault.com. The AWS tag is rarely used alone and will usually be used with other tags to more clearly define the topic of the question.

If you need help setting up AWS resources, ask those questions on Server Fault.

AWS is a cloud service that offers IaaS (Infrastructure as a Service) and SaaS (Software as a Service).

SDKs to access and manage Amazon Web Services are provided in a multitude of programming languages, including PHP, Java, .NET, Node.js, Python, and more. The services are also accessible through REST and SOAP APIs, a command-line interface, and a web console.

Resources:

Related Tags

154810 questions
363
votes
22 answers

EC2 instance has no public DNS

A guy I work with gave me the EC2 credentials to log onto his EC2 console. I was not the one who set it up. Some of the instances show a public dns name and others have a blank public DNS. I want to be able to connect to the instances that have a…
user1456508
  • 3,761
  • 2
  • 15
  • 11
360
votes
17 answers

SSH to Elastic Beanstalk instance

I just signed up for Amazon's new Elastic Beanstalk offering. What I can't figure out is how to SSH to a Beanstalk instance. I don't have a private key because Beanstalk generated the instance on my behalf.
Thomas D
  • 3,705
  • 3
  • 15
  • 4
359
votes
5 answers

How to safely upgrade an Amazon EC2 instance from t1.micro to large?

I have an Amazon EC2 micro instance (t1.micro). I want to upgrade this instance to large. This is our production environment, so what is the safest way to do this? Is there any step by step guide to do this?
gandil
  • 5,398
  • 5
  • 24
  • 46
359
votes
21 answers

Listing contents of a bucket with boto3

How can I see what's inside a bucket in S3 with boto3? (i.e. do an "ls")? Doing the following: import boto3 s3 = boto3.resource('s3') my_bucket = s3.Bucket('some/path/') returns: s3.Bucket(name='some/path/') How do I see its contents?
Amelio Vazquez-Reina
  • 91,494
  • 132
  • 359
  • 564
355
votes
29 answers

Permission denied (publickey) when SSH Access to Amazon EC2 instance

I want to use my Amazon ec2 instance but faced the following error: Permission denied (publickey). I have created my key pair and downloaded .pem file. Given: chmod 600 pem file. Then, this command ssh -i…
Kashiftufail
  • 10,815
  • 11
  • 45
  • 79
342
votes
25 answers

check if a key exists in a bucket in s3 using boto3

I would like to know if a key exists in boto3. I can loop the bucket contents and check the key if it matches. But that seems longer and an overkill. Boto3 official docs explicitly state how to do this. May be I am missing the obvious. Can anybody…
Prabhakar Shanmugam
  • 5,634
  • 6
  • 25
  • 36
340
votes
28 answers

Cannot ping AWS EC2 instance

I have an EC2 instance running in AWS. When I try to ping from my local box it is not available. How can I make the instance pingable?
santosh s
  • 3,429
  • 2
  • 13
  • 5
334
votes
10 answers

How do you add swap to an EC2 instance?

I'm currently running an ec2 micro instance and i've been finding that the instance occasionally runs out of memory. Other than using a larger instance size, what else can be done?
ajtrichards
  • 29,723
  • 13
  • 94
  • 101
329
votes
13 answers

boto3 client NoRegionError: You must specify a region error only sometimes

I have a boto3 client : boto3.client('kms') But it happens on new machines, They open and close dynamically. if endpoint is None: if region_name is None: # Raise a more specific error message that will give #…
WebQube
  • 8,510
  • 12
  • 51
  • 93
327
votes
22 answers

How to rename files and folder in Amazon S3?

Is there any function to rename files and folders in Amazon S3? Any related suggestions are also welcome.
Shanmugam
  • 3,452
  • 2
  • 14
  • 15
325
votes
18 answers

S3 Static Website Hosting Route All Paths to Index.html

I am using S3 to host a javascript app that will use HTML5 pushStates. The problem is if the user bookmarks any of the URLs, it will not resolve to anything. What I need is the ability to take all url requests and serve up the root index.html in my…
Mark Nutter
  • 5,449
  • 4
  • 15
  • 12
323
votes
20 answers

How to yum install Node.JS on Amazon Linux

I've seen the writeup on using yum to install the dependencies, and then installing Node.JS & NPM from source. While this does work, I feel like Node.JS and NPM should both be in a public repo somewhere. How can I install Node.JS and NPM in one…
Tim Fulmer
  • 14,970
  • 7
  • 28
  • 34
323
votes
2 answers

Make a bucket public in Amazon S3

How can I set a bucket in Amazon S3 so all the files are publicly read-only by default?
Victor
  • 23,172
  • 30
  • 86
  • 125
311
votes
10 answers

How to handle errors with boto3?

I am trying to figure how to do proper error handling with boto3. I am trying to create an IAM user: def create_user(username, iam_conn): try: user = iam_conn.create_user(UserName=username) return user except Exception as e: …
SQDK
  • 3,987
  • 3
  • 18
  • 16
308
votes
20 answers

AWS ssh access 'Permission denied (publickey)' issue

How to connect to a AWS instance through ssh? I have: Signed up at AWS; Created a public key and a certificate at AWS website and saved them to disk; Went to my console and created environment variables: $ export…
Alex
  • 43,191
  • 44
  • 96
  • 127