What about if you want to incorporate some lines of code that would check if the instance is running, don't do anything, but if it is stopped, start it and stop it at a given time? Where in your script can you add that logic?
so how to do this if I want 50 instances to start and stop (it is not a good idea to mention all the instance ID in the lambda function) instead of one or two ?? Please help me ...
You can tag the instances you want to schedule using the 'Tags' option. Once you give all the instances you want the same tag, implement the code linked here: ua-cam.com/video/bv-CKOMPCpI/v-deo.html
I found this: "Boto3 is the name of the Python SDK for AWS. It allows you to directly create, update, and delete AWS resources from your Python scripts." Posting for other users whom might need clarity on this too
I have never commented on youtube, but your sincerity well deserved
Simple and clear. you saved my lot of search work. Kudos for you .
Nice one. Keep posting real time uses with multiple AWS services involved. Thanks
really its superb and informative video...Thank you so much
Dude! this saved me a lot of time! Thank you for sharing! much appreciated!
What about if you want to incorporate some lines of code that would check if the instance is running, don't do anything, but if it is stopped, start it and stop it at a given time? Where in your script can you add that logic?
Instead if hardcode instance ids.. Any way to get them using tags
Good job! Keeps working perfectly!
How do we check whether the instance is stopped before executing the stop instance?
Excellent video. thanks
amazing video tutorial. Thank u profoser
Clearly explained sir thank u
You are a genius! Thank you!
that was awesome explanation. Good job bro, keep posting
so how to do this if I want 50 instances to start and stop (it is not a good idea to mention all the instance ID in the lambda function) instead of one or two ?? Please help me ...
You can tag the instances you want to schedule using the 'Tags' option. Once you give all the instances you want the same tag, implement the code linked here:
ua-cam.com/video/bv-CKOMPCpI/v-deo.html
Excellent video and nice explanation
This is very well explained. What if incase of stopping instances in multiple regions?
Nice video sir!! But what if my instances are in ASG ?
excellent video
Thanks lot bro
I am getting error tasked time out afet 3 sec how please help someone
Go to configuration in Lambda function and hit on edit, then you can increase the time to 15 seconds or even more.
What does the "import boto3 " stand for or do in this code
I found this:
"Boto3 is the name of the Python SDK for AWS. It allows you to directly create, update, and delete AWS resources from your Python scripts."
Posting for other users whom might need clarity on this too
liked subscribed and shared :)
ERRO
FOUND WHILE TESTING
Response:
{
"statusCode": 200,
"body": "\"Hello from Lambda!\""
}
Request ID:
"59370eda-3249-4ba4-a945-807d406d796b"
Function logs:
START RequestId: 59370eda-3249-4ba4-a945-807d406d796b Version: $LATEST
END RequestId: 59370eda-3249-4ba4-a945-807d406d796b
REPORT RequestId: 59370eda-3249-4ba4-a945-807d406d796b Duration: 1.45 ms Billed Duration: 2 ms Memory Size: 128 MB Max Memory Used: 48 MB
CAN I GET YOUR MOBILE NO
@@mazharmiya123 Deploy the code and then test it, it will work