prasanna
07/24/2025, 4:12 PMAndrew
07/24/2025, 5:33 PMprasanna
07/25/2025, 2:55 PMStephen Colebrook
07/30/2025, 1:05 PMBrian Gaber
07/31/2025, 9:25 PM- name: unused-credentials
resource: iam-user
filters:
- type: usage
LastAuthenticated:
type: value
value_type: age
op: greater-than
value: 45
match-operator: any
I get this error:
c7n_org:ERROR Exception running policy:unused-credentials account:go-noc-rd region:us-east-1 error:argument of type 'type' is not iterable
Any ideas on cause of error?Joe Vaughan
08/01/2025, 3:41 PMAsik Rasool
08/04/2025, 7:19 PMrole
to all the policy section.. is there anyway to mentioned Lambda IAM role in single place instead of just mentioning in all the policies section.
Exception running policy:ec2-auto-tagger account:default region:us-east-1 error:Lambda function role must be specified
Exception running policy:ami-auto-tagger account:default region:us-east-1 error:Lambda function role must be specified
Exception running policy:eip-auto-tagger account:default region:us-east-1 error:Lambda function role must be specified
Phe Nguyen
08/06/2025, 1:48 AMBrian Gaber
08/06/2025, 3:40 PMcloudcustodian/c7n
and cloudcustodian/c7n-org
Docker images be FIPS compliant so that they could be used in a FedRAMP environment?Michael Davis
08/11/2025, 7:49 PM- name: ec2-stopped-over-60-notify-windows
resource: aws.ec2
description: |
Notify Windows team of instances stopped over 60 days.
query:
- instance-state-name: stopped
filters:
- Platform: windows
- type: state-age
op: gt
days: 60
- not:
- or:
- "tag:cc-exemption": "stopped-dr"
- "tag:cc-exemption": "stopped-asneeded"
Michael Davis
08/11/2025, 7:49 PMSteveL
08/12/2025, 1:04 PMPong
08/12/2025, 7:47 PMSteveL
08/13/2025, 11:23 AMJacob
08/14/2025, 3:17 PM- "tag:owner": absent
- "tag:environment": absent
But using something like the below does not work:
- "label:owner": absent
You can definitely filter on label values. Just can’t find how to filter on missing labelsSteveL
08/20/2025, 10:21 AMSteveL
08/20/2025, 11:15 AMDerrick Tumblin
08/27/2025, 12:25 AMRB
08/28/2025, 12:36 AMreduce
filter and it was working but then leaving a few resources per account and never cleaning them up
limit: 5
limit-percent: 10
It seemed like there was only 2 resources found and then custodian would calculate 10% of that which is 0.2 and then it would round it down instead of up so we'd have N number of resources per account that were not getting flagged.Raul
08/29/2025, 4:45 PMSteveL
09/01/2025, 8:25 AMHimanshu Vishwakarma
09/02/2025, 12:55 PMcertManager:
enabled: true
policies:
source: configMap
configMap:
policies:
- name: missing-recommended-labels
mode:
type: k8s-admission
on-match: deny
operations:
- CREATE
- UPDATE
description: |
Kubernetes recommmended the following labels from its docs:
app.kubernetes.io/name
app.kubernetes.io/instance
app.kubernetes.io/version
app.kubernetes.io/component
app.kubernetes.io/part-of
app.kubernetes.io/managed-by
<https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/>
resource: k8s.pod
filters:
- or:
- metadata.labels."app.kubernetes.io/name": absent
- metadata.labels."app.kubernetes.io/instance": absent
- metadata.labels."app.kubernetes.io/version": absent
- metadata.labels."app.kubernetes.io/component": absent
- metadata.labels."app.kubernetes.io/part-of": absent
- metadata.labels."app.kubernetes.io/managed-by": absent
webhook:
caBundle: will-be-replaced-by-cert-manager
rules:
- apiGroups: [""]
apiVersions: ["v1"]
operations: ["CREATE"]
resources: ["pods"]
scope: Namespaced
---
After running helm install command I am getting this error on pod.
Name: c7n-kube-7b85676644-rswxb
Namespace: c7n-system
Priority: 0
Service Account: default
Node: kind-c1-control-plane/172.18.0.2
Start Time: Tue, 02 Sep 2025 17:51:37 +0530
Labels: app=c7n_kube
app.kubernetes.io/component=AdmissionController
app.kubernetes.io/instance=c7n-kube
app.kubernetes.io/managed-by=Helm
app.kubernetes.io/name=c7n_kube.app_name
app.kubernetes.io/part-of=c7n
app.kubernetes.io/version=0.1.2
helm.sh/chart=c7n-kube-0.1.2
pod-template-hash=7b85676644
Annotations: <none>
Status: Running
IP: 10.244.0.27
IPs:
IP: 10.244.0.27
Controlled By: ReplicaSet/c7n-kube-7b85676644
Containers:
web:
Container ID: <containerd://776f08f3a3dd5b87776797b6ce7268922404e40c40c1f2062c46596b6d6ee7e>3
Image: cloudcustodian/c7n:0.9.46.0
Image ID: docker.io/cloudcustodian/c7n@sha256:dee7aa35360b32295d69654658dbf60965575ff067748cd6ee3766fa282a259a
Port: 8443/TCP
Host Port: 0/TCP
Command:
c7n-kates
Args:
--host=0.0.0.0
--port=8443
--policy-dir=/policies
--on-exception=warn
--endpoint=/mutation
--cert=/cert/tls.crt
--ca-cert=/cert/ca.crt
--cert-key=/cert/tls.key
State: Waiting
Reason: CrashLoopBackOff
Last State: Terminated
Reason: StartError
Message: failed to create containerd task: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "c7n-kates": executable file not found in $PATH: unknown
Exit Code: 128
Started: Thu, 01 Jan 1970 05:30:00 +0530
Finished: Tue, 02 Sep 2025 18:23:29 +0530
Ready: False
Restart Count: 11
Environment: <none>
Mounts:
/cert from certificate (rw)
/policies from policies (rw)
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-cf8wc (ro)
Conditions:
Type Status
PodReadyToStartContainers True
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
certificate:
Type: Secret (a volume populated by a Secret)
SecretName: c7n-kube-webhook
Optional: false
policies:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: c7n-kube-policies
Optional: false
kube-api-access-cf8wc:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional: <nil>
DownwardAPI: true
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 32m default-scheduler Successfully assigned c7n-system/c7n-kube-7b85676644-rswxb to kind-c1-control-plane
Normal Pulled 32m kubelet Successfully pulled image "cloudcustodian/c7n:0.9.46.0" in 1.715s (1.715s including waiting). Image size: 161547461 bytes.
Normal Pulled 32m kubelet Successfully pulled image "cloudcustodian/c7n:0.9.46.0" in 1.733s (1.733s including waiting). Image size: 161547461 bytes.
Normal Pulled 32m kubelet Successfully pulled image "cloudcustodian/c7n:0.9.46.0" in 1.783s (1.783s including waiting). Image size: 161547461 bytes.
Normal Created 31m (x4 over 32m) kubelet Created container web
Warning Failed 31m (x4 over 32m) kubelet Error: failed to create containerd task: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "c7n-kates": executable file not found in $PATH: unknown
Normal Pulled 31m kubelet Successfully pulled image "cloudcustodian/c7n:0.9.46.0" in 1.644s (1.644s including waiting). Image size: 161547461 bytes.
Normal Pulling 31m (x5 over 32m) kubelet Pulling image "cloudcustodian/c7n:0.9.46.0"
Warning BackOff 2m26s (x140 over 32m) kubelet Back-off restarting failed container web in pod c7n-kube-7b85676644-rswxb_c7n-system(14ff6ab5-2d8e-49e1-9285-399dddd863bf)
SteveL
09/03/2025, 10:49 AMMatthew Tordoff
09/03/2025, 5:29 PMNaohito Takeuchi
09/05/2025, 4:35 PMSteveL
09/08/2025, 7:44 AMMuhammad Shujat Hussain
09/08/2025, 6:02 PMTed Harwood
09/10/2025, 5:29 PMUmair Khan
09/15/2025, 1:31 PMMichael Davis
09/15/2025, 6:33 PM