Comments (7)
AWS Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowCustodianToActOnEc2Instances",
"Action": [
"ec2:CreateTags",
"ec2:DeleteTags",
"ec2:DescribeInstances",
"ec2:TerminateInstances",
"ec2:DescribeVolumes"
],
"Effect": "Allow",
"Resource": "*"
},
{
"Sid": "AllowCustodianToLogLambdaActions",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Effect": "Allow",
"Resource": "*"
}
]
}
from cloud-custodian.
Aws role. trusted entities.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "lambda.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
from cloud-custodian.
INIT_START Runtime Version: python:3.9.v31 Runtime Version ARN: arn:aws:lambda:us-west-2::runtime:70cc0ac5269c3c6665655653f4f51fe0e3fcaa3ec661249a16dbb0d8e6c3a502
--
START RequestId: cb1c0eb5-1f72-4e1c-97fc-5652047562d1 Version: $LATEST
[DEBUG] 2023-09-26T21:20:14.334Z cb1c0eb5-1f72-4e1c-97fc-5652047562d1 using default region:us-west-2 from boto
[INFO] 2023-09-26T21:20:14.690Z cb1c0eb5-1f72-4e1c-97fc-5652047562d1 Processing event { "version": "0", "id": "34414dd6-cf98-eb11-4153-eb9cbdebf354", "detail-type": "AWS API Call via CloudTrail", "source": "aws.ec2", "account": "667367524883", "time": "2023-09-26T21:20:08Z", "region": "us-west-2", "resources": [], "detail": { "eventVersion": "1.08", "userIdentity": { "type": "AssumedRole", "principalId": "AROAZWYRUJIJ7AXKTC4WZ:aws-go-sdk-1695763203898864984", "arn": "arn:aws:sts::667367524883:assumed-role/celerdata-stack-cmxrgb-CelerdataDeploymentRole-4I6ZEG1R6TCP/aws-go-sdk-1695763203898864984", "accountId": "667367524883", "accessKeyId": "ASIAZWYRUJIJWF3T7PO7", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "AROAZWYRUJIJ7AXKTC4WZ", "arn": "arn:aws:iam::667367524883:role/celerdata-stack-cmxrgb-CelerdataDeploymentRole-4I6ZEG1R6TCP", "accountId": "667367524883", "userName": "celerdata-stack-cmxrgb-CelerdataDeploymentRole-4I6ZEG1R6TCP" }, "webIdFederationData": {}, "attributes": { "creationDate": "2023-09-26T21:20:04Z", "mfaAuthenticated": "false" } } }, "eventTime": "2023-09-26T21:20:08Z", "eventSource": "ec2.amazonaws.com", "eventName": "RunInstances", "awsRegion": "us-west-2", "sourceIPAddress": "52.77.133.212", "userAgent": "APN/1.0 HashiCorp/1.0 Terraform/1.3.6 (+https://www.terraform.io) terraform-provider-aws/dev (+https://registry.terraform.io/providers/hashicorp/aws) aws-sdk-go/1.44.71 (go1.18.4; linux; amd64) HashiCorp-terraform-exec/0.17.0", "requestParameters": { "instancesSet": { "items": [ { "imageId": "ami-0199862f192aeaf78", "minCount": 1, "maxCount": 1 } ] }, "userData": "<sensitiveDataRemoved>", "instanceType": "m5.2xlarge", "blockDeviceMapping": { "items": [ { "deviceName": "/dev/xvdb", "ebs": { "volumeSize": 250, "deleteOnTermination": true, "volumeType": "gp3", "iops": 5000, "throughput": 400 } }, { "deviceName": "/dev/xvdc", "ebs": { "volumeSize": 250, "deleteOnTermination": true, "volumeType": "gp3", "iops": 5000, "throughput": 400 } }, { "deviceName": "/dev/sda1", "ebs": { "volumeSize": 30, "deleteOnTermination": true, "volumeType": "gp2" } } ] }, "placementGroupName": "Celerdata:BE:PG:3f84d2a9-1607-4820-9244-d24a06e009c9", "monitoring": { "enabled": false }, "disableApiTermination": false, "disableApiStop": false, "clientToken": "1AEAEEA6-9A34-4878-97D2-127E3EED09B2", "networkInterfaceSet": { "items": [ { "deviceIndex": 0, "subnetId": "subnet-0ab2a9bd216b2c6b4", "associatePublicIpAddress": true, "groupSet": { "items": [ { "groupId": "sg-03ef813832f4bc2cf" } ] } } ] }, "iamInstanceProfile": { "name": "CelerdataEc2InstanceProfileRole-d4e569603cd111eea0660affbf9c1a45" }, "ebsOptimized": false, "tagSpecificationSet": { "items": [ { "resourceType": "instance", "tags": [ { "key": "CelerdataManaged", "value": "true" }, { "key": "ClusterID", "value": "3f84d2a9-1607-4820-9244-d24a06e009c9" }, { "key": "AccountID", "value": "skr2veiad" }, { "key": "Name", "value": "Celerdata:BE:skr2veiad:jeff-test-local" }, { "key": "ClusterName", "value": "jeff-test-local" }, { "key": "ProcessType", "value": "BE" } ] }, { "resourceType": "volume", "tags": [ { "key": "CelerdataManaged", "value": "true" }, { "key": "ClusterID", "value": "3f84d2a9-1607-4820-9244-d24a06e009c9" }, { "key": "AccountID", "value": "skr2veiad" } ] } ] }, "hibernationOptions": { "configured": false } }, "responseElements": { "requestId": "5e231ec4-995e-4952-9c21-2dfaa2c531c3", "reservationId": "r-06c6fd2ca9dc1f3bd", "ownerId": "667367524883", "groupSet": {}, "instancesSet": { "items": [ { "instanceId": "i-0843b2da0c9d4ffb6", "imageId": "ami-0199862f192aeaf78", "currentInstanceBootMode": "legacy-bios", "instanceState": { "code": 0, "name": "pending" }, "privateDnsName": "ip-10-0-69-19.us-west-2.compute.internal", "amiLaunchIndex": 0, "productCodes": {}, "instanceType": "m5.2xlarge", "launchTime": 1695763208000, "placement": { "availabilityZone": "us-west-2a", "placementGroupName": "Celerdata:BE:PG:3f84d2a9-1607-4820-9244-d24a06e009c9", "placementGroupId": "pg-08b99785910ec09b7", "tenancy": "default" }, "monitoring": { "state": "disabled" }, "subnetId": "subnet-0ab2a9bd216b2c6b4", "vpcId": "vpc-0fe6052752afd4b57", "privateIpAddress": "10.0.69.19", "stateReason": { "code": "pending", "message": "pending" }, "architecture": "x86_64", "rootDeviceType": "ebs", "rootDeviceName": "/dev/sda1", "blockDeviceMapping": {}, "virtualizationType": "hvm", "hypervisor": "xen", "tagSet": { "items": [ { "key": "CelerdataManaged", "value": "true" }, { "key": "ClusterName", "value": "jeff-test-local" }, { "key": "ClusterID", "value": "3f84d2a9-1607-4820-9244-d24a06e009c9" }, { "key": "Name", "value": "Celerdata:BE:skr2veiad:jeff-test-local" }, { "key": "AccountID", "value": "skr2veiad" }, { "key": "ProcessType", "value": "BE" } ] }, "clientToken": "1AEAEEA6-9A34-4878-97D2-127E3EED09B2", "groupSet": { "items": [ { "groupId": "sg-03ef813832f4bc2cf", "groupName": "celerdata-stack-cmxrgb-CelerdataSecurityGroup-1NIBDNCDJKQ07" } ] }, "sourceDestCheck": true, "networkInterfaceSet": { "items": [ { "networkInterfaceId": "eni-08a80861613cca4ed", "subnetId": "subnet-0ab2a9bd216b2c6b4", "vpcId": "vpc-0fe6052752afd4b57", "ownerId": "667367524883", "status": "in-use", "macAddress": "02:d7:6f:05:c8:c7", "privateIpAddress": "10.0.69.19", "privateDnsName": "ip-10-0-69-19.us-west-2.compute.internal", "sourceDestCheck": true, "interfaceType": "interface", "groupSet": { "items": [ { "groupId": "sg-03ef813832f4bc2cf", "groupName": "celerdata-stack-cmxrgb-CelerdataSecurityGroup-1NIBDNCDJKQ07" } ] }, "attachment": { "attachmentId": "eni-attach-0459100b302108b47", "deviceIndex": 0, "networkCardIndex": 0, "status": "attaching", "attachTime": 1695763208000, "deleteOnTermination": true }, "privateIpAddressesSet": { "item": [ { "privateIpAddress": "10.0.69.19", "privateDnsName": "ip-10-0-69-19.us-west-2.compute.internal", "primary": true } ] }, "ipv6AddressesSet": {}, "tagSet": {} } ] }, "iamInstanceProfile": { "arn": "arn:aws:iam::667367524883:instance-profile/CelerdataEc2InstanceProfileRole-d4e569603cd111eea0660affbf9c1a45", "id": "AIPAZWYRUJIJ75FBA45AZ" }, "ebsOptimized": false, "enaSupport": true, "cpuOptions": { "coreCount": 4, "threadsPerCore": 2 }, "capacityReservationSpecification": { "capacityReservationPreference": "open" }, "hibernationOptions": { "configured": false }, "enclaveOptions": { "enabled": false }, "metadataOptions": { "state": "pending", "httpTokens": "optional", "httpPutResponseHopLimit": 1, "httpEndpoint": "enabled", "httpProtocolIpv4": "enabled", "httpProtocolIpv6": "disabled", "instanceMetadataTags": "disabled" }, "maintenanceOptions": { "autoRecovery": "default" }, "privateDnsNameOptions": { "hostnameType": "ip-name", "enableResourceNameDnsARecord": false, "enableResourceNameDnsAAAARecord": false } } ] } }, "requestID": "5e231ec4-995e-4952-9c21-2dfaa2c531c3", "eventID": "49bdc9d7-dbab-42e7-81d3-b3bb8e22cbae", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "667367524883", "eventCategory": "Management", "tlsDetails": { "tlsVersion": "TLSv1.2", "cipherSuite": "ECDHE-RSA-AES128-GCM-SHA256", "clientProvidedHostHeader": "ec2.us-west-2.amazonaws.com" } }, "debug": true }
[DEBUG] 2023-09-26T21:20:14.708Z cb1c0eb5-1f72-4e1c-97fc-5652047562d1 Disabling cache
[WARNING] 2023-09-26T21:20:14.709Z cb1c0eb5-1f72-4e1c-97fc-5652047562d1 Custodian reserves policy lambda tags starting with custodian - policy specifies custodian-info
[INFO] 2023-09-26T21:20:14.709Z cb1c0eb5-1f72-4e1c-97fc-5652047562d1 Found resource ids:['i-0843b2da0c9d4ffb6']
[INFO] 2023-09-26T21:20:15.329Z cb1c0eb5-1f72-4e1c-97fc-5652047562d1 Resources [{'AmiLaunchIndex': 0, 'ImageId': 'ami-0199862f192aeaf78', 'InstanceId': 'i-0843b2da0c9d4ffb6', 'InstanceType': 'm5.2xlarge', 'LaunchTime': datetime.datetime(2023, 9, 26, 21, 20, 8, tzinfo=tzlocal()), 'Monitoring': {'State': 'disabled'}, 'Placement': {'AvailabilityZone': 'us-west-2a', 'GroupName': 'Celerdata:BE:PG:3f84d2a9-1607-4820-9244-d24a06e009c9', 'PartitionNumber': 6, 'Tenancy': 'default', 'GroupId': 'pg-08b99785910ec09b7'}, 'PrivateDnsName': 'ip-10-0-69-19.us-west-2.compute.internal', 'PrivateIpAddress': '10.0.69.19', 'ProductCodes': [], 'PublicDnsName': 'ec2-35-165-122-195.us-west-2.compute.amazonaws.com', 'PublicIpAddress': '35.165.122.195', 'State': {'Code': 16, 'Name': 'running'}, 'StateTransitionReason': '', 'SubnetId': 'subnet-0ab2a9bd216b2c6b4', 'VpcId': 'vpc-0fe6052752afd4b57', 'Architecture': 'x86_64', 'BlockDeviceMappings': [{'DeviceName': '/dev/sda1', 'Ebs': {'AttachTime': datetime.datetime(2023, 9, 26, 21, 20, 8, tzinfo=tzlocal()), 'DeleteOnTermination': True, 'Status': 'attached', 'VolumeId': 'vol-0597403265c03dbf9'}}, {'DeviceName': '/dev/xvdb', 'Ebs': {'AttachTime': datetime.datetime(2023, 9, 26, 21, 20, 8, tzinfo=tzlocal()), 'DeleteOnTermination': True, 'Status': 'attached', 'VolumeId': 'vol-053739af17089cfc0'}}, {'DeviceName': '/dev/xvdc', 'Ebs': {'AttachTime': datetime.datetime(2023, 9, 26, 21, 20, 8, tzinfo=tzlocal()), 'DeleteOnTermination': True, 'Status': 'attached', 'VolumeId': 'vol-001e90aeab297a739'}}], 'ClientToken': '1AEAEEA6-9A34-4878-97D2-127E3EED09B2', 'EbsOptimized': False, 'EnaSupport': True, 'Hypervisor': 'xen', 'IamInstanceProfile': {'Arn': 'arn:aws:iam::667367524883:instance-profile/CelerdataEc2InstanceProfileRole-d4e569603cd111eea0660affbf9c1a45', 'Id': 'AIPAZWYRUJIJ75FBA45AZ'}, 'NetworkInterfaces': [{'Association': {'IpOwnerId': 'amazon', 'PublicDnsName': 'ec2-35-165-122-195.us-west-2.compute.amazonaws.com', 'PublicIp': '35.165.122.195'}, 'Attachment': {'AttachTime': datetime.datetime(2023, 9, 26, 21, 20, 8, tzinfo=tzlocal()), 'AttachmentId': 'eni-attach-0459100b302108b47', 'DeleteOnTermination': True, 'DeviceIndex': 0, 'Status': 'attached', 'NetworkCardIndex': 0}, 'Description': '', 'Groups': [{'GroupName': 'celerdata-stack-cmxrgb-CelerdataSecurityGroup-1NIBDNCDJKQ07', 'GroupId': 'sg-03ef813832f4bc2cf'}], 'Ipv6Addresses': [], 'MacAddress': '02:d7:6f:05:c8:c7', 'NetworkInterfaceId': 'eni-08a80861613cca4ed', 'OwnerId': '667367524883', 'PrivateDnsName': 'ip-10-0-69-19.us-west-2.compute.internal', 'PrivateIpAddress': '10.0.69.19', 'PrivateIpAddresses': [{'Association': {'IpOwnerId': 'amazon', 'PublicDnsName': 'ec2-35-165-122-195.us-west-2.compute.amazonaws.com', 'PublicIp': '35.165.122.195'}, 'Primary': True, 'PrivateDnsName': 'ip-10-0-69-19.us-west-2.compute.internal', 'PrivateIpAddress': '10.0.69.19'}], 'SourceDestCheck': True, 'Status': 'in-use', 'SubnetId': 'subnet-0ab2a9bd216b2c6b4', 'VpcId': 'vpc-0fe6052752afd4b57', 'InterfaceType': 'interface'}], 'RootDeviceName': '/dev/sda1', 'RootDeviceType': 'ebs', 'SecurityGroups': [{'GroupName': 'celerdata-stack-cmxrgb-CelerdataSecurityGroup-1NIBDNCDJKQ07', 'GroupId': 'sg-03ef813832f4bc2cf'}], 'SourceDestCheck': True, 'Tags': [{'Key': 'CelerdataManaged', 'Value': 'true'}, {'Key': 'ClusterName', 'Value': 'jeff-test-local'}, {'Key': 'ClusterID', 'Value': '3f84d2a9-1607-4820-9244-d24a06e009c9'}, {'Key': 'Name', 'Value': 'Celerdata:BE:skr2veiad:jeff-test-local'}, {'Key': 'AccountID', 'Value': 'skr2veiad'}, {'Key': 'ProcessType', 'Value': 'BE'}], 'VirtualizationType': 'hvm', 'CpuOptions': {'CoreCount': 4, 'ThreadsPerCore': 2}, 'CapacityReservationSpecification': {'CapacityReservationPreference': 'open'}, 'HibernationOptions': {'Configured': False}, 'MetadataOptions': {'State': 'applied', 'HttpTokens': 'optional', 'HttpPutResponseHopLimit': 1, 'HttpEndpoint': 'enabled', 'HttpProtocolIpv6': 'disabled', 'InstanceMetadataTags': 'disabled'}, 'EnclaveOptions': {'Enabled': False}, 'PlatformDetails': 'Linux/UNIX', 'UsageOperation': 'RunInstances', 'UsageOperationUpdateTime': datetime.datetime(2023, 9, 26, 21, 20, 8, tzinfo=tzlocal()), 'PrivateDnsNameOptions': {'HostnameType': 'ip-name', 'EnableResourceNameDnsARecord': False, 'EnableResourceNameDnsAAAARecord': False}, 'MaintenanceOptions': {'AutoRecovery': 'default'}, 'CurrentInstanceBootMode': 'legacy-bios'}]
[INFO] 2023-09-26T21:20:15.330Z cb1c0eb5-1f72-4e1c-97fc-5652047562d1 Filtering resources using 1 filters
[DEBUG] 2023-09-26T21:20:15.330Z cb1c0eb5-1f72-4e1c-97fc-5652047562d1 Filter #1 applied 1->1 filter: { "tag:CreatorName": "absent" }
[DEBUG] 2023-09-26T21:20:15.330Z cb1c0eb5-1f72-4e1c-97fc-5652047562d1 Filtered from 1 to 1 ec2
[INFO] 2023-09-26T21:20:15.330Z cb1c0eb5-1f72-4e1c-97fc-5652047562d1 Filtered resources 1 of 1
[DEBUG] 2023-09-26T21:20:15.330Z cb1c0eb5-1f72-4e1c-97fc-5652047562d1 Storing output with <LogFile file:///tmp/ec2-auto-tag-user/custodian-run.log>
[DEBUG] 2023-09-26T21:20:15.331Z cb1c0eb5-1f72-4e1c-97fc-5652047562d1 metric:ResourceCount Count:1 policy:ec2-auto-tag-user restype:ec2 scope:policy
[INFO] 2023-09-26T21:20:15.331Z cb1c0eb5-1f72-4e1c-97fc-5652047562d1 Invoking actions [<c7n.actions.autotag.AutoTagUser object at 0x7ff8a7f71f40>]
[INFO] 2023-09-26T21:20:15.332Z cb1c0eb5-1f72-4e1c-97fc-5652047562d1 policy:ec2-auto-tag-user invoking action:autotaguser resources:1
[DEBUG] 2023-09-26T21:20:15.783Z cb1c0eb5-1f72-4e1c-97fc-5652047562d1 metric:ApiCalls Count:2 policy:ec2-auto-tag-user restype:ec2
END RequestId: cb1c0eb5-1f72-4e1c-97fc-5652047562d1
REPORT RequestId: cb1c0eb5-1f72-4e1c-97fc-5652047562d1 Duration: 2182.69 ms Billed Duration: 2183 ms Memory Size: 512 MB Max Memory Used: 105 MB Init Duration: 563.35 ms
START RequestId: 13e91c19-0c2f-46c3-9fb1-372fc4f95401 Version: $LATEST
[INFO] 2023-09-26T21:20:25.938Z 13e91c19-0c2f-46c3-9fb1-372fc4f95401 Processing event { "version": "0", "id": "becbc77f-5749-5523-b0da-e10128530ef5", "detail-type": "AWS API Call via CloudTrail", "source": "aws.ec2", "account": "667367524883", "time": "2023-09-26T21:20:22Z", "region": "us-west-2", "resources": [], "detail": { "eventVersion": "1.08", "userIdentity": { "type": "AssumedRole", "principalId": "AROAZWYRUJIJ7AXKTC4WZ:aws-go-sdk-1695763203898864984", "arn": "arn:aws:sts::667367524883:assumed-role/celerdata-stack-cmxrgb-CelerdataDeploymentRole-4I6ZEG1R6TCP/aws-go-sdk-1695763203898864984", "accountId": "667367524883", "accessKeyId": "ASIAZWYRUJIJWF3T7PO7", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "AROAZWYRUJIJ7AXKTC4WZ", "arn": "arn:aws:iam::667367524883:role/celerdata-stack-cmxrgb-CelerdataDeploymentRole-4I6ZEG1R6TCP", "accountId": "667367524883", "userName": "celerdata-stack-cmxrgb-CelerdataDeploymentRole-4I6ZEG1R6TCP" }, "webIdFederationData": {}, "attributes": { "creationDate": "2023-09-26T21:20:04Z", "mfaAuthenticated": "false" } } }, "eventTime": "2023-09-26T21:20:22Z", "eventSource": "ec2.amazonaws.com", "eventName": "RunInstances", "awsRegion": "us-west-2", "sourceIPAddress": "52.77.133.212", "userAgent": "APN/1.0 HashiCorp/1.0 Terraform/1.3.6 (+https://www.terraform.io) terraform-provider-aws/dev (+https://registry.terraform.io/providers/hashicorp/aws) aws-sdk-go/1.44.71 (go1.18.4; linux; amd64) HashiCorp-terraform-exec/0.17.0", "requestParameters": { "instancesSet": { "items": [ { "imageId": "ami-0199862f192aeaf78", "minCount": 1, "maxCount": 1 } ] }, "userData": "<sensitiveDataRemoved>", "instanceType": "m5.2xlarge", "blockDeviceMapping": { "items": [ { "deviceName": "/dev/xvdb", "ebs": { "volumeSize": 250, "deleteOnTermination": true, "volumeType": "gp3", "iops": 5000, "throughput": 400 } }, { "deviceName": "/dev/xvdc", "ebs": { "volumeSize": 250, "deleteOnTermination": true, "volumeType": "gp3", "iops": 5000, "throughput": 400 } }, { "deviceName": "/dev/sda1", "ebs": { "volumeSize": 30, "deleteOnTermination": true, "volumeType": "gp2" } } ] }, "placementGroupName": "Celerdata:BE:PG:3f84d2a9-1607-4820-9244-d24a06e009c9", "monitoring": { "enabled": false }, "disableApiTermination": false, "disableApiStop": false, "clientToken": "A1E83AE1-02A0-4596-8CED-37A2588984D4", "networkInterfaceSet": { "items": [ { "deviceIndex": 0, "subnetId": "subnet-0ab2a9bd216b2c6b4", "associatePublicIpAddress": true, "groupSet": { "items": [ { "groupId": "sg-03ef813832f4bc2cf" } ] } } ] }, "iamInstanceProfile": { "name": "CelerdataEc2InstanceProfileRole-d4e569603cd111eea0660affbf9c1a45" }, "ebsOptimized": false, "tagSpecificationSet": { "items": [ { "resourceType": "instance", "tags": [ { "key": "ClusterName", "value": "jeff-test-local" }, { "key": "CelerdataManaged", "value": "true" }, { "key": "ClusterID", "value": "3f84d2a9-1607-4820-9244-d24a06e009c9" }, { "key": "AccountID", "value": "skr2veiad" }, { "key": "Name", "value": "Celerdata:BE:skr2veiad:jeff-test-local" }, { "key": "ProcessType", "value": "BE" } ] }, { "resourceType": "volume", "tags": [ { "key": "ClusterID", "value": "3f84d2a9-1607-4820-9244-d24a06e009c9" }, { "key": "AccountID", "value": "skr2veiad" }, { "key": "CelerdataManaged", "value": "true" } ] } ] }, "hibernationOptions": { "configured": false } }, "responseElements": { "requestId": "cfe09264-773c-44df-ba5b-47bd02312513", "reservationId": "r-0212714fdd82e71fa", "ownerId": "667367524883", "groupSet": {}, "instancesSet": { "items": [ { "instanceId": "i-00031162e654cb282", "imageId": "ami-0199862f192aeaf78", "currentInstanceBootMode": "legacy-bios", "instanceState": { "code": 0, "name": "pending" }, "privateDnsName": "ip-10-0-207-129.us-west-2.compute.internal", "amiLaunchIndex": 0, "productCodes": {}, "instanceType": "m5.2xlarge", "launchTime": 1695763222000, "placement": { "availabilityZone": "us-west-2a", "placementGroupName": "Celerdata:BE:PG:3f84d2a9-1607-4820-9244-d24a06e009c9", "placementGroupId": "pg-08b99785910ec09b7", "tenancy": "default" }, "monitoring": { "state": "disabled" }, "subnetId": "subnet-0ab2a9bd216b2c6b4", "vpcId": "vpc-0fe6052752afd4b57", "privateIpAddress": "10.0.207.129", "stateReason": { "code": "pending", "message": "pending" }, "architecture": "x86_64", "rootDeviceType": "ebs", "rootDeviceName": "/dev/sda1", "blockDeviceMapping": {}, "virtualizationType": "hvm", "hypervisor": "xen", "tagSet": { "items": [ { "key": "AccountID", "value": "skr2veiad" }, { "key": "ProcessType", "value": "BE" }, { "key": "CelerdataManaged", "value": "true" }, { "key": "ClusterName", "value": "jeff-test-local" }, { "key": "ClusterID", "value": "3f84d2a9-1607-4820-9244-d24a06e009c9" }, { "key": "Name", "value": "Celerdata:BE:skr2veiad:jeff-test-local" } ] }, "clientToken": "A1E83AE1-02A0-4596-8CED-37A2588984D4", "groupSet": { "items": [ { "groupId": "sg-03ef813832f4bc2cf", "groupName": "celerdata-stack-cmxrgb-CelerdataSecurityGroup-1NIBDNCDJKQ07" } ] }, "sourceDestCheck": true, "networkInterfaceSet": { "items": [ { "networkInterfaceId": "eni-0816413b62ccef9b0", "subnetId": "subnet-0ab2a9bd216b2c6b4", "vpcId": "vpc-0fe6052752afd4b57", "ownerId": "667367524883", "status": "in-use", "macAddress": "02:bb:b9:e2:12:6d", "privateIpAddress": "10.0.207.129", "privateDnsName": "ip-10-0-207-129.us-west-2.compute.internal", "sourceDestCheck": true, "interfaceType": "interface", "groupSet": { "items": [ { "groupId": "sg-03ef813832f4bc2cf", "groupName": "celerdata-stack-cmxrgb-CelerdataSecurityGroup-1NIBDNCDJKQ07" } ] }, "attachment": { "attachmentId": "eni-attach-021f20eeda5152964", "deviceIndex": 0, "networkCardIndex": 0, "status": "attaching", "attachTime": 1695763222000, "deleteOnTermination": true }, "privateIpAddressesSet": { "item": [ { "privateIpAddress": "10.0.207.129", "privateDnsName": "ip-10-0-207-129.us-west-2.compute.internal", "primary": true } ] }, "ipv6AddressesSet": {}, "tagSet": {} } ] }, "iamInstanceProfile": { "arn": "arn:aws:iam::667367524883:instance-profile/CelerdataEc2InstanceProfileRole-d4e569603cd111eea0660affbf9c1a45", "id": "AIPAZWYRUJIJ75FBA45AZ" }, "ebsOptimized": false, "enaSupport": true, "cpuOptions": { "coreCount": 4, "threadsPerCore": 2 }, "capacityReservationSpecification": { "capacityReservationPreference": "open" }, "hibernationOptions": { "configured": false }, "enclaveOptions": { "enabled": false }, "metadataOptions": { "state": "pending", "httpTokens": "optional", "httpPutResponseHopLimit": 1, "httpEndpoint": "enabled", "httpProtocolIpv4": "enabled", "httpProtocolIpv6": "disabled", "instanceMetadataTags": "disabled" }, "maintenanceOptions": { "autoRecovery": "default" }, "privateDnsNameOptions": { "hostnameType": "ip-name", "enableResourceNameDnsARecord": false, "enableResourceNameDnsAAAARecord": false } } ] } }, "requestID": "cfe09264-773c-44df-ba5b-47bd02312513", "eventID": "2ee1d1ba-6814-4a39-bf77-55d7f7699501", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "667367524883", "eventCategory": "Management", "tlsDetails": { "tlsVersion": "TLSv1.2", "cipherSuite": "ECDHE-RSA-AES128-GCM-SHA256", "clientProvidedHostHeader": "ec2.us-west-2.amazonaws.com" } }, "debug": true }
[WARNING] 2023-09-26T21:20:25.938Z 13e91c19-0c2f-46c3-9fb1-372fc4f95401 Custodian reserves policy lambda tags starting with custodian - policy specifies custodian-info
[INFO] 2023-09-26T21:20:25.938Z 13e91c19-0c2f-46c3-9fb1-372fc4f95401 Found resource ids:['i-00031162e654cb282']
[INFO] 2023-09-26T21:20:26.125Z 13e91c19-0c2f-46c3-9fb1-372fc4f95401 Resources [{'AmiLaunchIndex': 0, 'ImageId': 'ami-0199862f192aeaf78', 'InstanceId': 'i-00031162e654cb282', 'InstanceType': 'm5.2xlarge', 'LaunchTime': datetime.datetime(2023, 9, 26, 21, 20, 22, tzinfo=tzlocal()), 'Monitoring': {'State': 'disabled'}, 'Placement': {'AvailabilityZone': 'us-west-2a', 'GroupName': 'Celerdata:BE:PG:3f84d2a9-1607-4820-9244-d24a06e009c9', 'PartitionNumber': 1, 'Tenancy': 'default', 'GroupId': 'pg-08b99785910ec09b7'}, 'PrivateDnsName': 'ip-10-0-207-129.us-west-2.compute.internal', 'PrivateIpAddress': '10.0.207.129', 'ProductCodes': [], 'PublicDnsName': 'ec2-18-236-65-199.us-west-2.compute.amazonaws.com', 'PublicIpAddress': '18.236.65.199', 'State': {'Code': 0, 'Name': 'pending'}, 'StateTransitionReason': '', 'SubnetId': 'subnet-0ab2a9bd216b2c6b4', 'VpcId': 'vpc-0fe6052752afd4b57', 'Architecture': 'x86_64', 'BlockDeviceMappings': [{'DeviceName': '/dev/sda1', 'Ebs': {'AttachTime': datetime.datetime(2023, 9, 26, 21, 20, 23, tzinfo=tzlocal()), 'DeleteOnTermination': True, 'Status': 'attaching', 'VolumeId': 'vol-0818d404cd910da8c'}}, {'DeviceName': '/dev/xvdb', 'Ebs': {'AttachTime': datetime.datetime(2023, 9, 26, 21, 20, 23, tzinfo=tzlocal()), 'DeleteOnTermination': True, 'Status': 'attaching', 'VolumeId': 'vol-0e82f7d253b6622b0'}}, {'DeviceName': '/dev/xvdc', 'Ebs': {'AttachTime': datetime.datetime(2023, 9, 26, 21, 20, 23, tzinfo=tzlocal()), 'DeleteOnTermination': True, 'Status': 'attaching', 'VolumeId': 'vol-0f741f3331797d238'}}], 'ClientToken': 'A1E83AE1-02A0-4596-8CED-37A2588984D4', 'EbsOptimized': False, 'EnaSupport': True, 'Hypervisor': 'xen', 'IamInstanceProfile': {'Arn': 'arn:aws:iam::667367524883:instance-profile/CelerdataEc2InstanceProfileRole-d4e569603cd111eea0660affbf9c1a45', 'Id': 'AIPAZWYRUJIJ75FBA45AZ'}, 'NetworkInterfaces': [{'Association': {'IpOwnerId': 'amazon', 'PublicDnsName': 'ec2-18-236-65-199.us-west-2.compute.amazonaws.com', 'PublicIp': '18.236.65.199'}, 'Attachment': {'AttachTime': datetime.datetime(2023, 9, 26, 21, 20, 22, tzinfo=tzlocal()), 'AttachmentId': 'eni-attach-021f20eeda5152964', 'DeleteOnTermination': True, 'DeviceIndex': 0, 'Status': 'attaching', 'NetworkCardIndex': 0}, 'Description': '', 'Groups': [{'GroupName': 'celerdata-stack-cmxrgb-CelerdataSecurityGroup-1NIBDNCDJKQ07', 'GroupId': 'sg-03ef813832f4bc2cf'}], 'Ipv6Addresses': [], 'MacAddress': '02:bb:b9:e2:12:6d', 'NetworkInterfaceId': 'eni-0816413b62ccef9b0', 'OwnerId': '667367524883', 'PrivateDnsName': 'ip-10-0-207-129.us-west-2.compute.internal', 'PrivateIpAddress': '10.0.207.129', 'PrivateIpAddresses': [{'Association': {'IpOwnerId': 'amazon', 'PublicDnsName': 'ec2-18-236-65-199.us-west-2.compute.amazonaws.com', 'PublicIp': '18.236.65.199'}, 'Primary': True, 'PrivateDnsName': 'ip-10-0-207-129.us-west-2.compute.internal', 'PrivateIpAddress': '10.0.207.129'}], 'SourceDestCheck': True, 'Status': 'in-use', 'SubnetId': 'subnet-0ab2a9bd216b2c6b4', 'VpcId': 'vpc-0fe6052752afd4b57', 'InterfaceType': 'interface'}], 'RootDeviceName': '/dev/sda1', 'RootDeviceType': 'ebs', 'SecurityGroups': [{'GroupName': 'celerdata-stack-cmxrgb-CelerdataSecurityGroup-1NIBDNCDJKQ07', 'GroupId': 'sg-03ef813832f4bc2cf'}], 'SourceDestCheck': True, 'Tags': [{'Key': 'AccountID', 'Value': 'skr2veiad'}, {'Key': 'ProcessType', 'Value': 'BE'}, {'Key': 'CelerdataManaged', 'Value': 'true'}, {'Key': 'ClusterName', 'Value': 'jeff-test-local'}, {'Key': 'ClusterID', 'Value': '3f84d2a9-1607-4820-9244-d24a06e009c9'}, {'Key': 'Name', 'Value': 'Celerdata:BE:skr2veiad:jeff-test-local'}], 'VirtualizationType': 'hvm', 'CpuOptions': {'CoreCount': 4, 'ThreadsPerCore': 2}, 'CapacityReservationSpecification': {'CapacityReservationPreference': 'open'}, 'HibernationOptions': {'Configured': False}, 'MetadataOptions': {'State': 'pending', 'HttpTokens': 'optional', 'HttpPutResponseHopLimit': 1, 'HttpEndpoint': 'enabled', 'HttpProtocolIpv6': 'disabled', 'InstanceMetadataTags': 'disabled'}, 'EnclaveOptions': {'Enabled': False}, 'PlatformDetails': 'Linux/UNIX', 'UsageOperation': 'RunInstances', 'UsageOperationUpdateTime': datetime.datetime(2023, 9, 26, 21, 20, 22, tzinfo=tzlocal()), 'PrivateDnsNameOptions': {'HostnameType': 'ip-name', 'EnableResourceNameDnsARecord': False, 'EnableResourceNameDnsAAAARecord': False}, 'MaintenanceOptions': {'AutoRecovery': 'default'}, 'CurrentInstanceBootMode': 'legacy-bios'}]
[INFO] 2023-09-26T21:20:26.125Z 13e91c19-0c2f-46c3-9fb1-372fc4f95401 Filtering resources using 1 filters
[DEBUG] 2023-09-26T21:20:26.126Z 13e91c19-0c2f-46c3-9fb1-372fc4f95401 Filter #1 applied 1->1 filter: { "tag:CreatorName": "absent" }
[DEBUG] 2023-09-26T21:20:26.126Z 13e91c19-0c2f-46c3-9fb1-372fc4f95401 Filtered from 1 to 1 ec2
[INFO] 2023-09-26T21:20:26.126Z 13e91c19-0c2f-46c3-9fb1-372fc4f95401 Filtered resources 1 of 1
[DEBUG] 2023-09-26T21:20:26.126Z 13e91c19-0c2f-46c3-9fb1-372fc4f95401 Storing output with <LogFile file:///tmp/ec2-auto-tag-user/custodian-run.log>
[DEBUG] 2023-09-26T21:20:26.126Z 13e91c19-0c2f-46c3-9fb1-372fc4f95401 metric:ResourceCount Count:1 policy:ec2-auto-tag-user restype:ec2 scope:policy
[INFO] 2023-09-26T21:20:26.126Z 13e91c19-0c2f-46c3-9fb1-372fc4f95401 Invoking actions [<c7n.actions.autotag.AutoTagUser object at 0x7ff8a727b430>]
[INFO] 2023-09-26T21:20:26.128Z 13e91c19-0c2f-46c3-9fb1-372fc4f95401 policy:ec2-auto-tag-user invoking action:autotaguser resources:1
[DEBUG] 2023-09-26T21:20:26.579Z 13e91c19-0c2f-46c3-9fb1-372fc4f95401 metric:ApiCalls Count:2 policy:ec2-auto-tag-user restype:ec2
END RequestId: 13e91c19-0c2f-46c3-9fb1-372fc4f95401
REPORT RequestId: 13e91c19-0c2f-46c3-9fb1-372fc4f95401 Duration: 643.09 ms Billed Duration: 644 ms Memory Size: 512 MB Max Memory Used: 106 MB
START RequestId: c9cea0b6-3278-4977-911f-4accd9963c1f Version: $LATEST
[INFO] 2023-09-26T21:20:27.079Z c9cea0b6-3278-4977-911f-4accd9963c1f Processing event { "version": "0", "id": "b85f6c44-c434-8d42-8013-404fe651ac73", "detail-type": "AWS API Call via CloudTrail", "source": "aws.ec2", "account": "667367524883", "time": "2023-09-26T21:20:22Z", "region": "us-west-2", "resources": [], "detail": { "eventVersion": "1.08", "userIdentity": { "type": "AssumedRole", "principalId": "AROAZWYRUJIJ7AXKTC4WZ:aws-go-sdk-1695763203898864984", "arn": "arn:aws:sts::667367524883:assumed-role/celerdata-stack-cmxrgb-CelerdataDeploymentRole-4I6ZEG1R6TCP/aws-go-sdk-1695763203898864984", "accountId": "667367524883", "accessKeyId": "ASIAZWYRUJIJWF3T7PO7", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "AROAZWYRUJIJ7AXKTC4WZ", "arn": "arn:aws:iam::667367524883:role/celerdata-stack-cmxrgb-CelerdataDeploymentRole-4I6ZEG1R6TCP", "accountId": "667367524883", "userName": "celerdata-stack-cmxrgb-CelerdataDeploymentRole-4I6ZEG1R6TCP" }, "webIdFederationData": {}, "attributes": { "creationDate": "2023-09-26T21:20:04Z", "mfaAuthenticated": "false" } } }, "eventTime": "2023-09-26T21:20:22Z", "eventSource": "ec2.amazonaws.com", "eventName": "RunInstances", "awsRegion": "us-west-2", "sourceIPAddress": "52.77.133.212", "userAgent": "APN/1.0 HashiCorp/1.0 Terraform/1.3.6 (+https://www.terraform.io) terraform-provider-aws/dev (+https://registry.terraform.io/providers/hashicorp/aws) aws-sdk-go/1.44.71 (go1.18.4; linux; amd64) HashiCorp-terraform-exec/0.17.0", "requestParameters": { "instancesSet": { "items": [ { "imageId": "ami-0199862f192aeaf78", "minCount": 1, "maxCount": 1 } ] }, "userData": "<sensitiveDataRemoved>", "instanceType": "m5.2xlarge", "blockDeviceMapping": { "items": [ { "deviceName": "/dev/xvdb", "ebs": { "volumeSize": 250, "deleteOnTermination": true, "volumeType": "gp3", "iops": 5000, "throughput": 400 } }, { "deviceName": "/dev/xvdc", "ebs": { "volumeSize": 250, "deleteOnTermination": true, "volumeType": "gp3", "iops": 5000, "throughput": 400 } }, { "deviceName": "/dev/sda1", "ebs": { "volumeSize": 30, "deleteOnTermination": true, "volumeType": "gp2" } } ] }, "placementGroupName": "Celerdata:BE:PG:3f84d2a9-1607-4820-9244-d24a06e009c9", "monitoring": { "enabled": false }, "disableApiTermination": false, "disableApiStop": false, "clientToken": "BC5BA727-BFCD-4881-A511-523BC9BC3819", "networkInterfaceSet": { "items": [ { "deviceIndex": 0, "subnetId": "subnet-0ab2a9bd216b2c6b4", "associatePublicIpAddress": true, "groupSet": { "items": [ { "groupId": "sg-03ef813832f4bc2cf" } ] } } ] }, "iamInstanceProfile": { "name": "CelerdataEc2InstanceProfileRole-d4e569603cd111eea0660affbf9c1a45" }, "ebsOptimized": false, "tagSpecificationSet": { "items": [ { "resourceType": "instance", "tags": [ { "key": "ProcessType", "value": "BE" }, { "key": "CelerdataManaged", "value": "true" }, { "key": "ClusterID", "value": "3f84d2a9-1607-4820-9244-d24a06e009c9" }, { "key": "Name", "value": "Celerdata:BE:skr2veiad:jeff-test-local" }, { "key": "ClusterName", "value": "jeff-test-local" }, { "key": "AccountID", "value": "skr2veiad" } ] }, { "resourceType": "volume", "tags": [ { "key": "ClusterID", "value": "3f84d2a9-1607-4820-9244-d24a06e009c9" }, { "key": "CelerdataManaged", "value": "true" }, { "key": "AccountID", "value": "skr2veiad" } ] } ] }, "hibernationOptions": { "configured": false } }, "responseElements": { "requestId": "0fdc8989-435f-4ebe-b905-e2faa3dc504a", "reservationId": "r-013bc2fa94dae0d0b", "ownerId": "667367524883", "groupSet": {}, "instancesSet": { "items": [ { "instanceId": "i-0878804cac3a5cc5c", "imageId": "ami-0199862f192aeaf78", "currentInstanceBootMode": "legacy-bios", "instanceState": { "code": 0, "name": "pending" }, "privateDnsName": "ip-10-0-142-16.us-west-2.compute.internal", "amiLaunchIndex": 0, "productCodes": {}, "instanceType": "m5.2xlarge", "launchTime": 1695763222000, "placement": { "availabilityZone": "us-west-2a", "placementGroupName": "Celerdata:BE:PG:3f84d2a9-1607-4820-9244-d24a06e009c9", "placementGroupId": "pg-08b99785910ec09b7", "tenancy": "default" }, "monitoring": { "state": "disabled" }, "subnetId": "subnet-0ab2a9bd216b2c6b4", "vpcId": "vpc-0fe6052752afd4b57", "privateIpAddress": "10.0.142.16", "stateReason": { "code": "pending", "message": "pending" }, "architecture": "x86_64", "rootDeviceType": "ebs", "rootDeviceName": "/dev/sda1", "blockDeviceMapping": {}, "virtualizationType": "hvm", "hypervisor": "xen", "tagSet": { "items": [ { "key": "ClusterName", "value": "jeff-test-local" }, { "key": "ProcessType", "value": "BE" }, { "key": "AccountID", "value": "skr2veiad" }, { "key": "CelerdataManaged", "value": "true" }, { "key": "Name", "value": "Celerdata:BE:skr2veiad:jeff-test-local" }, { "key": "ClusterID", "value": "3f84d2a9-1607-4820-9244-d24a06e009c9" } ] }, "clientToken": "BC5BA727-BFCD-4881-A511-523BC9BC3819", "groupSet": { "items": [ { "groupId": "sg-03ef813832f4bc2cf", "groupName": "celerdata-stack-cmxrgb-CelerdataSecurityGroup-1NIBDNCDJKQ07" } ] }, "sourceDestCheck": true, "networkInterfaceSet": { "items": [ { "networkInterfaceId": "eni-06ba36007b6011f90", "subnetId": "subnet-0ab2a9bd216b2c6b4", "vpcId": "vpc-0fe6052752afd4b57", "ownerId": "667367524883", "status": "in-use", "macAddress": "02:ef:e2:bc:6d:17", "privateIpAddress": "10.0.142.16", "privateDnsName": "ip-10-0-142-16.us-west-2.compute.internal", "sourceDestCheck": true, "interfaceType": "interface", "groupSet": { "items": [ { "groupId": "sg-03ef813832f4bc2cf", "groupName": "celerdata-stack-cmxrgb-CelerdataSecurityGroup-1NIBDNCDJKQ07" } ] }, "attachment": { "attachmentId": "eni-attach-02daa2d351be548f4", "deviceIndex": 0, "networkCardIndex": 0, "status": "attaching", "attachTime": 1695763222000, "deleteOnTermination": true }, "privateIpAddressesSet": { "item": [ { "privateIpAddress": "10.0.142.16", "privateDnsName": "ip-10-0-142-16.us-west-2.compute.internal", "primary": true } ] }, "ipv6AddressesSet": {}, "tagSet": {} } ] }, "iamInstanceProfile": { "arn": "arn:aws:iam::667367524883:instance-profile/CelerdataEc2InstanceProfileRole-d4e569603cd111eea0660affbf9c1a45", "id": "AIPAZWYRUJIJ75FBA45AZ" }, "ebsOptimized": false, "enaSupport": true, "cpuOptions": { "coreCount": 4, "threadsPerCore": 2 }, "capacityReservationSpecification": { "capacityReservationPreference": "open" }, "hibernationOptions": { "configured": false }, "enclaveOptions": { "enabled": false }, "metadataOptions": { "state": "pending", "httpTokens": "optional", "httpPutResponseHopLimit": 1, "httpEndpoint": "enabled", "httpProtocolIpv4": "enabled", "httpProtocolIpv6": "disabled", "instanceMetadataTags": "disabled" }, "maintenanceOptions": { "autoRecovery": "default" }, "privateDnsNameOptions": { "hostnameType": "ip-name", "enableResourceNameDnsARecord": false, "enableResourceNameDnsAAAARecord": false } } ] } }, "requestID": "0fdc8989-435f-4ebe-b905-e2faa3dc504a", "eventID": "5e0ceead-51aa-4c2d-a9b9-fb262047aeef", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "667367524883", "eventCategory": "Management", "tlsDetails": { "tlsVersion": "TLSv1.2", "cipherSuite": "ECDHE-RSA-AES128-GCM-SHA256", "clientProvidedHostHeader": "ec2.us-west-2.amazonaws.com" } }, "debug": true }
[WARNING] 2023-09-26T21:20:27.079Z c9cea0b6-3278-4977-911f-4accd9963c1f Custodian reserves policy lambda tags starting with custodian - policy specifies custodian-info
[INFO] 2023-09-26T21:20:27.079Z c9cea0b6-3278-4977-911f-4accd9963c1f Found resource ids:['i-0878804cac3a5cc5c']
[INFO] 2023-09-26T21:20:27.258Z c9cea0b6-3278-4977-911f-4accd9963c1f Resources [{'AmiLaunchIndex': 0, 'ImageId': 'ami-0199862f192aeaf78', 'InstanceId': 'i-0878804cac3a5cc5c', 'InstanceType': 'm5.2xlarge', 'LaunchTime': datetime.datetime(2023, 9, 26, 21, 20, 22, tzinfo=tzlocal()), 'Monitoring': {'State': 'disabled'}, 'Placement': {'AvailabilityZone': 'us-west-2a', 'GroupName': 'Celerdata:BE:PG:3f84d2a9-1607-4820-9244-d24a06e009c9', 'PartitionNumber': 2, 'Tenancy': 'default', 'GroupId': 'pg-08b99785910ec09b7'}, 'PrivateDnsName': 'ip-10-0-142-16.us-west-2.compute.internal', 'PrivateIpAddress': '10.0.142.16', 'ProductCodes': [], 'PublicDnsName': 'ec2-54-70-98-80.us-west-2.compute.amazonaws.com', 'PublicIpAddress': '54.70.98.80', 'State': {'Code': 16, 'Name': 'running'}, 'StateTransitionReason': '', 'SubnetId': 'subnet-0ab2a9bd216b2c6b4', 'VpcId': 'vpc-0fe6052752afd4b57', 'Architecture': 'x86_64', 'BlockDeviceMappings': [{'DeviceName': '/dev/sda1', 'Ebs': {'AttachTime': datetime.datetime(2023, 9, 26, 21, 20, 23, tzinfo=tzlocal()), 'DeleteOnTermination': True, 'Status': 'attached', 'VolumeId': 'vol-07c36d6c4952a3873'}}, {'DeviceName': '/dev/xvdb', 'Ebs': {'AttachTime': datetime.datetime(2023, 9, 26, 21, 20, 23, tzinfo=tzlocal()), 'DeleteOnTermination': True, 'Status': 'attached', 'VolumeId': 'vol-097cc6668bbb9d1a5'}}, {'DeviceName': '/dev/xvdc', 'Ebs': {'AttachTime': datetime.datetime(2023, 9, 26, 21, 20, 23, tzinfo=tzlocal()), 'DeleteOnTermination': True, 'Status': 'attached', 'VolumeId': 'vol-0ce42b004e913c37c'}}], 'ClientToken': 'BC5BA727-BFCD-4881-A511-523BC9BC3819', 'EbsOptimized': False, 'EnaSupport': True, 'Hypervisor': 'xen', 'IamInstanceProfile': {'Arn': 'arn:aws:iam::667367524883:instance-profile/CelerdataEc2InstanceProfileRole-d4e569603cd111eea0660affbf9c1a45', 'Id': 'AIPAZWYRUJIJ75FBA45AZ'}, 'NetworkInterfaces': [{'Association': {'IpOwnerId': 'amazon', 'PublicDnsName': 'ec2-54-70-98-80.us-west-2.compute.amazonaws.com', 'PublicIp': '54.70.98.80'}, 'Attachment': {'AttachTime': datetime.datetime(2023, 9, 26, 21, 20, 22, tzinfo=tzlocal()), 'AttachmentId': 'eni-attach-02daa2d351be548f4', 'DeleteOnTermination': True, 'DeviceIndex': 0, 'Status': 'attached', 'NetworkCardIndex': 0}, 'Description': '', 'Groups': [{'GroupName': 'celerdata-stack-cmxrgb-CelerdataSecurityGroup-1NIBDNCDJKQ07', 'GroupId': 'sg-03ef813832f4bc2cf'}], 'Ipv6Addresses': [], 'MacAddress': '02:ef:e2:bc:6d:17', 'NetworkInterfaceId': 'eni-06ba36007b6011f90', 'OwnerId': '667367524883', 'PrivateDnsName': 'ip-10-0-142-16.us-west-2.compute.internal', 'PrivateIpAddress': '10.0.142.16', 'PrivateIpAddresses': [{'Association': {'IpOwnerId': 'amazon', 'PublicDnsName': 'ec2-54-70-98-80.us-west-2.compute.amazonaws.com', 'PublicIp': '54.70.98.80'}, 'Primary': True, 'PrivateDnsName': 'ip-10-0-142-16.us-west-2.compute.internal', 'PrivateIpAddress': '10.0.142.16'}], 'SourceDestCheck': True, 'Status': 'in-use', 'SubnetId': 'subnet-0ab2a9bd216b2c6b4', 'VpcId': 'vpc-0fe6052752afd4b57', 'InterfaceType': 'interface'}], 'RootDeviceName': '/dev/sda1', 'RootDeviceType': 'ebs', 'SecurityGroups': [{'GroupName': 'celerdata-stack-cmxrgb-CelerdataSecurityGroup-1NIBDNCDJKQ07', 'GroupId': 'sg-03ef813832f4bc2cf'}], 'SourceDestCheck': True, 'Tags': [{'Key': 'ClusterName', 'Value': 'jeff-test-local'}, {'Key': 'ProcessType', 'Value': 'BE'}, {'Key': 'AccountID', 'Value': 'skr2veiad'}, {'Key': 'CelerdataManaged', 'Value': 'true'}, {'Key': 'Name', 'Value': 'Celerdata:BE:skr2veiad:jeff-test-local'}, {'Key': 'ClusterID', 'Value': '3f84d2a9-1607-4820-9244-d24a06e009c9'}], 'VirtualizationType': 'hvm', 'CpuOptions': {'CoreCount': 4, 'ThreadsPerCore': 2}, 'CapacityReservationSpecification': {'CapacityReservationPreference': 'open'}, 'HibernationOptions': {'Configured': False}, 'MetadataOptions': {'State': 'applied', 'HttpTokens': 'optional', 'HttpPutResponseHopLimit': 1, 'HttpEndpoint': 'enabled', 'HttpProtocolIpv6': 'disabled', 'InstanceMetadataTags': 'disabled'}, 'EnclaveOptions': {'Enabled': False}, 'PlatformDetails': 'Linux/UNIX', 'UsageOperation': 'RunInstances', 'UsageOperationUpdateTime': datetime.datetime(2023, 9, 26, 21, 20, 22, tzinfo=tzlocal()), 'PrivateDnsNameOptions': {'HostnameType': 'ip-name', 'EnableResourceNameDnsARecord': False, 'EnableResourceNameDnsAAAARecord': False}, 'MaintenanceOptions': {'AutoRecovery': 'default'}, 'CurrentInstanceBootMode': 'legacy-bios'}]
[INFO] 2023-09-26T21:20:27.259Z c9cea0b6-3278-4977-911f-4accd9963c1f Filtering resources using 1 filters
[DEBUG] 2023-09-26T21:20:27.268Z c9cea0b6-3278-4977-911f-4accd9963c1f Filter #1 applied 1->1 filter: { "tag:CreatorName": "absent" }
[DEBUG] 2023-09-26T21:20:27.268Z c9cea0b6-3278-4977-911f-4accd9963c1f Filtered from 1 to 1 ec2
[INFO] 2023-09-26T21:20:27.269Z c9cea0b6-3278-4977-911f-4accd9963c1f Filtered resources 1 of 1
[DEBUG] 2023-09-26T21:20:27.269Z c9cea0b6-3278-4977-911f-4accd9963c1f Storing output with <LogFile file:///tmp/ec2-auto-tag-user/custodian-run.log>
[DEBUG] 2023-09-26T21:20:27.269Z c9cea0b6-3278-4977-911f-4accd9963c1f metric:ResourceCount Count:1 policy:ec2-auto-tag-user restype:ec2 scope:policy
[INFO] 2023-09-26T21:20:27.269Z c9cea0b6-3278-4977-911f-4accd9963c1f Invoking actions [<c7n.actions.autotag.AutoTagUser object at 0x7ff8a724c550>]
[INFO] 2023-09-26T21:20:27.270Z c9cea0b6-3278-4977-911f-4accd9963c1f policy:ec2-auto-tag-user invoking action:autotaguser resources:1
[DEBUG] 2023-09-26T21:20:27.962Z c9cea0b6-3278-4977-911f-4accd9963c1f metric:ApiCalls Count:2 policy:ec2-auto-tag-user restype:ec2
END RequestId: c9cea0b6-3278-4977-911f-4accd9963c1f
REPORT RequestId: c9cea0b6-3278-4977-911f-4accd9963c1f Duration: 885.81 ms Billed Duration: 886 ms Memory Size: 512 MB Max Memory Used: 107 MB
from cloud-custodian.
Hmm thanks for all the context 👍 . I'm a bit confused after looking at the detail there. Because there are a couple common reason for auto-tag-user
to fail:
- Insufficient permissions: ...but you seem to have them, and I see no access denied errors in your logs
- Custodian gives up trying to extract useful user/principal from the event: ...but your sample events seem to have assumed role details
Do the instances get tagged and then those tags are reverted perhaps? I'm wondering if CloudTrail logs would show anything useful for attempted tag-related events on those instances 🤔
from cloud-custodian.
Is there any keywords I could use to search in cloudtrail?
from cloud-custodian.
Hmm if your trail is logging to cloudwatch logs, an insights query like this might be useful (subbing in your instance ids, and targeting maybe 21:15 - 21:25 on 2023-09-26 to cover a few mins before and after the times shown in your logs):
filter eventName like /(?i)tag/ and eventSource like /tagging|ec2/ and @message like /i-001|i-002/
| fields @timestamp, userIdentity.arn, eventSource, eventName, errorCode, @message, @logStream, @log
| sort @timestamp desc
| limit 20
from cloud-custodian.
I think the issue is that it's also really a user in this context in the event, its a program. generally auto tag user is looking for a user in the event.
from cloud-custodian.
Related Issues (20)
- Notification on RDS DBCluster Creation fails HOT 1
- Lex Tagging Actions Fail HOT 1
- Duplicate results with gcp recommendor for compute instance
- c7n-left traverse filter - false negatives when using condition blocks inside `attrs` HOT 1
- proposal - json schema improvements HOT 2
- aws - step function - activities support
- aws - step function - state machines tags
- Add support for EMR Serverless Jobs and their underlying allocated/used resource metrics
- Can't filter by status in phd mode HOT 1
- Health event notification not sending messages
- Add ability to incrementing a tag value
- Add support for Network Manager Resources Delete Action
- c7n-left - using list indexes can break resource relationships
- Add memorydb users and acls
- auto-tag-date returning wrong creation date when resources are destroyed and recreated with the same name HOT 1
- AWS RAM Tagging Support
- c7n-org - No file resources.json generated in output S3 bucket for resources cache-snapshot
- Add CloudHSM backup resource
- Can we make the "days" field into a variable ? HOT 4
- Search Filter for Cloudformation Template
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloud-custodian.