Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Hugh Saunders
@hughsaunders
Hey, is there any way to include one policy in another, or set a global vars block for all policy files? I want to set notification defaults but have policies organised into files by resource type.
3 replies
Michael Davis
@MichaelDavisTSN
@ingwarsw Thanks for GCP labeling, it also fixed my issue #4838. How about a "copy-related-tags" for GCP. Should I open an issue? And @kapilt can anyone suggest a workaround that provides this functionality?
2 replies
fakiestyle
@fakiestyle
@kapilt I have added GCP custom resource to storage.py to get ACL's of buckets. added it to resource_map.py. It works. But there is no notify action in output of custodian schema, only webhook for this resource. How to add notify action? I'll do a PR if u can explain me how to add notify action for resource.
11 replies
JK
@JK_AWS_twitter
New to Cloud Custodian.... Looking though documentation. Is there anyway that GCP can leverage Cloud functions in the same (similar) manner as AWS Lambda?
6 replies
fakiestyle
@fakiestyle
image.png
11 replies
fakiestyle
@fakiestyle
```
Jimmy Grover
@jimmy.grover_gitlab
Is it possible to list the principal values o an SQS Q. Were trying to track down SQS Q with "*" in the principal.
30 replies
Thomas Callahan
@tcallahan06_gitlab
Hello Everyone, new to Cloud Custodian. I was wondering if there is any cleanup/removal functionality? Lets say I deploy a policy that creates a lambda in 10 accounts. Is there a way to remove that policy and have it cloud custodian remove any resources it created? Or do you have to manually go clean them up?
6 replies
tomarv2
@tomarv2
question on off-hours, i want to shutdown ec2 instances from 8pm - 8am, based on the time-zone, can this be accomplished by one policy or different policy, like ec2 instances used by team in India(apac-) shutdown at their night and while team is us (us-*) regions shutdown in their time
4 replies
Karl de Castro Fonseca
@KarlCF
Hey guys, sorry if this is a dumb question, but is there a way for a policy to always trigger an action? I have a lambda that I need to run periodically, and I know that I can set the periods on Cloud-Custodian, but I also need to make sure that it is triggered. I'm open to explore solutions outside of the tool, but would prefer it if it was with it
5 replies
pjshort22
@pjshort22
image.png
@kapilt on the Cloud_Custodian container images, can awscli be added to image, as latest awscli breaks cloud custodian as when latest awscli installed, itupgrades botocore to latest version which is then incompatiable with boto3 version used by cloud custodian. I am looking to use awscli on container to transfer fer files to and from s3
3 replies
Gautami007
@Gautami007
Hello Team, Need some help on Azure Security Group lockdown policy open to world.
@kapilt if you can take a look into it quickly!
I am getting below error, while executing policy;
2020-06-08 19:39:20,946: custodian.resources.networksecuritygroup:INFO NSG Cloudcustodiansecgrp. Creating new rule to Deny access for ports ['3389']
2020-06-08 19:39:22,316: custodian.resources.networksecuritygroup:ERROR Failed to create or update security rule for Cloudcustodiansecgrp NSG.
2020-06-08 19:39:22,421: custodian.resources.networksecuritygroup:ERROR Azure Error: SecurityRuleInvalidPriority
Message: Security rule has invalid Priority. Value provided: 90 Allowed range 100-4096.
10 replies
pendyalal
@pendyalal
hi all, when i select the output directory as s3 and writing all the resources to a cross account bucket, then is custodian setting "bucket-owner-full-control" for that object?
2 replies
Marty Hill
@martyhill
Can a c7n policy attach an IAM Managed Policy to new IAM User in response to the IAM CreateUser event? I've been reading/searching without luck. Thanks.
2 replies
José Netto
@mineiro
Hey guys! I'm using c7n-mailer to send events to a Splunk that's using a private signed certificate. Is there a way to include a custom CA bundle in the c7n-mailer lambda?
aakshaik2
@aakifshaikh
With 0.9.2.0 release do I have to change the python version in the build pipeline: because version 2 is no longer supported? @kapilit
1 reply
build:
docker:
- image: circleci/python:2.7.14
Dan Parsons
@danparsons
Is there a way to have c7n/c7n-mailer send emails not just To: but also add a cc: address? basically, send 2 emails per report instead of just one
34 replies
veenagurram
@veenagurram
@kapilt Can we use Custodian to find ELB missing stickiness, if yes what will be the filter ? and can we add stickiness if missing, if yes what will be the action?
4 replies
pendyalal
@pendyalal
@Kapilt, Can custodian check if there are any long proccesing jobs running on EC2?
4 replies
Zohaib Ahmad Hassan
@zahassan
What is better tool for security and compliance CloudCustodian or AWS Config?
3 replies
Zohaib Ahmad Hassan
@zahassan
If there are some S3 Buckets with Access Status Error Can we skip them using filters ?
pendyalal
@pendyalal

What is better tool for security and compliance CloudCustodian or AWS Config?

of course CloudCustodian. Custodian, will check for violations and take actions immediately, within a minute or two.

2 replies
Our observation with AWS Config is the delay.
fakiestyle
@fakiestyle
Guys, I need your help. How to write key with colon symbol?
key: resources[].c7n:bucket[].bindings[].members[]
python thinks that bucket is value of c7n when yml converting to json
11 replies
Steven Scoleri
@scoleri
aws workspaces delete?
JK
@JK_AWS_twitter
Leveraging JSON file output to various automated reports? Anyone define any best practices or recommendations there? An example might be to leverage tags to see EC2 growth across multiple accounts within applications. Thoughts?
Trevor Cotton
@TrevorCottonGB_twitter
Hi - I am having a problem with a policy I wrote a while back. I thought it worked but now it is failing. I want to auto-tag AWS Elastic IPs when they get created so the mode type is cloudtrail. This docs are confusing me - should the resource by network-addr or elastic-ip? The error I get is botocore.exceptions.ParamValidationError: Parameter validation failed:
Unknown parameter in input: "AllocationId", must be one of: Filters, PublicIps, AllocationIds, DryRun
Code is
2 replies
  • name: eip-auto-tag-creator
    resource: network-addr
    mode:
    type: cloudtrail
    role: arn:aws-us-gov:iam::{account_id}:role/cc7nautotagger
    tags:
      Project: Infra
      Env: core
    events:
    - source: "ec2.amazonaws.com"
      event: "AllocateAddress"
      ids: "responseElements.publicIp"
    filters:
    • tag:CreatorName: absent
      actions:
    • type: auto-tag-user
      tag: CreatorName
      principal_id_tag: CreatorId
Jimmy Grover
@jimmy.grover_gitlab
can you use report function with out an S3 and just pull from the local output folder?
1 reply
SrikanthSoma
@SrikanthSoma_gitlab
cloud custodian detect findings from aws compute optimizer findings and remediates?
1 reply
pendyalal
@pendyalal
hi all, Can we get the usage of iam-role?
20 replies
Jake
@DjangoFett
Hi All, I've been having issues with this policy. I can't for the life of me figure out why it is not working. I've spent a great deal of time looking at it, but can't for the life of me figure out why it wouldn't filter correctly. Anyone have any thoughts?
policies:
  - name: get-ec2-manual-sg-edits
    resource: security-group
    description: |
        Trap events wherein a Security Group is not edited via specified users

    mode:
      type: cloudtrail

      events:
        - source: ec2.amazonaws.com
          event: AuthorizeSecurityGroupIngress
          ids: 'requestParameters.groupId'
        - source: ec2.amazonaws.com
          event: AuthorizeSecurityGroupEgress
          ids: 'requestParameters.groupId'
        - source: ec2.amazonaws.com
          event: RevokeSecurityGroupEgress
          ids: 'requestParameters.groupId'
        - source: ec2.amazonaws.com
          event: RevokeSecurityGroupIngress
          ids: 'requestParameters.groupId'

    filters:
      - not:
        - type: event
          key: 'detail.userIdentity.arn'
          value: example
          op: contains

    actions:
      - type: notify    
        template: get-ec2-manual-sg-edits.html
        priority_header: '1'
        subject: 'AWS Guardrails: Trap manual Security Group rule edits'
        to:
          - event-owner
        transport:
          type: sqs
          queue: <queue>
          region: us-east-1
2 replies
pendyalal
@pendyalal
@kapilt , c7n-trailcreator works for cloudformation resources too? Let's say if I'm creating a DBInstances using cloudformation template, then can we get creator name using c7n-trailcreator
1 reply
Edward Moon
@edwardmoon
is there any ec2 filters to detect classic ec2 instances?
luceropv
@luceropv
I like to run in a hourly basis snapshot but for somereason this is not working periodically, just once, can you give me some suggestion?
policies:
- name: ec2-daily-backup
  resource: ec2
  description: |
     Cloud Custodian EBS Daily Backup
  comments: |
     Cloud Custodian EBS Daily Backup based on tag mybackup
     mode:
       type: periodic
       schedule: "rate(60 minutes)"
       role: arn:aws:iam::178375044839:role/custodian-generic-role
  filters:
   - "tag:mybackup": present

  actions:
   - type: snapshot
     copy-tags:
       - Owner
       - Appname
Limon Chandra Howlader
@limonhowlader
Hi @kapilt, How are you?
I'm interested to setup Cloud Custodian on my Azure Cloud Infrastructure. Could you please guide me how to do that ?
pendyalal
@pendyalal
@Kapilt I've the below policy to find iam-role last usage. so I've few users who assumed custodian-role in last 1 day. When I run the below policy ,I couldn't find any users. I'm sure that I'm missing something in the policy. Also when ran the policy noticed 6004 api calls. Is it normal?
policies:
  - name:  role-usage
    resource: iam-role
    region: us-east-1
    filters:
       - type: value
         key: RoleName
         value: "custodian-role"
       - type: usage
         TotalAuthenticatedEntities: 1
         LastAuthenticated:
             type: value
             value_type: age
             op: lt
             value: 1
         match-operator: all
vkuchi
@vinaykuchibhotla
Hi, I have custodian deployed in lambda's in several accounts and trying to send notifications from all those lambdas to a dedicated Slack channel. Most of the example policy's I came across use sqs as transport type even for slack messages and trying to understand why an sqs queue is needed for sending notifications to a slack channel. Any thoughts please. thnx.
tynas
@tynas
Hi, is support for AWS WAFv2 on the roadmap for cloud custion? I would like to be able to check if logging is enabled on deployed web acls
2 replies
Amit Sehgal
@amitsehgal
Have you added maidoffhour tag to RDS clusters... i can add it fine for EC2 but getting error on RDS -> Tag values may only contain unicode letters, digits, whitespace, or one of these symbols: . : / = + - @ (Service: AmazonRDS; Status Code: 400; Error Code: InvalidParameterValue; Request ID: 64f008e6-9ff2-459f-b4e3-399bffcc0d01)
how are you overriding on and off time for RDS ?
off=(M-U,21);on=(M-U,4)
"maid_offhours": "off=(M-U,21);on=(M-U,4)"