aws-cli

Aws cli cloudformation error seen on passing parameter value of type CommaDelimitedList

做~自己de王妃 提交于 2019-12-12 07:17:48
问题 I am seeing an invalid-type error for a CommaDelimitedList parameter value. The CF runs without any errors from the console. AWS CLI command: aws cloudformation create-stack --stack-name agkTestUserStack --template-body file://api_user.yaml --parameters ParameterKey=CustomUserName,ParameterValue="svc_TestUser" ParameterKey=GroupAssociations,ParameterValue="Dev,Test" Output: Parameter validation failed: Invalid type for parameter Parameters[1].ParameterValue, value: [u'Dev', u'Test'], type:

How do I set Content-Type when uploading to S3 with AWS CLI?

妖精的绣舞 提交于 2019-12-12 07:17:34
问题 I'm trying to set up S3 static website hosting, but it appears to return 403 on any of my objects that don't have the Content-Type metadata field set in the AWS console. I cannot figure out how to do this with the AWS CLI tool. Using the --metadata option appears to work: $ aws s3api put-object --bucket <bucket> --key foo.html --body foo.html --metadata Content-Type=text/html { "ETag": "\"fd5ff7743e5ed1e1c304eb1c34e8e39f\"" } $ aws s3api head-object --bucket <bucket> --key foo.html {

IAM credentials not found on AWS CLI

和自甴很熟 提交于 2019-12-12 05:28:53
问题 I'm trying to automate a db backup upload to s3 on an ubuntu machine. I have the db backup generating correctly, but when I try to upload to s3 I get the following error: A client error (InvalidAccessKeyId) occurred when calling the PutObject operation: The AWS Access Key Id you provided does not exist in our records. I used the command line aws configure command to configure my credentials, then opened the ~/.aws/config file and made sure it was correct. I also ran aws configure list and

What's the aws cli command to create the default EMR-managed security groups?

只谈情不闲聊 提交于 2019-12-12 04:45:30
问题 When using the EMR web console, you can create a cluster and AWS automatically creates the EMR-managed security groups named "ElasticMapReduce-master" & "ElasticMapReduce-slave". How do you create those via the aws cli? I found aws emr create-default-roles but there's no aws emr create-default-security-groups . 回答1: As of right now, it looks like you can't. See http://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-man-sec-groups.html section "To specify Amazon EMR–managed security groups

AWS S3 Allows to create bucket name Caps through AWS CLI

女生的网名这么多〃 提交于 2019-12-12 04:45:24
问题 When you provide S3 bucket name as Capital letters using Console - it throws error (Caps letters not allowed) However, when you create the bucket in S3 using CLI - it just creates. I'm I missing any settings? Why is this behavior? 回答1: If you use the AWS Management Console, bucket names must be DNS-compliant in all Regions . Rule 2 of DNS compliant name states that: Bucket names must be a series of one or more labels. Adjacent labels are separated by a single period (.). Bucket names can

Sending aws cli SES as a file attachmennt

人走茶凉 提交于 2019-12-11 16:59:25
问题 I am trying to send my file as an attachment in my AWS SES via AWS CLI . Given below is the message.json sample provided by aws documentation { "Data": "From: sender@example.com\nTo: recipient@example.com\nSubject: Test email sent using the AWS CLI (contains an attachment)\nMIME-Version: 1.0\nContent-type: Multipart/Mixed; boundary=\"NextPart\"\n\n--NextPart\nContent-Type: text/plain\n\nThis is the message body.\n\n--NextPart\nContent-Type: text/plain;\nContent-Disposition: attachment;

Using aws.s3::get_bucket_df() returns errors when trying to retrieve bucket meta data?

╄→尐↘猪︶ㄣ 提交于 2019-12-11 15:55:59
问题 I have a repository in S3: my_bucket: folder1 subfolder11 subfolder111 folder2 subfolder21 subfolder221 I am trying to connect and load all files in all relevant folders in my bucket. Here is how I am trying to do this: library(aws.s3) bl <- bucketlist() ### Builds a dataframe of the files in a bucket### dfBucket <- get_bucket_df(bucket = "my_bucket", prefix = "folder1/", max = Inf) I am getting the following error: Error in z[["Owner"]][["ID"]] : subscript out of bounds Please advise. UPDATE

s3 - An error occurred (403) when calling the HeadObject operation: Forbidden

老子叫甜甜 提交于 2019-12-11 14:23:37
问题 Answer did not help Resource policy for s3 bucket bucket1 is: { "Version": "2012-10-17", "Statement": [{ "Effect": "Deny", "Principal": "*", "Action": "s3:*", "Resource": "arn:aws:s3:::bucket1/*", "Condition": { "Bool": { "aws:SecureTransport": "false" } } }, { "Effect": "Deny", "Principal": "*", "Action": "s3:PutObject", "Resource": "arn:aws:s3:::bucket1/*", "Condition": { "StringNotEquals": { "s3:x-amz-server-side-encryption": "AES256" } } }, { "Effect": "Deny", "Principal": "*", "Action":

AWS CLI search resource by tags

自古美人都是妖i 提交于 2019-12-11 08:03:47
问题 I am trying to use AWS CLI to search for resources by tags. I prepare this tag.json file: { "TagFilters": [ { "Value": "postgres-dev", "Key": "Name" } ] } and use this command: aws resourcegroupstaggingapi get-resources --tag-filters --cli-input-json file://tag.json However, instead of returning only the databases which have this tag, it returns every resource in my AWS account (EC2, ELB, etc.) Can anyone show me where did I do wrong? Thanks a lot. 回答1: Can you try it in plain text syntax in

NodeJs delay each promise within Promise.all()

非 Y 不嫁゛ 提交于 2019-12-11 07:29:26
问题 I'm trying to update a tool that was created a while ago which uses nodejs (I am not a JS developer, so I'm trying to piece the code together) and am getting stuck at the last hurdle. The new functionality will take in a swagger .json definition, compare the endpoints against the matching API Gateway on the AWS Service, using the 'aws-sdk' SDK for JS and then updates the Gateway accordingly. The code runs fine on a small definition file (about 15 endpoints) but as soon as I give it a bigger