aws-cli

AccessDeniedException: Unable to determine service/operation name to be authorized

前提是你 提交于 2021-01-21 12:15:56
问题 Using AWS CLI aws --version aws-cli/1.11.21 Python/2.7.12 Darwin/15.3.0 botocore/1.4.78 Creating a POST method for API Gateway as explained at https://github.com/arun-gupta/serverless/tree/master/aws/microservice#post-method. This method can be invoked successfully using test-invoke-method and AWS Console. Creating a GET method using AWS CLI https://github.com/arun-gupta/serverless/tree/master/aws/microservice#get-method. Invoking this method using test-invoke-method and AWS Console gives the

Is it possible to install aws-cli package without root permission?

*爱你&永不变心* 提交于 2021-01-21 03:49:05
问题 As title suggested, I haven't been able to find a good way to install aws-cli (https://github.com/aws/aws-cli/) without having the root access (or equivalent of sudo privileges). The way Homebrew setup on Mac is hinting at it may be possible, provided that a few directories and permissions are set in a way to facility future installs. However, I have yet to find any approach in Linux (specially, Red Hat Enterprise Linux or CentOS distroes). I am also aware of SCL from RHEL (https://access

How to cp file only if it does not exist, throw error otherwise?

倖福魔咒の 提交于 2021-01-20 17:07:54
问题 aws s3 cp "dist/myfile" "s3://my-bucket/production/myfile" It always copies myfile to s3 - I would like to copy file ONLY if it does no exist, throw error otherwise. How I can do it? Or at least how I can use awscli to check if file exists? 回答1: You could test for the existence of a file by listing the file, and seeing whether it returns something. For example: aws s3 ls s3://bucket/file.txt | wc -l This would return a zero (no lines) if the file does not exist. If you only want to copy a

How to cp file only if it does not exist, throw error otherwise?

我们两清 提交于 2021-01-20 17:06:44
问题 aws s3 cp "dist/myfile" "s3://my-bucket/production/myfile" It always copies myfile to s3 - I would like to copy file ONLY if it does no exist, throw error otherwise. How I can do it? Or at least how I can use awscli to check if file exists? 回答1: You could test for the existence of a file by listing the file, and seeing whether it returns something. For example: aws s3 ls s3://bucket/file.txt | wc -l This would return a zero (no lines) if the file does not exist. If you only want to copy a

How to cp file only if it does not exist, throw error otherwise?

南楼画角 提交于 2021-01-20 17:05:40
问题 aws s3 cp "dist/myfile" "s3://my-bucket/production/myfile" It always copies myfile to s3 - I would like to copy file ONLY if it does no exist, throw error otherwise. How I can do it? Or at least how I can use awscli to check if file exists? 回答1: You could test for the existence of a file by listing the file, and seeing whether it returns something. For example: aws s3 ls s3://bucket/file.txt | wc -l This would return a zero (no lines) if the file does not exist. If you only want to copy a

How to get ec2 instance state at CLI?

て烟熏妆下的殇ゞ 提交于 2021-01-20 09:11:51
问题 I can see my instance with: $ aws ec2 describe-instances --output text RESERVATIONS 193693970645 r-06e25c9702ca1a586 INSTANCES 0 x86_64 False True xen ami-00c03f7f7f2ec15c3 i-03006b8712ac593f9 t2.micro mdaws 2019-10-11T12:08:56.000Z /dev/xvda ebs User initiated (2019-10-11 12:51:09 GMT) hvm CAPACITYRESERVATIONSPECIFICATION open CPUOPTIONS 1 1 HIBERNATIONOPTIONS False MONITORING disabled PLACEMENT us-east-2c default STATE 48 terminated STATEREASON Client.UserInitiatedShutdown Client

How to get ec2 instance state at CLI?

点点圈 提交于 2021-01-20 09:10:31
问题 I can see my instance with: $ aws ec2 describe-instances --output text RESERVATIONS 193693970645 r-06e25c9702ca1a586 INSTANCES 0 x86_64 False True xen ami-00c03f7f7f2ec15c3 i-03006b8712ac593f9 t2.micro mdaws 2019-10-11T12:08:56.000Z /dev/xvda ebs User initiated (2019-10-11 12:51:09 GMT) hvm CAPACITYRESERVATIONSPECIFICATION open CPUOPTIONS 1 1 HIBERNATIONOPTIONS False MONITORING disabled PLACEMENT us-east-2c default STATE 48 terminated STATEREASON Client.UserInitiatedShutdown Client

Conda: The following packages are missing from the target environment

折月煮酒 提交于 2021-01-19 23:28:15
问题 I'm trying to uninstall awscli: conda list | grep aws awscli 1.18.78 pypi_0 pypi (base) % conda remove awscli Collecting package metadata (repodata.json): done Solving environment: failed PackagesNotFoundError: The following packages are missing from the target environment: - awscli But for some reason conda can't find package. What is proper way to uninstall awscli? 回答1: Use Pip The channel value of pypi indicates that this package was installed from PyPI using pip , and therefore - as

Conda: The following packages are missing from the target environment

大兔子大兔子 提交于 2021-01-19 23:25:51
问题 I'm trying to uninstall awscli: conda list | grep aws awscli 1.18.78 pypi_0 pypi (base) % conda remove awscli Collecting package metadata (repodata.json): done Solving environment: failed PackagesNotFoundError: The following packages are missing from the target environment: - awscli But for some reason conda can't find package. What is proper way to uninstall awscli? 回答1: Use Pip The channel value of pypi indicates that this package was installed from PyPI using pip , and therefore - as

Conda: The following packages are missing from the target environment

二次信任 提交于 2021-01-19 23:18:08
问题 I'm trying to uninstall awscli: conda list | grep aws awscli 1.18.78 pypi_0 pypi (base) % conda remove awscli Collecting package metadata (repodata.json): done Solving environment: failed PackagesNotFoundError: The following packages are missing from the target environment: - awscli But for some reason conda can't find package. What is proper way to uninstall awscli? 回答1: Use Pip The channel value of pypi indicates that this package was installed from PyPI using pip , and therefore - as