aws-cli

How to install specific awscli version in conda env (running 3.6) when not found in current channels

和自甴很熟 提交于 2020-01-06 05:30:18
问题 I am trying to install a specific version of awscli within my conda environment (running python 3.6). I have tried adding conda-forge to my current channels, as suggested in another post. When I run the command conda install -p /Users/myname/anaconda3/envs/py36 awscli==1.11.156 -y It errors with this message: Solving environment: failed PackagesNotFoundError: The following packages are not available from current channels: - awscli==1.11.156 Current channels: - https://repo.continuum.io/pkgs

using Cloudformation ref with awscli in userData

旧巷老猫 提交于 2020-01-04 09:18:08
问题 "aws ec2 create-tags --resources xxxxxx --tags Key=Team,Value=everybody --region { \"Ref\" : \"region\" } --out text\n" The above line/command I am using in my Cloudformation userData, It is not getting executed , I am getting the following error when I debugged : aws: error: argument --region: Invalid choice, valid choices are: ap-southeast-1 | us-gov-west-1 ap-northeast-1 | eu-west-1 fips-us-gov-west-1 | us-west-1 us-west-2 | us-east-1 cn-north-1 | ap-southeast-2 sa-east-1 My region name is

using Cloudformation ref with awscli in userData

我与影子孤独终老i 提交于 2020-01-04 09:17:30
问题 "aws ec2 create-tags --resources xxxxxx --tags Key=Team,Value=everybody --region { \"Ref\" : \"region\" } --out text\n" The above line/command I am using in my Cloudformation userData, It is not getting executed , I am getting the following error when I debugged : aws: error: argument --region: Invalid choice, valid choices are: ap-southeast-1 | us-gov-west-1 ap-northeast-1 | eu-west-1 fips-us-gov-west-1 | us-west-1 us-west-2 | us-east-1 cn-north-1 | ap-southeast-2 sa-east-1 My region name is

What is the difference between AWSCLI and AWSEBCLI?

旧时模样 提交于 2020-01-04 05:17:20
问题 What is the difference between "AWS Command Line Interface" and "AWS Elastic Beanstalk Command Line Interface"? Do I need both to deploy a Django project through AWS Elastic Beanstalk? Thank you! 回答1: You should start with the EBCLI and then involve the AWSCLI where the EBCLI falls short. The AWSCLI ( aws ) allows you to run commands from a bunch of different services, whereas, the EBCLI ( eb ) is specific to Elastic Beanstalk. The EBCLI makes a lot of tedious tasks easier because it is less

Pyexpat import error when running aws cli

我只是一个虾纸丫 提交于 2020-01-04 03:51:13
问题 I am having some problems running the aws cli on ubuntu 14.04 I keep getting the following error Traceback (most recent call last): File "/usr/local/bin/aws", line 15, in <module> import awscli.clidriver File "/usr/local/lib/python2.7/dist-packages/awscli/clidriver.py", line 16, in <module> File "/usr/local/lib/python2.7/dist-packages/botocore/session.py", line 27, in <module> import botocore.credentials File "/usr/local/lib/python2.7/dist-packages/botocore/credentials.py", line 23, in

Fetching CloudWatch metrics using the AWS Java SDK?

久未见 提交于 2020-01-03 09:54:34
问题 I'm trying to fetch CPU stats from an EC2 instance using the CloudWatch API: http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/cloudwatch/AmazonCloudWatchClient.html I have the following code but its returning an empty result, even though the instance Id, and AWS access and secret keys are correct. I can see the CPU util for the instance on the CloudWatch UI, but can't seem to get it below? I'm using version 1.9.0 of the AWS SDK. Any help much appreciated. import

Can't Delete Empty S3 Bucket

♀尐吖头ヾ 提交于 2020-01-03 06:45:10
问题 I have an S3 bucket that is 100% empty. Versioning was never enabled on the bucket. However, I still cannot remove the bucket. I have tried via the Console and the CLI tool. On the console it just says "Error" with no error message. From the cli and api it tells me: "An error occurred (BucketNotEmpty) when calling the DeleteBucket operation: The bucket you tried to delete is not empty". I have tried all of the following: aws s3 rb s3://<bucket_name> --force -> BucketNotEmpty aws s3 rm s3://

Stopping an RDS instance via CLI

删除回忆录丶 提交于 2019-12-31 04:58:26
问题 I am trying to use one of AWS's latest features where it allows you to stop an RDS instance. I followed this doc where it explains that I need to run the command: aws rds stop-db-instance --db-instance-identifier mydbinstance however, when I do that I get this: usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters] To see help text, you can run: aws help aws <command> help aws <command> <subcommand> help aws: error: argument operation: Invalid choice, valid choices are:

s3 - how to get fast line count of file? wc -l is too slow

我是研究僧i 提交于 2019-12-31 03:35:11
问题 Does anyone have a quick way of getting the line count of a file hosted in S3? Preferably using the CLI, s3api but I am open to python/boto as well. Note: solution must run non-interactively, ie in an overnight batch. Right no i am doing this, it works but takes around 10 minutes for a 20GB file: aws cp s3://foo/bar - | wc -l 回答1: Here's two methods that might work for you... Amazon S3 has a new feature called S3 Select that allows you to query files stored on S3. You can perform a count of

AWS CLI EMR get Master node Instance ID and tag it

荒凉一梦 提交于 2019-12-30 10:38:31
问题 I want to automate the running of a cluster and can use tags to get attributes of an EC2 instance like its instance-id. The documentation on https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html states that --tags (list) A list of tags to associate with a cluster, which apply to each Amazon EC2 instance in the cluster. Tags are key-value pairs that consist of a required key string with a maximum of 128 characters, and an optional value string with a maximum of 256