Skip to main content
The 2024 Developer Survey results are live! See the results

AWS Collective

Questions

Browse questions with relevant AWS tags

260,226 questions

1112 votes
42 answers
901k views

Downloading an entire S3 bucket?

I noticed that there does not seem to be an option to download an entire s3 bucket from the AWS Management Console. Is there an easy way to grab everything in one of my buckets? I was thinking about ...
rugbert's user avatar
  • 12.4k
998 votes
43 answers
733k views

"UNPROTECTED PRIVATE KEY FILE!" Error using SSH into Amazon EC2 Instance (AWS) [closed]

I've created a new linux instance on Amazon EC2, and as part of that downloaded the .pem file to allow me to SSH in. When I tried to ssh with: ssh -i myfile.pem <public dns> I got: @@@@@@@@@@@@@...
Matt Roberts's user avatar
  • 26.7k
473 votes
37 answers
329k views

How to get an AWS EC2 instance ID from within that EC2 instance?

How can I find out the instance id of an ec2 instance from within the ec2 instance?
flybywire's user avatar
  • 270k
305 votes
69 answers
593k views

Amazon S3 - How to fix 'The request signature we calculated does not match the signature' error?

I have searched on the web for over two days now, and probably have looked through most of the online documented scenarios and workarounds, but nothing worked for me so far. I am on AWS SDK for PHP V2....
Joseph Lam's user avatar
  • 5,879
545 votes
23 answers
615k views

Change key pair for ec2 instance

How do I change the key pair for my ec2 instance in AWS management console? I can stop the instance, I can create new key pair, but I don't see any link to modify the instance's key pair.
Michael Chen's user avatar
  • 5,558
289 votes
51 answers
233k views

Can't push image to Amazon ECR - fails with "no basic auth credentials"

I'm trying to push a docker image to an Amazon ECR registry. I'm using docker client Docker version 1.9.1, build a34a1d5. I use aws ecr get-login --region us-east-1 to get the docker login creds. Then ...
Alec Rooney's user avatar
  • 3,163
511 votes
23 answers
503k views

How to pass a querystring or route parameter to AWS Lambda from Amazon API Gateway

for instance if we want to use GET /user?name=bob or GET /user/bob How would you pass both of these examples as a parameter to the Lambda function? I saw something about setting a "mapped from" ...
MonkeyBonkey's user avatar
  • 47.4k
321 votes
34 answers
403k views

S3 - Access-Control-Allow-Origin Header

Did anyone manage to add Access-Control-Allow-Origin to the response headers? What I need is something like this: <img src="http://360assets.s3.amazonaws.com/tours/8b16734d-336c-48c7-95c4-...
Wowzaaa's user avatar
  • 3,980
456 votes
25 answers
297k views

Is there a way to list all resources in AWS

Is there a way to list all resources in AWS? For all regions, all resources.. Such as list all EC2 instances, all VPCs, all APIs in API Gateway, etc... I would like to list all resources for my ...
Lakin Lu's user avatar
  • 4,796
738 votes
9 answers
320k views

What is the difference between Amazon SNS and Amazon SQS?

When would I use SNS versus SQS, and why are they always coupled together?
Nick Ginanto's user avatar
  • 31.8k
463 votes
22 answers
316k views

Can an AWS Lambda function call another

I have 2 Lambda functions - one that produces a quote and one that turns a quote into an order. I'd like the Order lambda function to call the Quote function to regenerate the quote, rather than just ...
Silver's user avatar
  • 5,021
355 votes
29 answers
776k views

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

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. ...
Kashiftufail's user avatar
  • 10.9k
361 votes
25 answers
392k views

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 ...
Prabhakar Shanmugam's user avatar
500 votes
16 answers
459k views

scp (secure copy) to ec2 instance without password [closed]

I have an EC2 instance running (FreeBSD 9 AMI ami-8cce3fe5), and I can ssh into it using my amazon-created key file without password prompt, no problem. However, when I want to copy a file to the ...
Hoff's user avatar
  • 39.4k
347 votes
28 answers
418k views

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's user avatar
  • 3,499
244 votes
34 answers
285k views

How can I tell how many objects I've stored in an S3 bucket?

Unless I'm missing something, it seems that none of the APIs I've looked at will tell you how many objects are in an <S3 bucket>/<folder>. Is there any way to get a count?
fields's user avatar
  • 4,593
