简体   繁体   中英

Cloudwatch custom event is not triggered

When i create the ec2 instance the cloud watch event should trigger, But it is not working.. Below is the event Json. Could you please help.

The same event is triggered successful in other aws account, I not sure what is wrong with this account. IAM policy to lambda has complete access and when i test lambda code it is working fine.. But the problem is the event should be triggered.

  {
  "detail-type": [
    "AWS API Call via CloudTrail"
  ],
  "detail": {
    "eventSource": [
      "ec2.amazonaws.com",
      "rds.amazonaws.com",
      "s3.amazonaws.com"
    ],
    "eventName": [
      "CreateVolume",
      "RunInstances",
      "RequestSpotInstances",
      "CreateSnapshot",
      "CreateVpnGateway",
      "CreateSecurityGroup",
      "CreateInternetGateway",
      "CreateNatGateway",
      "CreateVpc",
      "CreateSubnet",
      "CreateRouteTable",
      "CreateCustomerGateway",
      "CreateNetworkAcl",
      "CreateVpnConnection",
      "CreateImage",
      "CreateDBInstance",
      "CreateDBSnapshot",
      "CreateDBCluster",
      "CreateDBClusterParameterGroup",
      "CreateDBClusterSnapshot",
      "CreateDBInstanceReadReplica",
      "CreateDBParameterGroup",
      "CreateDBSecurityGroup",
      "CreateDBSubnetGroup",
      "CreateEventSubscription",
      "CreateOptionGroup",
      "CreateBucket"
    ]
  }
}

Are you configuring Trails from AWS CloudTrail to track API Calls?

1) Check on your Trails configuration if the Logging status is enabled or not.

在此处输入图像描述

2) Check again on your policies as most of the cases, we mis-configured our IAM policies so one of the services cannot work as expected.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM