Questions tagged [aws-cli]

The AWS Command Line Interface (CLI) is a unified tool to manage AWS services.

The AWS Command Line Interface (CLI) is a unified tool to manage AWS services. Multiple AWS services can be controlled via the command line and various actions can be automated through this tool.

Questions involving an alternate implementation for Windows PowerShell, AWS Tools for PowerShell, should be tagged with instead.

Resources

4345 questions
1
vote
0 answers

JMESPath to create a dictionary (map) out of Tags key and value pairs from AWS CLI output

I am trying to extract a few properties of AWS EC2 instance using JMESPath. I just started learning JMESPath using this useful guide. But because my knowledge is limited, I was only able to get the output like below. % aws ec2 describe-instances…
user1330974
  • 2,500
  • 5
  • 32
  • 60
1
vote
3 answers

AWK / Grep and Print All Matching Record

I have this command which displays all the record from the search. But I would like to filter only the record that matches the search word. For e.g. for user in $(aws iam list-users |grep -i UserName|sed -e 's/.*: \"//' -e 's/\",//'); do echo…
xtonehari
  • 35
  • 2
  • 6
1
vote
1 answer

Can you print the values of a JSON array in an AWS, using a JMESPath query?

I am trying to list all the SQS queues in our account using aws sqs list-queues into a bash one-item-per-line output. Problem is it comes through as a JSON object { "QueueUrls": [ "url", "url", "etc..." ] } I can use JMESpath to get…
WesAtWork
  • 65
  • 7
1
vote
3 answers

Stop all ECS Cluster tasks with AWS CLI

Self answers:How to stop all tasks on a cluster with a single cli command, easily allowing for extra parameters to be passed.
Baron
  • 323
  • 4
  • 10
1
vote
0 answers

aws ecs with capacityProviderStrategy | can deploymentController be updated once ecs service is created?

i created the ecs service with deployment controller type as ECS with capacityProviderStrategy and then wanted to modify it to CODE_DEPLOY. Is this restricted for some reason ? i do not see an option in the UI with modify service Tried the command…
1
vote
1 answer

boto3 cloudformation list_stacks() function is not listed all the stacks in cloudformation

I have created a stacks in Cloud formation. When try to get all the stacks through aws cli its working but i tried to get all the stack via boto3 API in python. Here, it didn't collect all the stacks information. few of the stacks information…
1
vote
1 answer

AWS CLI importing credentials from CSV doesn't add region

I'm trying to import AWS credentials from csv file with headers User name,Password,Access key ID,Secret access key,Console login link and using command aws configure import --csv file://myfile.csv --region us-east-1 But the region comes back as…
mbxzxz
  • 366
  • 2
  • 14
1
vote
1 answer

AWS CLI combining operators within a single query

I am running an AWS query command for aws fsx describe-file-systems where I want to combine two operators where it will be looking for FileSystemType=="LUSTRE" and another where Storagecapacity >1200 and then following the another stuff with the…
krock1516
  • 441
  • 10
  • 30
1
vote
1 answer

Number of PUT requests for S3 folder upload

I am new to AWS. I am working with S3 PUT objects and trying to upload 10 files in a folder. To be more specific, I am uploading the folder. How many PUT requests does it take to complete uploading the files? Will it be 10 PUT requests because 10…
1
vote
2 answers

How to filter with value only regardless the name in AWS CLI

My EC2 instance has many tags with a desired value EBM. The thing that this value could be in a different Name, sometimes under tag:Name and sometimes tag:XXX, I tried the below query and it didn't work: aws --region sa-east-1 ec2…
TheHero
  • 11
  • 3
1
vote
1 answer

Filtering JSON using jq with a condition

I have the following JSON: { "LaunchTemplates": [ { "LaunchTemplateName": "bla-99", "CreateTime": "2022-12-13T13:40:33+00:00" }, { "LaunchTemplateName": "abcabc", "CreateTime": "2022-12-13T09:58:14+00:00" …
Supertwister
  • 105
  • 1
  • 1
  • 8
1
vote
1 answer

How to ftech values from nested josn via aws cli from DynamoDB

I am trying to list the Items and other values from the AWS Dynamodb table(DDNS), However, if only look for InstnaceId then I am able to get the entire list of my instances, however i want to get few more selective values from the table which is a…
user2023
  • 452
  • 5
  • 22
1
vote
0 answers

AWS CLI query results with list values in top-down format rather comma saperated

How can we expand a row if a field got multiple values from the query results. Eg . Subnets in the below command go in a long line with comma separated, I would like to get them on the next line by expanding the row. aws ec2 describe-route-tables…
jvG
  • 403
  • 4
  • 6
  • 14
1
vote
0 answers

How to trigger a lambda via cloud watch events/event bridge in localstack using awslocal

I am struggling to find any information on how to setup triggers/rules on a lambda so it will trigger with certain event bridge events via the cli as almost all examples on aws are via http requests to set it up. In this scenario I am using…
Grofit
  • 17,693
  • 24
  • 96
  • 176
1
vote
1 answer

Circle Ci, serverless-framework, serverless-python-requirements

I am trying to upload my Python project to an AWS account via circleci CI/CD but when I deploy the code it always stops and remove docker "docker run --rm -v" in logs I'm using ORBs like aws-cli: circleci/aws-cli@3.1.3 serverless-framework:…
Ammar Midani
  • 55
  • 1
  • 11