366 votes
22 answers
225k views

EC2 instance has no public DNS [closed]

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 ...
user1456508's user avatar
  • 3,801
375 votes
21 answers
746k views

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='...
Amelio Vazquez-Reina's user avatar
347 votes
22 answers
417k views

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's user avatar
  • 3,652
334 votes
21 answers
237k views

How to yum install Node.js on Amazon Linux

I've seen the write-up on using yum to install the dependencies, and then installing Node.js and NPM from source. While this does work, I feel like Node.js and NPM should both be in a public ...
Tim Fulmer's user avatar
  • 17.9k
232 votes
39 answers
852k views

How can I resolve the error "The security token included in the request is invalid" when running aws iam upload-server-certificate?

I cd into the directory where all the pem/key files are and run the following: aws iam upload-server-certificate --server-certificate-name certificate_name --certificate-body file://...
Killesk's user avatar
  • 3,024
346 votes
24 answers
348k views

AWS S3: The bucket you are attempting to access must be addressed using the specified endpoint

I am trying to delete uploaded image files with the AWS-SDK-Core Ruby Gem. I have the following code: require 'aws-sdk-core' def pull_picture(picture) Aws.config = { :access_key_id =>...
user3575214's user avatar
  • 3,737
339 votes
18 answers
182k views

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 ...
Mark Nutter's user avatar
  • 5,589
364 votes
17 answers
177k views

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 ...
Thomas D's user avatar
  • 3,755
393 votes
14 answers
548k views

Connect to Amazon EC2 file directory using Filezilla and SFTP

I have created an AWS EC2 Instance and I want to be able to upload files to the server directory using FileZilla in the simplest and most straightforward fashion possible.
Eric Brotto's user avatar
  • 54.1k
266 votes
22 answers
490k views

Access denied; you need (at least one of) the SUPER privilege(s) for this operation

So I try to import sql file into rds (1G MEM, 1 CPU). The sql file is like 1.4G mysql -h xxxx.rds.amazonaws.com -u user -ppass --max-allowed-packet=33554432 db < db.sql It got stuck at: ERROR ...
kenpeter's user avatar
  • 7,940
241 votes
29 answers
368k views

Missing Authentication Token while accessing API Gateway?

I am trying to call a Lambda Function through AWS API Gateway. When I mention Authentication type NONE it works fine but API become public and anyone with url can access my API. To make API call ...
Umer Waheed's user avatar
  • 4,454
311 votes
20 answers
332k views

AWS ssh access 'Permission denied (publickey)' issue [closed]

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 ...
Alex's user avatar
  • 44.2k
272 votes
25 answers
479k views

AccessDenied for ListObjects for S3 bucket when permissions are s3:*

I am getting: An error occurred (AccessDenied) when calling the ListObjects operation: Access Denied When I try to get folder from my S3 bucket. Using this command: aws s3 cp s3://bucket-name/...
user1411335's user avatar
  • 3,470
211 votes
33 answers
196k views

Aws ecs fargate ResourceInitializationError: unable to pull secrets or registry auth

I am trying to run a private repository on aws-ecs-fargate-1.4.0 platform. For private repository authentication, I have followed the docs and it was working well. Somehow after updating existing ...
NIrav Modi's user avatar
  • 6,721
409 votes
13 answers
202k views

AWS EFS vs EBS vs S3 (differences & when to use?) [closed]

As per the title of this question, what are the practical differences between AWS EFS, EBS and S3? My understanding of each: S3 is a storage facility accessible any where EBS is a device you can ...
Integralist's user avatar
  • 6,059
287 votes
19 answers
516k views

Using scp to copy a file to Amazon EC2 instance? [closed]

I am trying to use my Mac Terminal to scp a file from Downloads (phpMyAdmin I downloaded online) to my Amazon EC2 instance. The command I used was: scp -i myAmazonKey.pem phpMyAdmin-3.4.5-all-...
HoKy22's user avatar
  • 4,177
209 votes
28 answers
100k views

Increasing client_max_body_size in Nginx conf on AWS Elastic Beanstalk

I'm running into "413 Request Entity Too Large" errors when posting files larger than 10MB to our API running on AWS Elastic Beanstalk. I've done quite a bit of research and believe that I need to up ...
Nick Parsons's user avatar
  • 8,567
262 votes
19 answers
177k views

S3 Bucket action doesn't apply to any resources

I'm following the instructions from this answer to generate the follow S3 bucket policy: { "Id": "Policy1495981680273", "Version": "2012-10-17", "Statement": [ { "Sid": "...
Philip Kirkbride's user avatar
295 votes
20 answers
226k views

Email address is not verified (AWS SES)

I want to use Amazon's Simple Email Service to send emails. I verified my domain as well as the email address I want to send from. For both it says verified. Now when I use the Send Test Email from ...
maddo7's user avatar
  • 4,893
348 votes
11 answers
175k views

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's user avatar
  • 30.4k
195 votes
31 answers
148k views

Find region from within an EC2 instance

Is there a way to look up the region of an instance from within the instance? I'm looking for something similar to the method of finding the instance id.
Gary Richardson's user avatar
204 votes
31 answers
457k views

Quick way to list all files in Amazon S3 bucket?

I have an amazon s3 bucket that has tens of thousands of filenames in it. What's the easiest way to get a text file that lists all the filenames in the bucket?
Steve's user avatar
  • 4,193
351 votes
13 answers
499k views

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 ...
WebQube's user avatar
  • 8,810
178 votes
32 answers
369k views

AWS error from Python: No module named lambda_function

I am creating a AWS Lambda python deployment package. I am using one external dependency requests. I installed the external dependency using the AWS documentation. Below is my Python code. import ...
Nithin's user avatar
  • 9,969
222 votes
23 answers
318k views

How do you search an amazon s3 bucket?

I have a bucket with thousands of files in it. How can I search the bucket?
vinhboy's user avatar
  • 8,842
194 votes
29 answers
111k views

Docker push to AWS ECR hangs immediately and times out

I'm trying to push my first docker image to ECR. I've followed the steps provided by AWS and things seem to be going smoothly until the final push which immediately times out. Specifically, I pass ...
Jesse McMullen-Crummey's user avatar
161 votes
39 answers
386k views

The AWS Access Key Id does not exist in our records

I created a new Access Key and configured that in the AWS CLI with aws configure. It created the .ini file in ~/.aws/config. When I run aws s3 ls it gives: A client error (InvalidAccessKeyId) ...
kaushikdr's user avatar
  • 1,909
167 votes
30 answers
171k views

S3 Error: The difference between the request time and the current time is too large

I have error The difference between the request time and the current time is too large when call method amazons3.ListObjects ListObjectsRequest request = new ListObjectsRequest() { BucketName = ...
st78's user avatar
  • 8,206
213 votes
22 answers
371k views

Getting Access Denied when calling the PutObject operation with bucket-level permission

I followed the example on http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_examples.html#iam-policy-example-s3 for how to grant a user access to just one bucket. I then tested the ...
Greg's user avatar
  • 12.7k
181 votes
26 answers
252k views

API Gateway CORS: no 'Access-Control-Allow-Origin' header

Although CORS has been set up through API Gateway and the Access-Control-Allow-Origin header is set, I still receive the following error when attempting to call the API from AJAX within Chrome: ...
Tyler's user avatar
  • 3,776
246 votes
12 answers
185k views

How to use multiple AWS accounts from the command line?

I've got two different apps that I am hosting (well the second one is about to go up) on Amazon EC2. How can I work with both accounts at the command line (Mac OS X) but keep the EC2 keys & ...
Matt Culbreth's user avatar
145 votes
34 answers
221k views

getting message: forbidden reply from AWS API gateway

I am trying to create a lambda service on AWS and have it accessed from outside via the API gateway with no authentication or restriction required. To make things easy I set the gateway for now to be ...
Fab's user avatar
  • 1,845
326 votes
10 answers
372k views

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=...
SQDK's user avatar
  • 4,147
146 votes
36 answers
511k views

AWS CLI S3 A client error (403) occurred when calling the HeadObject operation: Forbidden

I'm trying to setup a Amazon Linux AMI(ami-f0091d91) and have a script that runs a copy command to copy from a S3 bucket. aws --debug s3 cp s3://aws-codedeploy-us-west-2/latest/codedeploy-agent.noarch....
MojoJojo's user avatar
  • 4,132


15 30 50 per page
1
2 3 4 5
5205