Questions tagged [aws-cli]

aws-cli is the Amazon Web Services Command Line Interface

aws-cli is an open source project that provides a command line interface to the Amazon Web Services APIs.

The project is hosted on GitHub: https://github.com/aws/aws-cli

380 questions
0
votes
0 answers

Amazon AWS CLI: How do I find out what actions/permissions/policies are attributed to a role?

I'm on Linux and using the AWS CLI. I tried running the following: aws iam list-instance-profiles-for-role --role-name role-abc-123 aws iam get-role --role-name role-abc-123 --query 'Role.AssumeRolePolicyDocument.Statement[].Action[]' aws iam…
0
votes
0 answers

Switch to a different AWS accounts in the UI

I currently have AWS configuration set up with my access key id and secret access key (i.e. I see this when going to 'aws configure' in the CLI). I then login through my company's OKTA to then access the AWS UI. I've just been given access to a new…
KristiLuna
  • 101
  • 1
0
votes
1 answer

AWS CLI : How to use "--query" to get output from nested JSON

I am using aws-cli v2 to get the --query output from AWS Describe-volumes. In this, I am trying to get the volume id, size, Instance ID, state. Instance ID is nested in the AWS Describe-volumes. Source : { "Volumes": [ { …
0
votes
1 answer

"route53:ListHostedZones with an explicit deny" error in the AWS console despite having AmazonRoute53FullAccess permissions

I'm trying to run this command in the AWS console: aws route53 list-hosted-zones I'm using my access key/secret and it worked fine in a demo account. I checked with my team and I have the AmazongRoute53FullAccess permissions: Here's the full error…
ernest
  • 109
  • 1
  • 8
0
votes
0 answers

How to locate a specific request in AWS, cloudtrail or Athena

How locate a specific request in AWS, cloudtrail or cloudwatch? Request on 2022-11-17T17:07:52.037Z General: Request URL: https://0712f1246-1104-y-https-www-abc-com.mplbci.ekb.eg/access HTTP Version: HTTP/1.1 Request method: GET Remote Address:…
0
votes
1 answer

Does AWS CLI bring data across local network when doing `aws s3 mv` between two S3 locations?

When moving data between two S3 locations using the AWS CLI, for example: aws s3 mv s3://bucket/prefix s3://bucket/other-prefix Is the data downloaded to your local computer and then re-uploaded? Or does it stay in the data center? Is it different…
Nick
  • 121
  • 3
0
votes
0 answers

AWS CLI Unknown options: --include,*.m3u8 For S3

Can the AWS CLI tool be used to only list/retrieve certain file types in S3? I was trying: aws s3 ls --summarize --human-readable --recursive s3://cloudfront.abc.com/CDNSource/hls/ --include "*.m3u8" but receiving "Unknown options:…
0
votes
1 answer

Why does an S3 to S3 copy care about VPCs? Related to error: "VPC endpoints do not support cross-region requests."

Goal: Get files from Bucket 1 in ca-central-1 in Account A to Bucket 2 in us-east-1 in Account B using the AWS CLI from a third machine using an the IAM role with correct S3 read and write permissions (assume unless that's unlikely) I got the…
0
votes
0 answers

EC2 instance DNS resolving issue

How do I identify the EC2 instance causing DNS (my website) resolving errors? I have some instances in my VPC, one of them is creating an error, I did not enable monitoring for this VPC and the instances. I need to determine what instance of aws is…
0
votes
1 answer

ssh: connect to host ec2-x-xxx-xxx-xx.compute-1.amazonaws.com port 22: Connection timed out

I connected to my ec2 instance successfully earlier. However, when trying to connect again, I got this error: ssh: connect to host ec2-x-xxx-xxx-xx.compute-1.amazonaws.com port 22: Connection timed out I checked Route table, Network ACL, Internet…
0
votes
0 answers

S3 Fatal error: Failed to connect to proxy URL: "Proxy url"

Good Afternoon, I have been trying to remove some files from S3, last week I did not have any issues accessing my s3 bucket however now any s3 cmd fails with the error message above, I cant even run aws s3 ls now with out seeing that error. Nothing…
Trizzle
  • 9
  • 1
0
votes
1 answer

using terraform or aws cli how to enable/tick "Enable load balancing" when creating an application (codedeploy)

In AWS when creating a Codedeploy/application, how to enable the "Enable load balancing" option using the awscli or terraform? Using the command line I can only select/define the target group but the "Enable load balancing" remains disabled aws…
nbari
  • 558
  • 1
  • 9
  • 28
0
votes
2 answers

Get outputs from jq specific line

The command: create_subnet=$(aws ec2 create-subnet --vpc-id "$create_vpc" --cidr-block 10.0.1.0/24 | jq -r '.subnet[].subnetid') The output: "subnet": { "availabilityzone": "us-west-1b", "availabilityzoneid": "usw1-az3", …
rikorey
  • 15
  • 1
  • 4
0
votes
1 answer

aws cli import access key in json format

With the aws cli (version 2) I have created an access key for an iam user, which produces json output. I pipe that output to a file. Now I would like to import these credentials to my aws cli configuration. aws cli has the aws configure import…
Isaac
  • 1,215
  • 3
  • 26
  • 44
0
votes
1 answer

How can I find the list of instance types that do not require ENA and the list of AMIs that support ENA?

I have this Terraform file - terraform { required_providers { aws = { source = "hashicorp/aws" version = "~> 4.23" } } required_version = ">= 1.2.0" } provider "aws" { region = "us-west-2" } resource "aws_instance"…
Lone Learner
  • 103
  • 1
  • 9