Link for the Code to create EC2 instance with Security Groups: github.com/Pythoholic/pythoholic_demo_aws/blob/master/AWSPYDemo/sourcefiles/aws_ec2_advanced.py Join this channel to get access to perks: kzbin.info/door/lCB_NDN1-cmbhIEPQcf83Ajoin
@nadeem58362 жыл бұрын
I have been stuck for around 30 min to get this resolved this string issue [permission & permissions] & later you explained. Anyway, Thanks a Lots!!
@ashu91034 жыл бұрын
You’re best 😊
@ayyappama37214 жыл бұрын
Your videos very helpfull, Please make video on how to mount ssl certificate on ec2 using cloudflare(https for webserver)
@Pythoholic4 жыл бұрын
Sure 👍
@rodrigofernandez95822 жыл бұрын
if vpc["Tags"][0]["Value"].__contains__("Default"): KeyError: 'Tags' help pls
@Pythoholic2 жыл бұрын
please check if the vpc has tag key and then check if it is getting the values
@rodrigofernandez95822 жыл бұрын
@@Pythoholic I have another question, how do I make my project run on the assigned IP of ec2? and thank you
@roya20453 жыл бұрын
Hi Pytho are all of your aws tutorial video sets complete have you covered everything?
@Pythoholic3 жыл бұрын
There are a few simple services left that but most are done. 95 percent it's done. But I keep.on adding more to give more information
@roya20453 жыл бұрын
@@Pythoholic cool bro thanks keep the pace up upload videos on regular basis if possible thanks again!!
@시몬-s8w Жыл бұрын
when i change if vpc["Tags"][0]["Value"].__contains__("Default"): to if vpc["Tags"][0]["Value"].__contains__("my"): to use my_vpc but def create_security_group uses Default vpc to find SG. I just paste your code and change default -> my could you fix tis issue? thankyou anyway
@Pythoholic11 ай бұрын
It seems like you're working with a script that interacts with AWS VPCs and you want to adjust it to work with a VPC tagged as "my_vpc" instead of the default VPC. The issue appears to be in the way the script is checking the VPC tags to identify the correct VPC. Here's a more flexible approach to modify the script: 1. **Identify VPCs by Tags Dynamically**: Instead of hardcoding the tag value, use a variable to store the tag value you're interested in (e.g., "my_vpc"). This makes it easy to change the targeted VPC without altering the code structure. 2. **Handle Multiple Tags and Case Sensitivity**: Tags can be case-sensitive and VPCs can have multiple tags. Ensure your code iterates through all tags and performs a case-insensitive comparison. Here's a revised snippet based on your description: ```python # Set your desired tag value desired_tag_value = "my_vpc" # Flag to identify if the desired VPC is found desired_vpc_found = False # Iterate through all VPCs for vpc in vpcs: # Check if 'Tags' key exists in vpc if "Tags" in vpc: # Iterate through each tag in the VPC for tag in vpc["Tags"]: # Check if the 'Value' of the tag matches your desired value (case-insensitive) if tag["Key"] == "Name" and tag["Value"].lower() == desired_tag_value.lower(): desired_vpc_found = True # Your code to create a security group or perform other actions on the desired VPC # ... break # Exit the loop after finding the desired VPC # Break out of the outer loop if the desired VPC is found if desired_vpc_found: break # Check if the desired VPC was not found if not desired_vpc_found: print(f"No VPC found with the tag value: {desired_tag_value}") ``` This code snippet does the following: 1. Iterates through each VPC and its tags. 2. Checks if the 'Name' tag of a VPC matches the desired value ('my_vpc'), case-insensitively. 3. If a match is found, it flags that the desired VPC is found, and you can add your logic to create a security group or perform other actions. 4. If after the iteration no desired VPC is found, it prints a message. Remember to replace the comment `# Your code to create a security group or perform other actions on the desired VPC` with the actual code that creates the security group or performs other actions.
@sagarkuvlekar66843 жыл бұрын
How we can schedule ec2 instance for only working hours and from mon-fri..???
@Pythoholic3 жыл бұрын
You can go for a scheduled ec2 instance or more complicated way run a lambda script to start and stop instances using a cron that runs it periodically as per ur requirement
@shamanthreddy81544 жыл бұрын
Can You do video on TRANSIT GATEWAY
@vaibhavbansal72254 жыл бұрын
How many more videos will come for completing the course?
@Pythoholic4 жыл бұрын
It's already completed, it's like almost 95 percent completed but I keep on adding videos to.this so that I can share extra details that are important
@vaibhavbansal72254 жыл бұрын
@@Pythoholic Thank you so much for this wonderful course. Hats off for all the hard work you have done for making this series look easy and understandable.