Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [aws]

Amazon Web Services (AWS) is a collection of commercial services centered around virtualized, commodity and clustered computing, networking, database and storage, as well as supporting tools that are offered through infrastructure as a service

2
votes
1answer
10 views

Resize EBS with LVM

AWS supports live EBS resize. I increased from 10G to 20G on my /dev/sdb1. Step 1: pvresize /dev/sdb1 # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT xvda 202:0 ...
1
vote
1answer
49 views

Syntax error checking if file exists [closed]

A bash script running in Amazon Linux 2 is trying to test if a file exists. Then if it does exist, the script should delete the file. The following error gets thrown every time the script runs. ...
0
votes
1answer
34 views

Setup IP and port forwarding in AWS

I have a web server in AWS EC2 for example with http://11.22.33.44 listening to port 80. I would like to do something like port forwarding such as if I'm browsing the website IP from my home network ...
0
votes
0answers
19 views

Not able to save crash dump using kdump

I have a VPS server on amazon's AWS Lightsail service. I've been testing kdump using the following two commands(to trigger an automatic kernel crash): # echo 1 > /proc/sys/kernel/sysrq # echo c &...
2
votes
0answers
44 views

How to trim down Amazon Linux OS for more free space?

I use EC2 on Amazon Web Services. The OS of the t2.micro instance is a customized “Amazon Linux” with 1 GiB RAM and 1 vCPU. When accessing this instance via their Cloud9 IDE I find that by default ...
2
votes
1answer
38 views

How to add second IPv4 Public IP to amazon Linux EC2 instance

I have EC2 instance (Linux OS) and I added second network interface to it. I got public Elastic IP and assigned to the network interface. Then I assigned network interface to the EC2 Instance. When I ...
0
votes
2answers
41 views

How to send the mail's body as fail when the condition fails?

I have an S3 bucket....in which files will be uploaded daily and i should mail them...Mail is working fine...But when the file is not uploaded the mail is sent with empty mail body...How can i put as "...
1
vote
2answers
56 views

Update file with multiple values automatically

I have a hosted zone and record set that route to multiple addresses. I'd like to update the record set with adding or removing one IP address in the list. Unfortunately, AWS CLI doesn't provide the ...
0
votes
0answers
7 views

Change Tags for Existing Resources in AWS

I am Trying to change the AWS Tags for the Existing EC2 resources based on Key-Value pair. If Key-value pair matches, add/modify the tag. I am using AWS CLI for this operation declare -a instance ...
0
votes
0answers
40 views

Bash Script with awscli Query Flag Failure

I know the syntax is very ugly but my script below is working fine except "--query" flag of awscli. It's deactivating the old keys and generating the new one for each user. I want the script to write ...
0
votes
0answers
43 views

VPN S2S IPSec. Linux strongswan to AWS VPN and routing problem

I want to connect my Linux Centos 7 to AWS VPC VPN Ipsec. I have got problem with a routing. My IPSec connection via Strongswan is UP. conn Tunnel1 auto=start left=%defaultroute leftid=...
-1
votes
1answer
26 views

How to download AWS documentation using linux terminal?

I tried to download AWS documentation using wget and curl commands. I realized and turned off robot and set Mozilla as browser header. But still failed to recursively download the entire documents.
0
votes
1answer
28 views

Detect bot on AWS

We use angular for our front end, our compiled dist folder is uploaded to an S3 bucket which is connected to a load balancer. In order for our site to be rendered correctly for search engine bots we ...
2
votes
0answers
84 views

PHP Curl when accessing SSL slows down connection. How to correct?

After migrating to a new server, our scripts slowed down dramatically. Some troubleshooting showed that the slowdown occurred during Curl connections as the server was trying to load the SSL cert. ...
1
vote
1answer
34 views

Are CentOS 7 binaries the same of Ubuntu or any other GNU distribution?

I need to compile and run binaries on CentOS 7 but I'm having hard time running my wrapper app due to Python versions and other issues. If I compile and test binaries on Ubuntu (or any other ...
0
votes
0answers
19 views

Executing bash script through PHP to connect to AWS fails

