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

Amazon Web Services (AWS) provides a web services platform in the cloud. With AWS you can requisition compute power, virtual machine instances, storage through a variety of databases and file stores as your needs scale up or down.

SDKs to access and manage Amazon Web Services are provided in a multitude of programming languages, including PHP, Java, .NET. The services are also accessible through the REST and SOAP APIs, command-line interface, and web dashboard.

With Amazon Web Services, you can take advantage of Amazon.com’s global computing infrastructure that is the backbone of their multi-billion retail business spread across various regions.

Resources:

426 questions
13
votes
4 answers

rsync with different user

I'm working with two ubuntu instances on AWS (which I use a pem key to access them). I set up rsync for both instances, and it works if I use the default user which is ubuntu@ipaddress. However if I try to use rsync with another user (I'm typing…
Fadi
  • 315
  • 1
  • 3
  • 12
11
votes
5 answers

Check if file exists in S3 Bucket

This directory /data/files/ has thousands files like: 1test 2test 3test [...] 60000test 60001test I'm also sending them to a S3 Bucket (AWS), using AWS CLI. However, sometimes the S3 bucket can be offline and because of that the file is…
Patrick B.
  • 119
  • 1
  • 1
  • 5
11
votes
1 answer

How is an Elastic IP address different from a static IP address?

More of a Amazon Web Services EC2 question, hopefully not too off topic. I have a vanilla Ubuntu instance with them, and powered it off. On reboot couldn't ssh to the FQDN because the external IP address had changed. It costs extra for a "static",…
Thufir
  • 1,810
  • 6
  • 33
  • 60
10
votes
2 answers

How to set environment variables permanently in Amazon Linux 2

I have experimented with many approaches to setting permanent environment variables EC2 instances running Amazon Linux 2, but none of the approaches are persistent across users and across login sessions. What specific syntax and process will…
CodeMed
  • 5,079
  • 45
  • 100
  • 147
8
votes
3 answers

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.
Vandhana
  • 313
  • 1
  • 3
  • 10
8
votes
3 answers

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 command line.
Vandhana
  • 313
  • 1
  • 3
  • 10
8
votes
2 answers

Xvfb -screen --> Cannot establish any listening sockets - Make sure an X server isn't already running

I wonder, why isn't this working? $ screen $ Xvfb -screen :1 1024x768x16 & [1] 17540 $ _XSERVTransSocketINETCreateListener: ...SocketCreateListener() failed _XSERVTransMakeAllCOTSServerListeners: server already running (EE) Fatal server error: (EE)…
Incerteza
  • 2,641
  • 4
  • 20
  • 22
7
votes
3 answers

What are the benefits of this command line (/usr/bin/awk '{$1=$1};1') instead of pure cat

I am reading the AWS eic_harvest_hostkeys script and I don't understand this line: key=$(/usr/bin/awk '{$1=$1};1' < "${file}") What is the of benefit awk? Isn't key=$(/bin/cat "${file}") better?
K-attila-
  • 624
  • 2
  • 13
7
votes
2 answers

jq filter for only 'null' values

I have a json file with a load of AWS CloudWatch logs (generated from a CLI command). I'm trying to use jq to only return values for entries that don't have a 'retentionInDays' field. I have the following which returns everything as I want, but I…
Mcar49
  • 173
  • 1
  • 1
  • 4
7
votes
2 answers

Getting Public IP address of EC2 instance from outside using AWS-cli

I am trying to make use of Amazon's elasticity and bring instances online and off using the AWS cli. But as you know, every time you offline a system, and bring it back to life, it comes with a new IP address. I have AWS-cli package installed on my…
MelBurslan
  • 6,836
  • 2
  • 24
  • 35
7
votes
3 answers

Accidentally port 22 got closed, how do I fix the SSH access?

Accidentally, Port 22 got closed. I cannot ssh into the instance, though the instance are running well on other desired ports. Getting following error while doing SSH. ssh: connect to host X.X.X.X port 22: Connection refused I restarted the…
Ajeet Khan
  • 251
  • 1
  • 3
  • 8
6
votes
1 answer

Return the private IP of an EC2 instance from within the EC2 instance

What specific syntax can be used to return the private IP address of an Amazon Linux EC2 instance from the command line within that instance? So far, I have come up with the following: # Get private IP from inside the instance by filtering inside…
CodeMed
  • 5,079
  • 45
  • 100
  • 147
6
votes
0 answers

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.
Mirage
  • 121
  • 1
  • 1
  • 4
6
votes
1 answer

ImportError: No module named botocore.session - when running AWS CLI from Rundeck

I can't run AWS CLI commands via Rundeck, from terminall all works fine, installed boto3,botocore also installed import sys import os if os.environ.get('LC_CTYPE', '') == 'UTF-8': os.environ['LC_CTYPE'] = 'en_US.UTF-8' import…
Milister
  • 517
  • 2
  • 7
  • 16
6
votes
1 answer

Why is NFS client using low-numbered ports?

I am running a CoreOS EC2 instance. I run a process on this instance that listens on local port 950. Usually, everything works fine, but after a recent reboot of the CoreOS server the process could not listen on port 950 because it was already taken…
rlandster
  • 723
  • 1
  • 8
  • 22
1
2 3
28 29