HEX
Server: LiteSpeed
System: Linux s3604.bom1.stableserver.net 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User: dmstechonline (1480)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: //usr/lib/python3.6/site-packages/awscli/examples/iam/get-service-last-accessed-details.rst
**To retrieve a service access report**

The following ``get-service-last-accessed-details`` example retrieves a previously generated report that lists the services accessed by IAM entities. To generate a report, use the ``generate-service-last-accessed-details`` command. ::

    aws iam get-service-last-accessed-details \
        --job-id 2eb6c2b8-7b4c-3xmp-3c13-03b72c8cdfdc

Output::

    {
        "JobStatus": "COMPLETED",
        "JobCreationDate": "2019-10-01T03:50:35.929Z",
        "ServicesLastAccessed": [
            ...
            {
                "ServiceName": "AWS Lambda",
                "LastAuthenticated": "2019-09-30T23:02:00Z",
                "ServiceNamespace": "lambda",
                "LastAuthenticatedEntity": "arn:aws:iam::123456789012:user/admin",
                "TotalAuthenticatedEntities": 6
            },
        ]
    }