Questions tagged [aws-cli]
aws-cli is the Amazon Web Services Command Line Interface
383
questions
0
votes
1
answer
175
views
S3 Logs event Issue
Is there a way to see what actions the 'g2' IAM user is performing in S3, and which IP(s) they are running from? I have already enabled the logging of S3 actions.
One point I’m still not able to ...
1
vote
0
answers
732
views
Why does AWS take a long time to change the password of DB Clusters?
I'm running this command to change the master user password of a DB Cluster on AWS:
aws rds modify-db-cluster --db-cluster-identifier development-db \
--region us-east-2 --master-user-password ...
2
votes
2
answers
3k
views
Can't use execute-command --interactive in AWS CLI session manager
I'm trying to use the AWS cli + session manager plugin to get into a database container to run some migrations, and I am struggling to get it working. I'm trying to use the following command:
aws ecs ...
1
vote
1
answer
999
views
Is it possible to upload files along with initialization script on EC2 instance when running it with AWS CLI?
I have nginx configuration files which I would like to deploy on my Ubuntu EC2 instance. I create instance using AWS CLI:
aws ec2 run-instances --instance-type t2.micro \
--count 1 \
--image-...
2
votes
1
answer
2k
views
Could not resolve host: mirrors.iuscommunity.org
I'm not able to install or update the package on my centos machine .
check with
vi /etc/sysconfig/network-scripts/ifcfg-lo
ONBOOT=yes
NAME=loopbac
[ec2-user@ip- ~]$ sudo yum update
Loaded plugins: ...
0
votes
1
answer
214
views
How to show which resources are connected to (depend on) which other resources in AWS
Is there a way to show which resources are connected to what other resources in AWS? Basically the kind of information that would allow one to understand/view the current architecture.
There are CLI ...
3
votes
3
answers
701
views
Is there a minimal aws cli installation?
Sometimes I'd like to spin up an instance and run an aws cli command on it quickly, but there seems to be a great delay in installing the aws cli. Is there any way to get a "minimal" ...
0
votes
1
answer
587
views
how to download archive in aws s3 glacier
first, sorry for my bad english.
i create a vault in glacier service and then i uploaded an archive into vault and in out-put, aws gave back me a archive id. then using the archive-id, i created a job ...
0
votes
1
answer
970
views
Ansible EC2 metatadata options?
I'm trying to get Ansible EC2 to provision instances that require IMDSV2.
Through the aws ec2 run-instances I'm able to do it by adding --metadata-options "HttpEndpoint=enabled,HttpTokens=...
1
vote
0
answers
543
views
AWS-CLI EC2 AMI :: Get details about owner via OwnerId
Given the OwnerId field returned from an AWS ami query such as:
$ aws ec2 describe-images --image-ids ami-015f906ef3e2123c0 --region ap-southeast-2 --query Images[].OwnerId
[
"602401143452&...
2
votes
1
answer
5k
views
How can I search across CloudWatch log groups on AWS?
I have a number of lambda functions which run my serverless backend. Something somewhere is misbehaving, and I need to bring up/search all the logs from a particular time — from all log groups, not ...
0
votes
0
answers
392
views
How can I let apache server work always on my ec2 instance?
I am learning aws's EC2 server. I configured apache and php. I started the apache server with the command
Sudo service httpd start
But every time I stop my pc, or the next day, when I want to continue ...
3
votes
2
answers
10k
views
How to *actually* exclude a directory in AWS S3 sync?
The aws s3 sync command has an --exclude flag which lets you exclude a folder from the sync. However, even though the files are not uploaded from that directory, the command still looks at and ...
0
votes
3
answers
4k
views
Is there a way to export all AWS Security Groups to CSV? moreover, is there a recommended way of keeping track of SR changes?
We have a relatively small dev environment in AWS with about 50 Security groups with multiple permission entries. is there a recommended way of keeping track of SR changes, Access, etc?
My manager ...
0
votes
0
answers
503
views
Can i access an EKS cluster , if i don't have access to iam user that created it?
An AWS admin , created an IAM user , and that user created an EKS cluster. Now , we don't have access to that IAM user.
If , we try to execute , kubectl , commands on that EKS cluster from a new IAM ...
0
votes
1
answer
321
views
AWS Glacier and Ransomware
I'm trying to understand the structure of how AWS Glacier works because I have a problem.
Problem:
I have a NAS that backs up to Glacier about once a week. About two weeks ago the NAS got infected ...
-1
votes
1
answer
49
views
How to control AWS EC2 live from a web app [closed]
We are building some penetration testing stations (both attack & target) for a hackathon in AWS VPC and I need a way to control the following in a live setting:
VPN connection access: if someone ...
2
votes
1
answer
555
views
Schedule RDS upgrades/downgrades
I have a project that sends notifications to various services. Users manage their subscriptions 24 hours a day, but we need a stronger MySQL RDS instance during the week (t3.xlarge), specifically Tue-...
2
votes
1
answer
2k
views
AWS Cloudformation Template error: every Ref object must have a single String value
SNSTopic
Type: 'AWS::SNS'......
SNSTopic2
Type: 'AWS::SNS'.......
EventRule:
Type: 'AWS::Events::Rule'
Properties:
Name: !Ref EventRuleName
Description:
State: ...
-2
votes
1
answer
3k
views
How can I connect AWS by using AWS-CLI in Windows Subsystem Linux?
I am totaly new for AWS I am trying to use awscli by calling below code :
root@DESKTOP-QK5VI8R:~# aws s3 ls
I applied lots of solution for that:
I added port 8888 into Inbound/Outbound Rule set in ...
1
vote
0
answers
286
views
Create custom AMI for Aarch64 with latest Debian and custom Kernel
I am trying to create a custom Debian based AMI with my own custom kernel for AWS EC2 instances,
specifically I'm trying to run it on t4g.micro/medium instances.
I debootstrap an ARM64 Debian and copy ...
0
votes
0
answers
598
views
Terminating AWS ECS services and tasks automatically
We have created a ECS cluster with Fargate and have created few tasks in service to be used in a CI/CD pipeline. Service has desired count of 1. So if we terminate any task, new task comes up ...
7
votes
1
answer
5k
views
AWS - VPC creation date
Could you possibly let me know how I can check when the VPC has been created? Or how to check in cloudtrail who created vpc via cli?
I've tried to use cloudtrail and search in event name for CreateVpc ...
0
votes
0
answers
216
views
Copy old data from local Centos to AWS S3 bucket
I have the following task to complete. I hope someone can provide the feedback to get me started.
We have a directory with thousands of images in many folders and sub-folders
The goal is to have a ...
0
votes
1
answer
1k
views
Add Error Logging to script
I have the following Big Sur Mac OS script:
#!/bin/zsh
/usr/local/bin/aws s3 cp /Library/FileMaker\ Server/Data/Backups/S3/noon_db_* s3://testbackupnoon
rm -rf /Library/FileMaker\ Server/Data/...
0
votes
2
answers
908
views
How to check via aws cli if a Security Group description contains a secific string?
Using aws cli, I would like to be able to fuzzy search for a part of a string in the 'description' of a Security Group.
For example let's say Security Group sd-afafaf00 contains "Hey there kaipee&...
3
votes
1
answer
1k
views
pip upgrade downloading every previous version until storage is full
On CentOS 7, I am trying to upgrade awscli:
/usr/bin/python3 -m pip install awscli --upgrade --user
Why is this downloading every single previous version, until there is finally no space left on ...
0
votes
1
answer
790
views
AWS WAF Web ACL Rule -- programmatically get details
While adding resources to protect with AWS Shield Advanced through the console, the 'wizard' created a Web ACL rate-limiting rule, which I can see in the console under
AWS WAF > Web ACLs > ...
0
votes
2
answers
107
views
AWS backup is not in the list of command line interface commands
When I'm trying to use aws backup on my AWS server through command-line interface, but it's not in the list of available commands. How do I add this in?
Currently when I run
aws backup
I get the ...
1
vote
1
answer
336
views
What is the best way to attach instance to auto scaling?
This is my first post so hope I will get the answer.
I want to create auto scaling on my existing EC2 instance, so I found this approach so hope someone will tell me is it good ( or suggest me how to ...
1
vote
1
answer
1k
views
How to tag launch template _itself_ in AWS with JSON and `create-launch-template` AWS CLI
While creating EC2 launch templates with the create-launch-template AWS CLI ec2 command and a JSON spec, I can't seem to figure out how to tag the template itself. I'm providing the TagSpecifications ...
1
vote
1
answer
2k
views
How to automate the generation of the table schema json for aws dynamodb create-table?
Currently if I run aws dynamodb create-table --generate-cli-skeleton, it will generate a template for me to fill in column definitions etc to create a new dynamodb table.
I want to be able to dump ...
0
votes
1
answer
1k
views
Cannot Delete S3 Bucket even though the IAM user as S3FullAccess policy
I cannot delete the bucket from an IAM user account which uses a virtual MFA device profile
I have generated session toekns and added it to the profile section of ~/.aws/credentials file. and the ...
0
votes
0
answers
113
views
Launching RStudio Server from AWS EC2 instance on Chromebook Linux/Debian Terminal
So I was able to install and activate the rstudio-server but I'm not sure how to launch the server so I can start writing and running script through a local host as described in https://indicatrix.org/...
3
votes
2
answers
7k
views
awscli v2 needs sudo to run otherwise get permission denied error ubuntu 20.04.01
I've installed the awscli V2 as per the official AWS instructions here:
$ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
$ unzip awscliv2.zip
$ ...
1
vote
1
answer
6k
views
SSH connection getting a Connection timed out in AWS
I have a website hosted in AWS EC2 with the t2.micro instance(Ubuntu 18.04.4). When I tried to connect through Putty or browser-based SSH connection from the AWS console, i am getting a connection ...
0
votes
1
answer
109
views
VM ram requirement for aws s3 sync job
I have a VM setup to sync 15TB of data split in 25GB volumes to S3 using the latest awscli v.2. I have a 100Mbps upload capacity, and the job will probably take 16 days. I haven't had any experience ...
6
votes
2
answers
5k
views
AWS-CLI - Find ELB by Name tag
I'm trying to find a load balancer that has a Name tag with some value.
aws elb describe-load-balancers --query 'LoadBalancerDescriptions[*].LoadBalancerName'
I'm iterating over the results and ...
1
vote
0
answers
666
views
How to access a S3 bucket accessible only through a EKS Pod
We've got a S3 bucket we use to store files used by an application deployed on EKS, to access the bucket we have a secret web identity token.
The application maintenance guys sometime need to browse ...
0
votes
0
answers
807
views
How do I poll for when the ssm agent is started and session manager can connect for newly created instances?
I use SSM to connection to windows ec2 instances with the cli: aws ssm start-session --target <id>
It takes the ssm service on a windows instance a few mins to start sometimes
I can check when ...
3
votes
1
answer
2k
views
How to discover the kernel of Amazon AMIs
The AWS documentation says that one can see details of AMIs by running the following:
aws ec2 describe-images
However, the returned description does not seem to include the kernel version (for Linux ...
2
votes
4
answers
5k
views
How to post logs to Cloudwatch with CLI?
Im tring to create a bash script that checks the status of the website, Im using this command:
This one to create the logstream
aws logs create-log-stream --log-group-name "WebsiteStatusMessage" --...
1
vote
1
answer
406
views
Amazon SES data via AWS S3: Is there a simple way to list and download a folder and get line counts?
I've set up Amazon SES to send a company announcement to a list of about 1,000 contacts. I set up the Kenesis Firehose to log all e-mail events (e.g., Send, Bounce, Click) to a bucket in S3. SES seems ...
0
votes
1
answer
622
views
SSH public key must be specified when running with AWS - error thrown while creating the kops cluster
I followed every steps as per the standard documentation described in both the aws & kubernetes. But still I get this error. May I know the reason behind this prompt?
1
vote
1
answer
905
views
Request times out when applying terraform plan on AWS, or describing instances through AWS CLI
I am having an issue accessing the following endpoint from an EC2 instance located in a private subnet.
Architecture is the following:
VPC
Private Subnet 1 (there is a route on 0.0.0.0/0 to Transit ...
14
votes
2
answers
38k
views
Is there any way of viewing, in AWS, what ips in a subnet have been allocated?
Is there any way of seeing what ip addresses AWS thinks have been allocated in a subnet? I've run a ping scan, and I've checked our internal ip management software, and there should be more than 8 ips ...
14
votes
2
answers
12k
views
How to set a binary secret value from the CLI for AWS Secrets Manager
How do I set a binary value on a secret in AWS Secrets Manager using the CLI?
The docs say:
--secret-binary (blob)
(Optional) Specifies binary data that you want to encrypt and store in the ...
0
votes
0
answers
30
views
Did AWS stop allowing PUTs to S3 locations more than one directory deep through the AWS CLI?
On our various servers that have a product that includes a database, I create a job that runs a small script that makes a backup of the database, compresses the file, and sends it to S3. I have one ...
1
vote
1
answer
2k
views
What is the format of S3 lifecycle configuration?
My Problem
An S3 lifecycle configuration changes object storage classes. A typical usage is periodically moving objects to cheaper storage classes after a specified retention period.
I am trying to ...
2
votes
1
answer
2k
views
How to find out the endpoint url of a node of a redis cluster via aws cli 'elasticache describe-cache-clusters'?
If I run aws elasticache describe-cache-clusters I will get results like this:
{
"CacheClusterId": "dev-001",
"ClientDownloadLandingPage": "https://console.aws.amazon.com/...