iann0036 / AWSConsoleRecorder

Records actions made in the AWS Management Console and outputs the equivalent CLI/SDK commands and CloudFormation/Terraform templates.
MIT License
1.42k stars 87 forks source link

Ability to filter non-mutable requests #38

Open PatMyron opened 5 years ago

PatMyron commented 5 years ago

Many read-only requests generated from navigating the console that people might want to filter out. This reduces output and makes it easier to identify which modifying requests are made.

iann0036 commented 5 years ago

Hi Pat,

Thanks for raising. Could I confirm that this would be for the Boto3 output and/or the other SDKs?

Fair warning, this one could take a little bit.

PatMyron commented 5 years ago

I've only looked at the CLI output so far, but this could be helpful for all of the output formats.

How do you currently block mutable requests?

iann0036 commented 5 years ago

The extension is 100% passive, so only looks at the calls you are making with your role.

I've manually mapped which calls are or aren't mutable on a per-method basis, but it's not easy to use for the reverse due to the way its originally coded.

PatMyron commented 5 years ago

have a link to the section of the code with the manual mapping?

iann0036 commented 5 years ago

In bg.js, anywhere that has:

if (blocking) {
    notifyBlocked();
    return {cancel: true};
}

Which translates to, "if the block mutable requests option is on, show a popup and block the request".

Looking at it now though, I also realise I have a was_blocked property on each output that was used for putting the little comment in informing you that request was blocked. We can probably do a quick condition on that before it gets exported to the actual template.

CloudCray commented 5 years ago

From Option to hide ec2client.describe actions (issue #41, referenced above)

Boto3 output generates a high number of ec2_client.describe_ commands.

This comes out very noisy if performing an action through a wizard. This is especially noticeable with autocomplete form fields, such as the "add tags" form when launching an EC2 instance - a new ec2_client.describe_tags command is added for each keystroke.

These are read-only commands which don't write or display their output anywhere. I'm sure these are useful to someone designing a user flow on top of AWS Console, but I imagine most users are only interested in the commands that alter their AWS resources.

Would love a settings parameter or on-page filter to hide/remove all ec2_client.describe_ actions (or read-only actions in general).

Better yet, the ability to filter/hide output based on regex or something.