AWS VPN Client - Helper tool is required error - amazon-web-services

When i try to connect, it says "AWS VPN Client is trying to install a new helper tool." i enter my password and within a sec i get this popup "AWS VPN Client Helper Tool is required to establish the connection.".
When i try to uninstall vpn client it says "Uninstallation failed."

Related

AWS ec2Client socket timeout - can't connect through docker to aws services

I am trying to programmatically create a key pair with the AWS JS sdk. I am working within a docker container on an EC2 server. My aws credentials are correct as well as the region. After creating the client, I send keypair request with await client.send(command) with the client being the Ec2Client created the credentials, and the command being created by the CreateKeyPairCommand- after which i receive the following error Error [TimeoutError]: Socket timed out without establishing a connection within 1100 ms at Timeout._onTimeout (/usr/src/app/node_modules/#aws-sdk/node-http-handler/dist-cjs/set-connection-timeout.js:12:38) at listOnTimeout (node:internal/timers:564:17) at process.processTimers (node:internal/timers:507:7) { '$metadata': { attempts: 5, totalRetryDelay: 1029 } }
My hunch is that it is an issue with the ports and the way the sdk communicates with aws. Upon further research, I've come to see that aws communicates over ports 443 for HTTPS and 80 for HTTP, which are both exposed for my docker application both in the containers as well as the associated security group. I can ssh into the client and connect with the container, and run requests from postman through the container otherwise. It is only when the aws sdk tries to send a request that this networking error presents itself. If you have any ideas, let me know!

VPN connection to Amazon RDS with openvpn suddenly fails

I set AWS Client VPN Endpoint, and downloaded opvn file, configured it to refer to cert/key files and connected to AWS RDS.
It used to success connecting yesterday, but today, after re-installing ESET security app
It shows the following error when I trying connecting with MySQL client app:
ERROR 2005 (HY000): Unknown MySQL server host 'myrds.something.ap-northeast-1.rds.amazonaws.com' (0)
I am not sure how to detect the cause of the error. If I configured RDS settings to pubilc, the error above not shown and just waiting for minutes...
(maybe I guess some DNS settings overriden by ESET? )
You can easily debug the problem:
AWS Client VPN Endpoint, You can see the active connection. See if you are connected to it or not.
Do you restarted or reinstall RDS also, Because it will change the URL to connect.
Is username/password of DB is changed.
If RDS is in public setting you don't even need a VPN connection.
Also as suggested above check VPN to RDS VPC Route.
Thanks,
AB
here are some troubleshooting steps.
When you connect your VPN:
Check if it's pushing the DNS server address via DHCP configuration
Check if new routes are added to your route table. you can do "route print" in the windows command line
Hope this helps.

How to connect to AWS EMR via AWS QuickSight

I am trying to connect to AWS QuickSight with AWS EMR via Spark JDBC.
I gave hostname of AWS EMR Master node and Port 18080, but I am not sure about the username and password.
https://i.stack.imgur.com/66Acv.png
Even when i click on validate i am getting the below error:
[Simba]SparkJDBCDriver Error initialized or created
transport for authentication: javax.net.ssl.SSLException: Unrecognized
SSL message, plaintext connection?.
Couldnt find anywhere on what needs to be inputted in the fields. Any help would be appreciated.
I figured out. here are the steps:
Start thriftserver in EMR server.
sudo /usr/lib/spark/sbin/start-thriftserver.sh
The port for Spark Thriftserver will be : 10001
Either enable this port in EMR inbound setting or use SSH Tunnel to connect to spark via JDBC.
Username and password could be anything.
SSL needs to be unchecked in QuickSight to connect.

Connecting to Postgres using private IP

When creating my Postgres Cloud SQL instance I specified that would like to connect to it using private IP and chose my default network.
My VM sits in the same default network.
Now, I follow instructions as described here https://cloud.google.com/sql/docs/postgres/connect-compute-engine
and try executing
psql -h [CLOUD_SQL_PRIVATE_IP_ADDR] -U postgres
from my VM, but get this error:
psql: could not connect to server: Connection timed out Is the server
running on host "CLOUD_SQL_PRIVATE_IP_ADDR" and accepting TCP/IP connections on
port 5432?
Anything I am under-looking?
P.S. My Service Networking API (whatever that is) is enabled.
If you have ssh to a VM in the same network you can connect to Cloud SQL using cloud SQL proxy:
Open the ssh window (VM-instances in Computer engine and click on ssh), then download the proxy file with:
wget https://dl.google.com/cloudsql/cloud_sql_proxy.linux.amd64 -O cloud_sql_proxy
Execute, in the ssh shell
chmod +x cloud_sql_proxy
Create a service account with role Cloud SQL Client and create an api key. Download the json key in your local computer.
In the ssh vm shell click on the wheel and "upload", and upload the key file
5.
./cloud_sql_proxy -instances=<Instance connection name>=tcp:5432 -credential_file=<name of the json file>
where "Instance connection name" can be found in SQL-Overview -> Connect to this instance
Finally
psql "host=127.0.0.1 port=5432 sslmode=disable user=<your-user-name> dbname=<your-db-name>"
On the other hand, if you want to connect to cloud sql from your local computer and the cloud sql instance does not have a public ip you have to connect through a bastion host configuration.
https://cloud.google.com/solutions/connecting-securely
According to this document connect via private ip, you need to setup following item:
You must have enabled the Service Networking API for your project. If you are using shared VPC , you also need to enable this API for the host project.
Enabling APIs requires the servicemanagement.services.bind IAM permission.
Establishing private services access requires the Network Administrator IAM role.
After private services access is established for your network, you do not need the Network Administrator role to configure an instance to use private IP.

AWS ec2: ssh_exchange_identification: read: Connection reset by peer

I have aws linux ubuntu ec2 t2.micro instance with django application deployed, recently I installed boto3 and django-storages on my ec2 instance and created s3 bucket, after which I was unable to makemigrations on my django project as it kept saying
"-bash: fork: Cannot allocate memory issue in EC2 "
after which I stopped and started ec2 server and then I am unable to access ec2 via command line or ftp, even with new public ip. it says
"ssh_exchange_identification: read: Connection reset by peer"
ftp connects sometimes but then few moments later it again says
"Error: Connection reset by peer
Error: Could not connect to server"
need some help here that if issue is due to my storage or usage limit or for some other reason?
Thanks,
Bilal