I am trying to initiate an AWS instance through a bash script. This bash script is invoked by a PHP script. My example php script: <?php exec("sh /var/www/html/pushDatToAWS.sh >> $...
1
vote
0answers
57 views

AWS Linux image - where to put application directory?

I need to install my application files in the linux server. Where should I put the files? and what are the permission that I should set? Can I put them at /var/app? (AWS Beanstalk put the app at /var/...
0
votes
0answers
67 views

SSH Error on AWS EC2

After connecting succesfully to AWS on the latest iMac through Bash Script 1: chmod 400 ~/PEM.pem ssh -i "~/PEM.pem" ec2-user@address.com jupyter notebook --no-browser --port=8888 Then opening a ...
0
votes
0answers
57 views

How to calculate the throughput usage of AWS EBS volume

We have a hadoop cluster running on AWS EC2 instances. Configured 16T st1 volume in datanodes for HDFS usage. We need to understand, what is the maximum throughput hitting on this st1 volumes. Since ...
-1
votes
2answers
59 views

SELinux is preventing $_POST variables on Amazon Linux 2

I began playing with RPM based OSes and I am really impressed. Amazon Linux doesn't include setroubleshoot in any of their repos. I want to use official repos for everything, otherwise I would ...
-1
votes
1answer
698 views

Installation conflicts with httpd on Amazon Linux AMI

When installing 'yum install -y php70 mysql56-server php70-mysqlnd' on an Amazon Linux AMI server, I'm receiving these conflicts: Error: httpd24-tools conflicts with httpd-tools-2.2.34-1.16.amzn1....
0
votes
2answers
63 views

How does a EC2 machine prevents ssh root access with a warning?

I've setup a machine on EC2 running Debian stretch. Upon trying to ssh as root, I get the following message: $ ssh -i "mykey" root@machine Please login as the user "admin" rather than the user "...
0
votes
0answers
397 views

pods going into pending state in k8s

I have cluster autoscaler in my k8s deployment in AWS. The cluster is deployed via kops,, the cluster autoscaler was working fine for weeks,, My cluster is in Mumbai region (ap-south), which has 2AZ. ...
1
vote
1answer
193 views

Security review: classifying ssh log-in attempts [closed]

I see my own ssh logins to an AWS EC2 Ubuntu Linux instance as Nov 18 07:32:21 ip-10-20-30-40 sshd[9487]: Accepted publickey for ubuntu from 15.26.37.48 port 46273 ssh2: RSA SHA256:e37A/...
0
votes
3answers
408 views

How can we generate the session token in aws

i have aws access key and secret key with me. i wanted session token to be updated in aws credential file (~/.aws/credentials), how will i get it? I want them to be generated in command line.
6
votes
2answers
535 views

Is it possible to get aws account id with only aws access key and secret key in command line (CLI)

Is it possible to get aws account id with only aws access key and secret key in command line (CLI) I have access key and secret key with me. Is it possible to get the account id using those in ...
0
votes
1answer
266 views

Only copy files from a particular date from s3 storage

I would like to only copy files from S3 that are from today out of a certain bucket with 100s of files. I tried the following: $ aws s3 ls s3://cve-etherwan/ --recursive --region=us-west-2 | grep ...
0
votes
0answers
20 views

How to secure a common tunnel relay server

I would like to use a single AWS server as a relay to access multiple client hosts that each would have a reverse ssh tunnel to the server. I need them to be isolated between each other meaning that ...
0
votes
1answer
46 views

Running multiple screen commands with crontab and log them seperately, giving each a seperate screen name

How can I log the output of multiple screen sessions which are executed by crontab seperately? Currently I am running them in "screen -dm -L " style in crontab but it logs all the sessions to ...
0
votes
1answer
88 views

Host of issues stemming from too many symlink levels errors

On an AWS EC2 instance, I was upgrading imagemagick. Current installation was 6.8.x which is vulnerable, and I was moving it to 6.9.10-12 which if I read properly, I think it's patched. Somewhere ...
2
votes
0answers
197 views

REPO Error: HTTP Error 403 - Forbidden during firefox-compat install from AWS EC2 instance

tmp]$ sudo yum --enablerepo=epll install firefox-compat Loaded plugins: priorities, update-motd, upgrade-helper Could not retrieve mirrorlist http://repo.lambda-linux.io/2018.03/epll/x86_64/os/mirror....
1
vote
1answer
53 views

mysqldump on mariadb 10 extremely slow [closed]

I'm running a MariaDB 10.1.34 instance on AWS RDS. Instance specs are as follows: Instance Class: db.t2.large Storage: 100GiB gp2 DB Size: 1.2 GiB I'm trying to create a mysqdump from an EC2 ...
1
vote
1answer
104 views

local vs non-local chsh

How do I get chsh in Amazon EC2 (Linux 2)? $ chsh -s /bin/zsh zsh: command not found: chsh Here's what I see: $ ls -ahl /usr/bin/ | grep chsh -rwxr-xr-x 1 root root 16K Jul 27 21:02 lchsh ...
0
votes
2answers
23 views

I want to transfer data from AWS to my physical computer using scp command

My AWS server has public IP address a.b.c.d and my computer has private IP address 192.168.1.25 and public IP address x.y.z.t How do I transfer data using scp command?
1
vote
1answer
74 views

Building QuantLib on Amazon Linux

I am trying to get QuantLib version 1.13 running on Amazon Linux. I found some .rpm files at https://pkgs.org/download/QuantLib, although there is an up to date .rpm for Fedora, there isn't one for ...
1
vote
1answer
26 views

Increase space on part/lvm or mount

So, long story short, got a server(EC2) with 2 EBS pointed to it. (100G & 200G). Upon investigation, I come across that the /var/www mount has only 50GB assigned. My requirement is to increase ...
0
votes
0answers
8 views

Is it possible to store logs for elastic search remotely?

The goal is to have ELK stack running on cloud such as AWS, however storing log data remotely in our data center. We would like to go with this approach because we have a lot of data and storage is ...
1
vote
1answer
92 views

AWS CLI, pass output of previous command as input for another?

I would like to create a Bash script that will start and stop specific resources in AWS. The problem I have is I would like to create a resource the requires the a specific resource ID that was ...
0
votes
1answer
32 views

(BASH) String to execute is formed correctly, but evaluated with errors

I have been persistently trying to solve an issue with some code that I'd like to use to interact with AWS CLI. After trying for about a week, I decided to try to create the string of the command I'd ...
0
votes
1answer
155 views

Bash environment variables not setting [duplicate]

I am trying to configure the AWS CLI using a bash script. I have the below in my script and it will not set the values. When I echo out the variables names it just shows a blank line. script code ...
0
votes
1answer
29 views

Unable to establish SSH connection between two AMI ec2 instances

Trying to establish ssh connection between two ec2 instances. Copied Host A id_rsa.pub key to Host B's authorized_keys file [root@ip-172-31-9-173 .ssh]# cat id_rsa.pub ssh-rsa ...
0
votes
1answer
368 views

Limiting recursive 'aws s3 ls' searches by number of items in the folder

Here's the scenario: I need to recursively search through tons and tons of folders and subfolders and spit out the results to a log file using the ls command, BUT, I need to stop searching a folder ...
3
votes
1answer
421 views

kops unable to deploy elb for ingress controller

i am unable to deploy nginx ingress in kops 1.9 in aws with this kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/mandatory.yaml kubectl apply -f https://raw....
1
vote
1answer
957 views

Regex to get single value from Json file using bash

I would like to retrieve a value "tenki-deploy-topic" from the below JSON file content. I used this regex grep -o 'topic[^"]*' output.log, then it gets all the files with the topic, instead, I want to ...
0
votes
1answer
202 views

system-wide timezone question -red hat enterprise 7

For my user account I explicitly export the TZ variable to be america/chicago in my .bash_profile file, so when I type: date, I get the date in CST. However I have not set the TZ variable for any ...
0
votes
0answers
28 views

AWS Polly TTS issue

The SDK polly (text-2-speech) c++ application was working fine, but suddenly stops responding. The credententials are active. I am really stuck on this for the last 2 days, I could not able to move ...
0
votes
1answer
65 views

Why after some time I lose connectivity to my host on IPv6 when using ip6tables?

I was experimenting with ip6tables (version 1.6.0) on EC2 instances using Debian 9 AMI, I noticed that after some time I lose connectivity to the server on the IPv6 address while I can still reach the ...
0
votes
0answers
28 views

span OpenVPN network (from one VPC) to another VPC

Here is the scenario: VPC1 has OpenVPN: OpenVPN is connected to home network. EC2 instances in VPC2 need to connect to home network via OpenVPN in VPC1. EC2 instances in VPC3 need to connect to home ...
4
votes
0answers
346 views

Running docker in docker in AWS Fargate

I am thinking of running docker in docker using this. Can I run it in AWS Fargate task? It doesn't have underlying host so was not sure that would work or not.
0
votes
0answers
61 views

Pod fails to come up when crashed in kops env

I am facing this issue while my deployment crashes and tries to recreate it self in kops environment. The thing once crashed the pod get reschedule to a different and tries to mount the PV , but ...