boto / boto

For the latest version of boto, see https://github.com/boto/boto3 -- Python interface to Amazon Web Services

Home Page:http://docs.pythonboto.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

get_all_spot_instance_requests throws warning if length of security group id is not 11

sanket-singhal opened this issue · comments

get_all_spot_instance_requests throws warning if length of security group id is not 11. This shouldn't throw a warning as SGs id can be of length 20 as well as per latest standards. \

Culprit code:

if filters:
            if 'launch.group-id' in filters:
                lgid = filters.get('launch.group-id')
                if not lgid.startswith('sg-') or len(lgid) != 11:
                    warnings.warn(
                        "The 'launch.group-id' filter now requires a security "
                        "group id (sg-*) and no longer supports filtering by "
                        "group name. Please update your filters accordingly.",
                        UserWarning)
            self.build_filter_params(params, filters)