There seems to be a lot of duplicated code between the methods.

To avoid that, it would be great if you could split duplicated code which populates the `params` dict into a separate method. You could call it `_get_common_security_group_params` or something like that.

Then inside those methods, you could do something like:

```python
params = self._get_common_params...
params['Action'] = 'Action'
```