amazon-ec2

AWS CLI - aws ec2 describe-instances to retrieve keypair mame for each EC2 instance

感情迁移 提交于 2021-01-29 05:51:42
问题 I am trying to query keypair names that are attached to each EC2 instance, the ec2 describe-instances below works fine, it does exactly what I need, but the column under the {keypair.Name} displays [NONE] I am not sure if I am using the proper parameter name - I know there are few keypairNames.epm attached on my EC2 instances when I login to the console, but I am not seeing that on my report that I run by the command below. Any input is much appreciated.. Thx ! aws ec2 describe-instances -

Only allow launch/start/stop/terminate of EC2 instances of a particular Instance Type

强颜欢笑 提交于 2021-01-29 05:20:24
问题 While launching on-demand instance from AWS I'm getting the following error: An error occurred (UnauthorizedOperation) when calling the RunInstances operation: You are not authorized to perform this operation. With some Encoded authorization failure message. But I'm unable to replicate the actual issue from the response as the decoded JSON message has an empty failure object although I'm able to launch spot-instance from the same IAM Policy. "allowed": false, "explicitDeny": false,

Connection to Redis (ElastiCache) from ElasticBeanstalk EC2 Fails

主宰稳场 提交于 2021-01-29 04:44:32
问题 We're using ElasticBeanstalk to setup a few Node.js environments. For now, we are using Redis as our session store, which is set up in ElastiCache. When I ssh into the EC2 instance, and netcat the Redis store, I can confirm that the network allows a connection over port 6379: [ec2-user@<redacted>]$ nc -v <redacted>.usw2.cache.amazonaws.com 6379 Connection to <redacted>.usw2.cache.amazonaws.com 6379 port [tcp/*] succeeded! EC2 Security Group's Outbound Policy: 0.0.0.0/0 Redis Security Group's

Connection to Redis (ElastiCache) from ElasticBeanstalk EC2 Fails

空扰寡人 提交于 2021-01-29 04:42:02
问题 We're using ElasticBeanstalk to setup a few Node.js environments. For now, we are using Redis as our session store, which is set up in ElastiCache. When I ssh into the EC2 instance, and netcat the Redis store, I can confirm that the network allows a connection over port 6379: [ec2-user@<redacted>]$ nc -v <redacted>.usw2.cache.amazonaws.com 6379 Connection to <redacted>.usw2.cache.amazonaws.com 6379 port [tcp/*] succeeded! EC2 Security Group's Outbound Policy: 0.0.0.0/0 Redis Security Group's

Next.js - ERROR Build directory is not writeable on EC2

試著忘記壹切 提交于 2021-01-28 19:09:35
问题 I'm running for the first time my Next.js app with a custom server.js on Elastic BeanStalk with 64bit Amazon Linux/4.11.0 . After the creation on the application, the environment and the deploy with the eb-cli I received a warning into the EB dashboard Environment health has transitioned from Degraded to Severe . I changed the Node command into the config to npm run deploy . Nothing changed. Here's my package.json . "scripts": { "start": "pm2 start server.js -i max", "build": "next build",

Get error “Too many authentication failures” by connecting to AWS EC2 through vnc viewer

爱⌒轻易说出口 提交于 2021-01-28 18:51:24
问题 I have set up an environment with AWS EC2 based on ubuntu 14.04 and configure vncserver under it. After everything is done, I am able to connect the EC2 instance with VNC viewer and see the desktop. However, after a period of time idle on vncviewer , the connection is disconnected and I have error "Too many authentication failures" After I restart the vncserver by going through ssh to EC2, I am able to use vncviewer to connect to the instance again. Any solution for me to not having the error

Unable ping AWS EC2 instance

痴心易碎 提交于 2021-01-28 18:13:07
问题 I have an EC2 instance running in AWS. However when I tried to ping from my local computer, but the request always times out Greatly appreciate any help following is the instance description Instance ID i-0a94ae92b852256a9 Public DNS (IPv4) ec2-3-15-2-190.us-east-2.compute.amazonaws.com Instance state running IPv4 Public IP 3.15.2.190 Instance type t2.xlarge IPv6 IPs - Finding Opt-in to AWS Compute Optimizer for recommendations. Learn more Elastic IPs Private DNS ip-172-31-5-133.us-east-2

boto3 how to retrieve the elastic ip from an instance

醉酒当歌 提交于 2021-01-28 16:47:52
问题 I need to do the following: I have some instances that contain a certain tag, I need to loop through those instances and for each instance which contains that certain tag, if that instance has an elastic ip attached, I need to tag that elastic ip with that same tag. My code is the following: import boto3 import json region_list = ['us-east-1'] session = boto3.Session(profile_name='default') for region in region_list: ec2 = session.resource('ec2',region) client = boto3.client('ec2',region) #

boto3 how to retrieve the elastic ip from an instance

北战南征 提交于 2021-01-28 16:33:21
问题 I need to do the following: I have some instances that contain a certain tag, I need to loop through those instances and for each instance which contains that certain tag, if that instance has an elastic ip attached, I need to tag that elastic ip with that same tag. My code is the following: import boto3 import json region_list = ['us-east-1'] session = boto3.Session(profile_name='default') for region in region_list: ec2 = session.resource('ec2',region) client = boto3.client('ec2',region) #

Cannot connect/query from Presto on AWS EMR with Java JDBC

南笙酒味 提交于 2021-01-28 12:22:20
问题 If I ssh onto the master node of my presto emr cluster, I can run queries. However, I would like to be able to run queries from java source code on my local machine that connects to the emr cluster. I set up my presto emr cluster with default configurations. I have tried port forwarding, but it still does not seem to work. When I create the connection, I print it out and it is "com.facebook.presto.jdbc.PrestoConnection@XXXXXXX" but I still have doubts if it is actually connected since I can't