All Questions
Tagged with amazon-ec2 aws-cli
632 questions
0
votes
1
answer
42
views
Kubernetes Cronjob execution on specific node
I’m working on a setup where I need to run a specific container via a Kubernetes CronJob on a specific node. The workflow involves:
1️⃣ Launching a new node just before the CronJob execution.
2️⃣ ...
0
votes
2
answers
131
views
How to create aws cluster with infrastructure as ec2 and asg using aws cli
In the AWS online UI, when creating a cluster, a user can select these additional options:
Infrastructure:
Amazon EC2 instances
Auto Scaling group: Create new ASG|select
Provisioning model: On-...
0
votes
0
answers
27
views
How to list 3d party Amazon Marketplace instances with AWS CLI?
The EC2 -> Instances -> Reserved Instances shows some 3d party instances available for purchase:
How can this list be obtained with the AWS CLI?
I've tried:
aws ec2 describe-reserved-instances-...
0
votes
1
answer
169
views
How do I find all the available private IP addresses within a subnet in AWS VPC
I want to find out all the available (unused) private IP addresses within a subnet in AWS VPC.
The below command would list out all the private IP addresses that have been used (unavailable) within a ...
0
votes
0
answers
24
views
bash Command not executing on Ec2 from Lambda
I'm trying to run certain bash on a Ec2 instance that I create in a Lambda function.
code
const instanceParams = {
ImageId: "ami-0c101f26f147fa7fd",
InstanceType: "t2.micro&...
0
votes
1
answer
98
views
EC2 cannot access S3 in the same account with proper IAM role
I have two EC2 instances: ec2-1 and ec2-2, one s3 bucket: bucket-1, all in the same aws account.
both instances are associated with the same IAM role which has this trust relationship:
{
"...
0
votes
0
answers
149
views
AWS CLI : security group ID
I want to access the security group id. This is the command I used to create it, can anyone provide a one line command to view this table again?
aws --profile awscli-user-1 \
ec2 create-security-...
0
votes
0
answers
159
views
AWS CLI - SSM Start Session - Execute Commands on EC2 instance after starting Session Manager using PowerShell Script
I am writing a PowerShell script that access the file on ec2 instance using session manager with AWS CLI, calculate checksum of it and retrieve the checksum result.
I can be able to start the session ...
0
votes
2
answers
325
views
List only private snapshot of AWS EBS volume through aws cli
Hi I am trying to list only private snapshots of AWS EBS volumes through the AWS CLI and I couldn't find any reference online to proceed. Could experts please help?
aws ec2 describe-snapshots --query '...
0
votes
1
answer
116
views
Get error "InvalidClientTokenId" in a container running in ec2 instance
I have a container running in an ec2 instance attached with instance profile.
In my case, i have to use aws access key and secret key in the scripts running in the container to get access to aws ...
0
votes
1
answer
151
views
How to make AWS CLI describe-spot-price-history show only what I limit with start and end time options?
I use the start time and end time examples from the output of:
aws ec2 describe-spot-price-history help
The problem I experience is that I get also some results that are not within the time ...
0
votes
1
answer
56
views
AWS CLI describes instances of particular cloudformation stack
I have a cloudformation stack creates multiple EC2. Is there a CLI command that describes instances of a particular cloudformation stack?
0
votes
1
answer
762
views
When i tried to configure aws cli it is showing "No module named 'cryptography'" even after installing cryptography
When i tried to run aws configure command on ec2 instance it is showing no module name cryptography found .enter image description here
when I tried to install cryptography It is showing requirement ...
0
votes
2
answers
203
views
Differences in IAM Role Usage Between EC2 Instance and AWS CLI
I can connect to an ec2 instance in 2 ways:
via SSH
using the accessKey, secretKey, token and region via AWS CLI on my personal machine
When I run aws sts get-caller-identity (using the accessKey, ...
0
votes
1
answer
143
views
to get the instance count of a certain period via LaunchTime wrt Powershell
I have tried with the below
Is my Date format correct as per awscli LaunchTime ?
To get the last 5 Days Instance count which was created via LaunchTime with of AWS cli in Powershell:
$getDays = ...