I started writing my lambda function using python and boto3,
I managed to work on every region separately but I didn't see how I can work in a few regions together.
This is how I announce my client:
region= 'ap-southeast-2'
ec2 = boto3.client('ec2', region_name=region)
If I do not give it a region it will run on the region you created your lambda function on, which is something I don't want.
Did anyone did it before?
If you do not give it a region it will use the region your Lambda function is running in.
If you want to make AWS API calls in multiple regions via Boto3 you will have to create a client object for each region, and make separate API calls for each region.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With