aws-cli

Get ARN of S3 Bucket with aws cli

余生颓废 提交于 2019-12-20 08:31:23
问题 Is it possible to get the ARN of an S3 bucket via the AWS command line? I have looked through the documentation for aws s3api ... and aws s3 ... and have not found a way to do this. 回答1: It's always arn:aws:s3:::NAME-OF-YOUR-BUCKET . If you know the name of the bucket, you know the ARN. No need to 'get' it from anywhere. 回答2: You can also select your S3 bucket ARN by selecting it using the tick mark at the s3 management console, which will pop up a Side bar. where there is a provision to copy

AWS EMR using spark steps in cluster mode. Application application_ finished with failed status

跟風遠走 提交于 2019-12-20 05:12:20
问题 I'm trying to launch a cluster using AWS Cli. I use the following command: aws emr create-cluster --name "Config1" --release-label emr-5.0.0 --applications Name=Spark --use-default-role --log-uri 's3://aws-logs-813591802533-us-west-2/elasticmapreduce/' --instance-groups InstanceGroupType=MASTER,InstanceCount=1,InstanceType=m1.medium InstanceGroupType=CORE,InstanceCount=2,InstanceType=m1.medium The cluster is created successfully. Then I add this command: aws emr add-steps --cluster-id ID

aws iot describe-endpoint::You must specify a region

妖精的绣舞 提交于 2019-12-20 03:38:13
问题 I am following this tutorial for connecting Raspberry Pi to AWS IoT using Node.js SDK and I have done all the other steps but I am lost in the authentication and certificate step: pi@raspberrypi:~ $ aws iot describe-endpoint You must specify a region. You can also configure your region by running "aws configure". pi@raspberrypi:~ $ aws configure AWS Access Key ID [None]: AWS Secret Access Key [None]: Default region name [None]: Default output format [None]: pi@raspberrypi:~ $ ls 2016-02-24

List all EC2 instance types in a region or AZ [closed]

瘦欲@ 提交于 2019-12-19 08:54:08
问题 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 12 months ago . While there appear to be a few ways to output and filter some AWSCLI commands into this list, does someone have a nice+easy way to list all EC2 instance types for a specific region? Or perhaps that list is published in a .json file up in a bucket someplace, maintained by AWS? I'm simply looking for this sort

Is there a way to pipe the output of one AWS CLI command as the input to another?

青春壹個敷衍的年華 提交于 2019-12-18 15:29:45
问题 I'm attempting to call run-instances and pass the resulting instance IDs as the input to create-tags as a one-liner as follows: aws ec2 run-instances \ --image-id ami-1234 \ --output text \ --query Instances[*].InstanceId | \ aws ec2 create-tags \ --tags 'Key="foo",Value="bar"' When attempting this, I get the following: usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters] To see help text, you can run: aws help aws <command> help aws <command> <subcommand> help aws:

Is there a way to pipe the output of one AWS CLI command as the input to another?

别来无恙 提交于 2019-12-18 15:27:14
问题 I'm attempting to call run-instances and pass the resulting instance IDs as the input to create-tags as a one-liner as follows: aws ec2 run-instances \ --image-id ami-1234 \ --output text \ --query Instances[*].InstanceId | \ aws ec2 create-tags \ --tags 'Key="foo",Value="bar"' When attempting this, I get the following: usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters] To see help text, you can run: aws help aws <command> help aws <command> <subcommand> help aws:

Getting 403 forbidden from s3 when attempting to download a file

偶尔善良 提交于 2019-12-17 13:57:29
问题 I have a bucket on s3, and a user given full access to that bucket. I can perform an ls command and see the files in the bucket, but downloading them fails with: A client error (403) occurred when calling the HeadObject operation: Forbidden I also attempted this with a user granted full S3 permissions through the IAM console. Same problem. For reference, here is the IAM policy I have: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "s3:ListAllMyBuckets", "Resource":

AWS ECS Error when running task: No Container Instances were found in your cluster

爱⌒轻易说出口 提交于 2019-12-17 08:15:06
问题 Im trying to deploy a docker container image to AWS using ECS , but the EC2 instance is not being created. I have scoured the internet looking for an explanation as to why I'm receiving the following error: "A client error (InvalidParameterException) occurred when calling the RunTask operation: No Container Instances were found in your cluster." Here are my steps: 1. Pushed a docker image FROM Ubuntu to my Amazon ECS repo. 2. Registered an ECS Task Definition: aws ecs register-task-definition

AWS CLI get-metric-statistics

笑着哭i 提交于 2019-12-13 15:44:23
问题 I'm trying to request the CPUUtilization from my ec2 instance and following this Command Reference i'm using the following command aws cloudwatch get-metric-statistics --metric-name CPUUtilization --start-time 2016-08-08T22:48:00 --end-time 2016-08-08T22:53:00 --period 60 --namespace AWS/EC2 --statistics Maximum --dimensions Name=InstanceId,Value=i-myinstanceid my response is: { "Datapoints": [ { "Timestamp": "2016-08-08T22:51:00Z", "Maximum": 0.17, "Unit": "Percent" } ], "Label":

Enable MFA Delete on S3 AWS Bucket

江枫思渺然 提交于 2019-12-13 15:24:21
问题 I, I want to enable "MFA delete" on AWS S3 bucket. The official doc (cf http://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete) I don't know what is the "serial number" for the MFA ? it seems quite hard to write a python code to generate the right signed headers. Do you have any advice for me ? (an existing python script for example ! :p) The official code snippet : PUT /?versioning HTTPS/1.1 Host: BucketName .s3.amazonaws.com Date: Date Authorization: