revmischa / sublime-awslambda

Sublime Text 3 plugin for editing AWS Lambda function sources easily
10 stars 6 forks source link

Change regions... #5

Open sathed opened 7 years ago

sathed commented 7 years ago

First off, I just found this yesterday and absolutely love it! One thing that would be really cool is if we could change regions without having to run aws configure every time. I'm not great with boto3, but I believe this can be done with region_name. This would be similar to passing --region in the AWS CLI.

My thought would be to have a list maybe in the menu. Something like:

λ |―― Change Region |―――― us-east-1 |―――― us-east-2 |―――― us-west-1 |―――― us-west-2 |―――― ap-northeast-2 |―――― ap-southeast-1 |―――― ap-southeast-2 |―――― ap-northeast-1 |―――― eu-central-1 |―――― eu-west-1 |―――― eu-west-2

If I get some time this weekend, I'll dive into it a bit and see what it would take, but I don't think it would be too difficult at all.

Also, that list is the actual list of regions where Lambda is available.

Thanks again for making such a great tool!

revmischa commented 7 years ago

Yeah that's a good idea! Should just require editing the menu file and creating a set-region command. The region is specified in the boto3 resource constructors

revmischa commented 7 years ago

Pull requests welcome!