aws-cli

aws cli in cygwin - how to clean up differences in windows and cygwin style paths

我只是一个虾纸丫 提交于 2019-12-03 03:18:11
I suspect this is my ineptitude in getting path variables set right, but I'm at a loss. I've installed the aws cli using pip in cygwin. pip install awscli I have two python environments... a windows anaconda distribution, and the version cygwin can install for you. which python > /usr/bin/python where python > C:\cygwin64\bin\python > C:\windows-style-path-to-anaconda\python.exe when I try to run aws cli aws --version > C:\windows-style-path-to-anaconda\python.exe: can't open file > 'cygdrive/c/cygdrive-style-path-to-anaconda/Scripts/aws': > [Errno 2] No such file or directory' I've tried

AWS CLI $PATH Settings

梦想与她 提交于 2019-12-03 03:01:32
问题 I am following the AWS CLI Setup guide. I have managed to successfully install the tool on my Mac OS X terminal with the following output: Running cmd: /usr/bin/python virtualenv.py --python /usr/bin/python /Users/fr/.local/lib/aws Running cmd: /Users/fr/.local/lib/aws/bin/pip install --no-index --find-links file:///Users/fr/Downloads/awscli-bundle/packages awscli-1.5.3.tar.gz You can now run: /Users/fr/.local/lib/aws/bin/aws --version My issue is that I have to type the full path /Users/fr/

How do I delete a versioned bucket in AWS S3 using the CLI?

天涯浪子 提交于 2019-12-03 02:36:46
问题 I have tried both s3cmd : $ s3cmd -r -f -v del s3://my-versioned-bucket/ And the AWS CLI: $ aws s3 rm s3://my-versioned-bucket/ --recursive But both of these commands simply add DELETE markers to S3. The command for removing a bucket also doesn't work (from the AWS CLI): $ aws s3 rb s3://my-versioned-bucket/ --force Cleaning up. Please wait... Completed 1 part(s) with ... file(s) remaining remove_bucket failed: s3://my-versioned-bucket/ A client error (BucketNotEmpty) occurred when calling

Is it possible to copy between AWS accounts using AWS CLI?

扶醉桌前 提交于 2019-12-03 02:30:26
Is it possible using AWS CLI to copy the contents of S3 buckets between AWS accounts? I know it's possible to copy/sync between buckets in the same account, but I need to get the contents of an old AWS account into a new one. I have AWS CLI configured with two profiles, but I don't see how I can use both profiles in a single copy/sync command. Very Simple. Let's say: Old AWS Account = old@aws.com New AWS Account = new@aws.com Loginto the AWS console as old@aws.com Go to the bucket of your choice and apply below bucket policy : { "Statement": [ { "Action": [ "s3:ListBucket" ], "Effect": "Allow"

Error You must specify a region when running command aws ecs list-container-instances

独自空忆成欢 提交于 2019-12-03 00:53:37
I am trying to use aws container service as per the documentation in http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_GetStarted.html The below error is thrown when running the command: aws ecs list-container-instances --cluster default You must specify a region. You can also configure your region by running "aws configure". The documentation does not mention anything about specifying a default region. How do we do it in a console? I think you need to use for example: aws ecs list-container-instances --cluster default --region us-east-1 This depends of your region of course. "You

AWS CLI Query - describe-keys with parameters

牧云@^-^@ 提交于 2019-12-02 21:57:41
问题 So this week, I have started to begin learning the CLI and seeing what can be done within this. I was given the task of grabbing information regarding this: Key Alias Key ID All associated tags I have tried many methods within this... and can't seem to get anywhere. I have only been doing this for around 4 days and I just began documenting key API calls that will come in use for the future. I seem to not be able to grab this in a --output table. If anyone could be able to give me a guidance

AWS : The config profile (MyName) could not be found

北慕城南 提交于 2019-12-02 21:34:34
Every time I want to config something with AWS I get the following error : "The config profile (myname) could not be found" like : aws configure I'm using Python 3.4 and I want to use AWS CLI Keyring to encrypt my credentials.. Stanley Yong I think there is something missing from the AWS documentation in http://docs.aws.amazon.com/lambda/latest/dg/setup-awscli.html , it did not mention that you should edit the file ~/.aws/config to add your username profile. There are two ways to do this: edit ~/.aws/config or aws configure --profile "your username" I ran into this problem when I moved to a

How can I use wildcards to `cp` a group of files with the AWS CLI

末鹿安然 提交于 2019-12-02 21:00:17
I'm having trouble using * in the AWS CLI to select a subset of files from a certain bucket. Adding * to the path like this does not seem to work aws s3 cp s3://data/2016-08* . To download multiple files from an aws bucket to your current directory, you can use recursive , exclude , and include flags like this: aws s3 cp s3://data/ . --recursive --exclude "*" --include "2016-08*" For more info on how to use these filters: http://docs.aws.amazon.com/cli/latest/reference/s3/#use-of-exclude-and-include-filters The Order of the Parameters Matters The exclude and include should be used in a

how to view aws log real time (like tail -f)

心已入冬 提交于 2019-12-02 20:01:30
I can view the log using the following command. aws logs get-log-events --log-group-name groupName --log-stream-name streamName --limit 100 what is the command to get feature like tail -f so that i can see the log real time Have a look at awslogs . If you happen to be working with Lambda/API Gateway specifically, have a look at apilogs . I was really disappointed with awslogs and cwtail so I made my own tool called Saw that efficiently streams CloudWatch logs to the console (and colorizes the JSON output): You can install it on MacOS with: brew tap TylerBrock/saw brew install saw It has a

How to Generate a Presigned S3 URL via AWS CLI

别说谁变了你拦得住时间么 提交于 2019-12-02 19:04:40
Is there a way to create presigned URL for objects in S3 bucket using AWS CLI? I know that could be done using SDK, but is it possible with CLI? I found this on one of the AWS docs, but can't complete the command: s3cmd signurl s3://BUCKET/OBJECT <expiry_epoch|+expiry_offset> Any help? Did you try aws s3 presign ? Generate a pre-signed URL for an Amazon S3 object. This allows anyone who receives the pre-signed URL to retrieve the S3 object with an HTTP GET request. For sigv4 requests the region needs to be configured explicitly. This will generate a URL that will expire in 3600 seconds