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

How to read aws cloudformation stack resource?

I have created a new cloudformation resource type Example::Testing::Resource. I followed the below documentation to create and submit the resource type to my AWS…
1
vote
1 answer

How to send AWS templated email from cli

I am trying to send templated email with command: aws ses send-templated-email --source "temp@gmail.com" --destination "ToAddresses=example@gmail.com" --template-data "{ "firstName": "temp", "lastName": "temp" }" --cli-input-json…
Moti
  • 312
  • 3
  • 8
1
vote
1 answer

How to rename AWS Lambda Function Name without changing its Function URL with SAM?

I am working with the following AWS SAM Template. Resources: PaymentFunction: Type: 'AWS::Serverless::Function' Properties: FunctionName: payment_function CodeUri: PaymentFunction/ Description: 'A lambda function to do a…
Vikku
  • 31
  • 4
1
vote
1 answer

How to find EC2 instances that have "null" for the PublicIpAddress?

When I run ... $ aws ec2 describe-instances --region=us-west-1 \ > --filters Name=instance-state-name,Values=stopped \ > Name=ip-address,Values=null \ > Name=block-device-mapping.status,Values=attached \ > --query…
Red Cricket
  • 9,762
  • 21
  • 81
  • 166
1
vote
3 answers

AWS S3 LS --include: Unknown options

I'm on the newest AWS CLI version - 2.7.24 Trying to list all the files from all the folders I have (with a certain extension) on this path: s3://myfiles/folders/ "folders" have this structure: folder1 - item - item folder2 - item -…
Milos
  • 23
  • 1
  • 6
1
vote
3 answers

How do i pass a string as payload to aws lambda function using aws cli?

I am trying to use the below aws cli command to invoke the lambda function. aws lambda invoke --invocation-type RequestResponse --function-name HelloWorldJava --payload \"world\" outputfile.txt But Iam getting below error. Invalid base64:…
pulkit
  • 47
  • 6
1
vote
1 answer

How to get the main container only in the ECS describe-tasks query?

I need to get a list of running ECS tasks with their image names/tags. Trying in 2 steps: Extracting task ARNs ARNS=$(aws ecs list-tasks --cluster $CLUSTER_NAME \ --desired-status 'RUNNING' --query 'taskArns' \ --output json --profile…
Andrew
  • 3,696
  • 3
  • 40
  • 71
1
vote
2 answers

AWS CLI has my credentials but I don't have a credential file

I can run the AWS CLI aws configure command and it lists my credentials. I even have a named profile I use. However, my system does not have Users\{profile}\.aws\credentials file. Where could my credentials be stored? The following command returns…
1
vote
1 answer

Fetch private subnet through name filter

I am trying to fetch private subnet-ids through aws cli. I have used this command earlier: aws ec2 describe-subnets --filters Name=vpc-id,Values=abc Name=tag:Name,Values=private --query 'Subnets[*].SubnetId' But this time I don't want to provide a…
YusufDoc
  • 55
  • 5
1
vote
0 answers

Find all instance types compatible with AMI

I would like to make an API call or use a CLI request (or multiple ones) that returns all instance types compatible with a given AMI (ami-0d59bcc339de8a2ab - Debian Buster ARM64). Here is my solution: Find out the parameters of the AMI (CPU…
1
vote
0 answers

Presto/Athena Union All Prepared Statements

How do you UNION ALL multiple prepared statements in Athena/Presto? Lets say I have PreparedStatement1 as: aws athena create-prepared-statement --statement-name PreparedStatement1 --query-statement "SELECT colA1 AS col1, colA2 AS col2 FROM table1…
user1179317
  • 2,693
  • 3
  • 34
  • 62
1
vote
0 answers

How to specify filepath via --cli-input-json in s3api

I'm trying to issue an aws s3api put-object command with all arguments specified via the --cli-input-json document, which in this case looks like so: { "Body": "this is the part giving me trouble", "Bucket": "my-bucket", "Key": "my-key" } For…
mmuurr
  • 1,310
  • 1
  • 11
  • 21
1
vote
1 answer

How to DescribeVPCs in a particular AWS region using Go AWS SDK?

I want to query all VPCs belonging to a particular region in my Go-based microservice. https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVpcs.html indicates that there exists no filter option by region or any other request…
1
vote
1 answer

What is the underlying mechanism that Terraform’s AWS Provider uses to provision resources in AWS?

Does it use AWS CloudFormation, the AWS CLI, or does it do something else like directly make AWS API calls without going through the CLI?
1
vote
1 answer

An error occurred (InvalidParameter) when calling the CreateInstanceExportTask operation: Access denied to the bucket xxxx

While performing ec2 vm export to s3 getting error access denied to bucket command used: aws ec2 create-instance-export-task --description "my vm instance" --instance-id i-abcdefgh --target-environment vmware --export-to-s3-task…
ras
  • 618
  • 8
  • 15
1 2 3
99
100