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 I successfully login with those creds as follows: docker login -u AWS -p XXXX -e none https://####.dkr.ecr.us-east-1.amazonaws.com WARNING: login credentials … Read more

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-3a93fa023a57/1_AU_COM_180212_Areitbahn_Hahnkoplift_Bergstation.tiles/l2_f_0101.jpg” /> This get request should contain in the response, header, Access-Control-Allow-Origin: * My CORS settings for the bucket looks like this: <?xml version=”1.0″ encoding=”UTF-8″?> <CORSConfiguration xmlns=”http://s3.amazonaws.com/doc/2006-03-01/”> <CORSRule> <AllowedOrigin>*</AllowedOrigin> <AllowedMethod>GET</AllowedMethod> <MaxAgeSeconds>3000</MaxAgeSeconds> <AllowedHeader>*</AllowedHeader> </CORSRule> </CORSConfiguration> As you might … Read more

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 => ENV[“AWS_ACCESS_KEY_ID”], :secret_access_key => ENV[“AWS_SECRET_ACCESS_KEY”], :region => ‘us-west-2’ } s3 = Aws::S3::Client.new test = s3.get_object( :bucket => ENV[“AWS_S3_BUCKET”], :key => picture.image_url.split(“https://stackoverflow.com/”)[-2], ) end However, I am getting the following … Read more

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 # better guidance to the user what needs to happen. raise NoRegionError() Why is this happening? and why only … Read more

Setting up FTP on Amazon Cloud Server [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 3 years ago. Improve this question I am trying to set up FTP on Amazon Cloud Server, but without luck. I search over net and … Read more

Add Keypair to existing EC2 instance

I was given AWS Console access to an account with 2 instances running that I cannot shut down (in production). I would, however, like to gain SSH access to these instances, is it possible to create a new Keypair and apply it to the instances so I can SSH in? Obtaining the existing pem file … Read more

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: return e When the call to create_user succeeds, I get a neat object that contains the http status code of the … Read more

Do you get charged for a ‘stopped’ instance on EC2? [closed]

Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 10 years ago. Improve this question Bit confused here, I have an on-demand instance but do I get charged even when I stop the instance? 4 Answers 4