Task:
Change the instance type from t2.micro to t2.nano for datacenter-ec2 instance through aws-cli only.
2) Make sure the ec2 instance datacenter-ec2 is in running state after the change
Task validation is failing. Any suggestions ?
{
"Reservations": [
{
"ReservationId": "r-002876ad5a67734d4",
"OwnerId": "211125588626",
"Groups": [],
"Instances": [
{
"Architecture": "x86_64",
"BlockDeviceMappings": [
{
"DeviceName": "/dev/xvda",
"Ebs": {
"AttachTime": "2024-10-27T15:39:15.000Z",
"DeleteOnTermination": true,
"Status": "attached",
"VolumeId": "vol-08cd279d3f4261ecc"
}
}
],
"ClientToken": "584060d5-ec7c-4ea9-9af9-e135d256ada6",
"EbsOptimized": false,
"EnaSupport": true,
"Hypervisor": "xen",
"NetworkInterfaces": [
{
"Attachment": {
"AttachTime": "2024-10-27T15:39:14.000Z",
"AttachmentId": "eni-attach-0825f6c3f20de7df5",
"DeleteOnTermination": true,
"DeviceIndex": 0,
"Status": "attached",
"NetworkCardIndex": 0
},
"Description": "",
"Groups": [
{
"GroupId": "sg-0eab8db740744a5ba",
"GroupName": "default"
}
],
"Ipv6Addresses": [],
"MacAddress": "0a:ff:f5:32:51:59",
"NetworkInterfaceId": "eni-0f5be362c4857c17c",
"OwnerId": "211125588626",
"PrivateDnsName": "ip-172-31-29-249.ec2.internal",
"PrivateIpAddress": "172.31.29.249",
"PrivateIpAddresses": [
{
"Primary": true,
"PrivateDnsName": "ip-172-31-29-249.ec2.internal",
"PrivateIpAddress": "172.31.29.249"
}
],
"SourceDestCheck": true,
"Status": "in-use",
"SubnetId": "subnet-0b32b52b931abb35b",
"VpcId": "vpc-02acc4b37fc8d0805",
"InterfaceType": "interface"
}
],
"RootDeviceName": "/dev/xvda",
"RootDeviceType": "ebs",
"SecurityGroups": [
{
"GroupId": "sg-0eab8db740744a5ba",
"GroupName": "default"
}
],
"SourceDestCheck": true,
"StateReason": {
"Code": "Client.UserInitiatedShutdown",
"Message": "Client.UserInitiatedShutdown: User initiated shutdown"
},
"Tags": [
{
"Key": "Name",
"Value": "xfusion-ec2"
}
],
"VirtualizationType": "hvm",
"CpuOptions": {
"CoreCount": 1,
"ThreadsPerCore": 1
},
"CapacityReservationSpecification": {
"CapacityReservationPreference": "open"
},
"HibernationOptions": {
"Configured": false
},
"MetadataOptions": {
"State": "applied",
"HttpTokens": "required",
"HttpPutResponseHopLimit": 2,
"HttpEndpoint": "enabled",
"HttpProtocolIpv6": "disabled",
"InstanceMetadataTags": "disabled"
},
"EnclaveOptions": {
"Enabled": false
},
"BootMode": "uefi-preferred",
"PlatformDetails": "Linux/UNIX",
"UsageOperation": "RunInstances",
"UsageOperationUpdateTime": "2024-10-27T15:39:14.000Z",
"PrivateDnsNameOptions": {
"HostnameType": "ip-name",
"EnableResourceNameDnsARecord": false,
"EnableResourceNameDnsAAAARecord": false
},
"MaintenanceOptions": {
"AutoRecovery": "default"
},
"CurrentInstanceBootMode": "legacy-bios",
"InstanceId": "i-0e91077be141a0c94",
"ImageId": "ami-0c101f26f147fa7fd",
"State": {
"Code": 80,
"Name": "stopped"
},
"PrivateDnsName": "ip-172-31-29-249.ec2.internal",
"PublicDnsName": "",
"StateTransitionReason": "User initiated (2024-10-27 16:10:21 GMT)",
"AmiLaunchIndex": 0,
"ProductCodes": [],
"InstanceType": "t2.nano",
"LaunchTime": "2024-10-27T15:39:14.000Z",
"Placement": {
"GroupName": "",
"Tenancy": "default",
"AvailabilityZone": "us-east-1b"
},
"Monitoring": {
"State": "disabled"
},
"SubnetId": "subnet-0b32b52b931abb35b",
"VpcId": "vpc-02acc4b37fc8d0805",
"PrivateIpAddress": "172.31.29.249"
}
]
},
{
"ReservationId": "r-04804f51c1038a875",
"OwnerId": "211125588626",
"Groups": [],
"Instances": [
{
"Architecture": "x86_64",
"BlockDeviceMappings": [
{
"DeviceName": "/dev/xvda",
"Ebs": {
"AttachTime": "2024-10-27T16:24:01.000Z",
"DeleteOnTermination": true,
"Status": "attached",
"VolumeId": "vol-0d84d2a801f8ada42"
}
}
],
"ClientToken": "3e5c1e8a-3a4f-46b5-820e-ee2bf893129c",
"EbsOptimized": false,
"EnaSupport": true,
"Hypervisor": "xen",
"NetworkInterfaces": [
{
"Association": {
"IpOwnerId": "amazon",
"PublicDnsName": "ec2-54-81-250-185.compute-1.amazonaws.com",
"PublicIp": "54.81.250.185"
},
"Attachment": {
"AttachTime": "2024-10-27T16:24:00.000Z",
"AttachmentId": "eni-attach-007324859f5209cd0",
"DeleteOnTermination": true,
"DeviceIndex": 0,
"Status": "attached",
"NetworkCardIndex": 0
},
"Description": "",
"Groups": [
{
"GroupId": "sg-0eab8db740744a5ba",
"GroupName": "default"
}
],
"Ipv6Addresses": [],
"MacAddress": "0e:97:c9:f0:1c:9f",
"NetworkInterfaceId": "eni-096239cf6bc342009",
"OwnerId": "211125588626",
"PrivateDnsName": "ip-172-31-46-5.ec2.internal",
"PrivateIpAddress": "172.31.46.5",
"PrivateIpAddresses": [
{
"Association": {
"IpOwnerId": "amazon",
"PublicDnsName": "ec2-54-81-250-185.compute-1.amazonaws.com",
"PublicIp": "54.81.250.185"
},
"Primary": true,
"PrivateDnsName": "ip-172-31-46-5.ec2.internal",
"PrivateIpAddress": "172.31.46.5"
}
],
"SourceDestCheck": true,
"Status": "in-use",
"SubnetId": "subnet-02723957dc67adf2e",
"VpcId": "vpc-02acc4b37fc8d0805",
"InterfaceType": "interface"
}
],
"RootDeviceName": "/dev/xvda",
"RootDeviceType": "ebs",
"SecurityGroups": [
{
"GroupId": "sg-0eab8db740744a5ba",
"GroupName": "default"
}
],
"SourceDestCheck": true,
"VirtualizationType": "hvm",
"CpuOptions": {
"CoreCount": 1,
"ThreadsPerCore": 1
},
"CapacityReservationSpecification": {
"CapacityReservationPreference": "open"
},
"HibernationOptions": {
"Configured": false
},
"MetadataOptions": {
"State": "applied",
"HttpTokens": "required",
"HttpPutResponseHopLimit": 2,
"HttpEndpoint": "enabled",
"HttpProtocolIpv6": "disabled",
"InstanceMetadataTags": "disabled"
},
"EnclaveOptions": {
"Enabled": false
},
"BootMode": "uefi-preferred",
"PlatformDetails": "Linux/UNIX",
"UsageOperation": "RunInstances",
"UsageOperationUpdateTime": "2024-10-27T16:24:00.000Z",
"PrivateDnsNameOptions": {
"HostnameType": "ip-name",
"EnableResourceNameDnsARecord": false,
"EnableResourceNameDnsAAAARecord": false
},
"MaintenanceOptions": {
"AutoRecovery": "default"
},
"CurrentInstanceBootMode": "legacy-bios",
"InstanceId": "i-07eca78d17f4e86bf",
"ImageId": "ami-0c101f26f147fa7fd",
"State": {
"Code": 16,
"Name": "running"
},
"PrivateDnsName": "ip-172-31-46-5.ec2.internal",
"PublicDnsName": "ec2-54-81-250-185.compute-1.amazonaws.com",
"StateTransitionReason": "",
"AmiLaunchIndex": 0,
"ProductCodes": [],
"InstanceType": "t2.nano",
"LaunchTime": "2024-10-27T16:24:00.000Z",
"Placement": {
"GroupName": "",
"Tenancy": "default",
"AvailabilityZone": "us-east-1c"
},
"Monitoring": {
"State": "disabled"
},
"SubnetId": "subnet-02723957dc67adf2e",
"VpcId": "vpc-02acc4b37fc8d0805",
"PrivateIpAddress": "172.31.46.5",
"PublicIpAddress": "54.81.250.185"
}
]
}
]
}
~ on ☁️ (us-east-1) ➜