I hereby claim:
- I am kapilt on github.
- I am kapilt (https://keybase.io/kapilt) on keybase.
- I have a public key ASC8ksFDb5vcwt3JbTR9L_7coVTMMy2f2iqrv9O6bJ4Orgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| # Copyright 2018 Capital One Services, LLC | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| policies: | |
| - name: ec2-run | |
| resource: ec2 | |
| mode: | |
| type: cloudtrail | |
| events: | |
| - RunInstances | |
| role: arn:aws:iam::xyz:role/CloudCustodianRole |
| policies: | |
| - name: mark | |
| resource: ec2 | |
| filters: | |
| - "tag:Action": absent | |
| actions: | |
| - type: mark-for-op | |
| tag: Action | |
| op: stop |
| import re | |
| from datetime import datetime, timedelta | |
| class Date(object): | |
| date_increment = re.compile('\+[0-9]+[md]') | |
| def __init__(self, d=None): | |
| self._d = d |
Sometimes you really want to scan all objects, or in the words of gary oldman from the professional, "bring me EVERYONE" :-) There are a couple of different reasons for that from an org perspective, given current feature sets, most of it involves catching up on s3 security from both an acl and encryption perspective after the fact.
Salactus provides for scale out scanning of every s3 object with configurable object visitors. It also supports s3 inventory as a
| test |
| import boto3 | |
| import time | |
| from botocore.session import Session as CoreSession | |
| from botocore.hooks import HierarchicalEmitter | |
| import traceback | |
| import token_bucket |
| (require 'package) ;; You might already have this line | |
| (add-to-list 'package-archives | |
| '("melpa" . "https://melpa.org/packages/")) | |
| (package-initialize) ;; | |
| (global-font-lock-mode t) | |
| (setq inhibit-startup-mesage t) | |
| (setq make-backup-files nil) | |
| (add-hook 'after-init-hook #'global-flycheck-mode) |
| """Pypy memory leak issue | |
| this needs to process some large buckets to show the continual memory | |
| accumulation. growth after 100 pages processed shows increase from 240mb rss | |
| to 1221 mb rss. | |
| interestingly playing around with chunk size shows dramatic effects on memory | |
| growth rate. | |
| """ |