2026/05/18 - Access Analyzer - 2 new2 updated api methods
Changes Services manage service-linked analyzers through dedicated APIs - CreateServiceLinkedAnalyzer and DeleteServiceLinkedAnalyzer that separate service-linked specific operations from customer-managed operations. It also shows up in ListAnalyzers and GetAnalyzer responses.
Creates a service-linked analyzer managed by an Amazon Web Services service. This operation can only be invoked by authorized Amazon Web Services services. Direct customer invocation returns AccessDeniedException.
Service-linked analyzers enable Amazon Web Services services to create and manage analyzers on behalf of customers. The lifecycle of these analyzers is managed by the calling service.
See also: AWS API Documentation
Request Syntax
client.create_service_linked_analyzer(
type='ACCOUNT'|'ORGANIZATION'|'ACCOUNT_UNUSED_ACCESS'|'ORGANIZATION_UNUSED_ACCESS'|'ACCOUNT_INTERNAL_ACCESS'|'ORGANIZATION_INTERNAL_ACCESS',
archiveRules=[
{
'ruleName': 'string',
'filter': {
'string': {
'eq': [
'string',
],
'neq': [
'string',
],
'contains': [
'string',
],
'exists': True|False
}
}
},
],
clientToken='string',
configuration={
'unusedAccess': {
'unusedAccessAge': 123,
'analysisRule': {
'exclusions': [
{
'accountIds': [
'string',
],
'resourceTags': [
{
'string': 'string'
},
]
},
]
}
},
'internalAccess': {
'analysisRule': {
'inclusions': [
{
'accountIds': [
'string',
],
'resourceTypes': [
'AWS::S3::Bucket'|'AWS::IAM::Role'|'AWS::SQS::Queue'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::KMS::Key'|'AWS::SecretsManager::Secret'|'AWS::EFS::FileSystem'|'AWS::EC2::Snapshot'|'AWS::ECR::Repository'|'AWS::RDS::DBSnapshot'|'AWS::RDS::DBClusterSnapshot'|'AWS::SNS::Topic'|'AWS::S3Express::DirectoryBucket'|'AWS::DynamoDB::Table'|'AWS::DynamoDB::Stream'|'AWS::IAM::User',
],
'resourceArns': [
'string',
]
},
]
}
}
}
)
string
[REQUIRED]
The type of analyzer to create. Valid values are ACCOUNT_UNUSED_ACCESS and ORGANIZATION_UNUSED_ACCESS.
list
Specifies the archive rules to add for the analyzer. Archive rules automatically archive findings that meet the criteria you define for the rule.
(dict) --
An criterion statement in an archive rule. Each archive rule may have multiple criteria.
ruleName (string) -- [REQUIRED]
The name of the rule.
filter (dict) -- [REQUIRED]
The condition and values for a criterion.
(string) --
(dict) --
The criteria to use in the filter that defines the archive rule. For more information on available filter keys, see IAM Access Analyzer filter keys.
eq (list) --
An "equals" operator to match for the filter used to create the rule.
(string) --
neq (list) --
A "not equals" operator to match for the filter used to create the rule.
(string) --
contains (list) --
A "contains" operator to match for the filter used to create the rule.
(string) --
exists (boolean) --
An "exists" operator to match for the filter used to create the rule.
string
A client token.
This field is autopopulated if not provided.
dict
Specifies the configuration of the analyzer. The specified scope of unused access is used for the configuration.
unusedAccess (dict) --
Specifies the configuration of an unused access analyzer for an Amazon Web Services organization or account.
unusedAccessAge (integer) --
The specified access age in days for which to generate findings for unused access. For example, if you specify 90 days, the analyzer will generate findings for IAM entities within the accounts of the selected organization for any access that hasn't been used in 90 or more days since the analyzer's last scan. You can choose a value between 1 and 365 days.
analysisRule (dict) --
Contains information about analysis rules for the analyzer. Analysis rules determine which entities will generate findings based on the criteria you define when you create the rule.
exclusions (list) --
A list of rules for the analyzer containing criteria to exclude from analysis. Entities that meet the rule criteria will not generate findings.
(dict) --
The criteria for an analysis rule for an analyzer. The criteria determine which entities will generate findings.
accountIds (list) --
A list of Amazon Web Services account IDs to apply to the analysis rule criteria. The accounts cannot include the organization analyzer owner account. Account IDs can only be applied to the analysis rule criteria for organization-level analyzers. The list cannot include more than 2,000 account IDs.
(string) --
resourceTags (list) --
An array of key-value pairs to match for your resources. You can use the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.
For the tag key, you can specify a value that is 1 to 128 characters in length and cannot be prefixed with aws:.
For the tag value, you can specify a value that is 0 to 256 characters in length. If the specified tag value is 0 characters, the rule is applied to all principals with the specified tag key.
(dict) --
(string) --
(string) --
internalAccess (dict) --
Specifies the configuration of an internal access analyzer for an Amazon Web Services organization or account. This configuration determines how the analyzer evaluates access within your Amazon Web Services environment.
analysisRule (dict) --
Contains information about analysis rules for the internal access analyzer. These rules determine which resources and access patterns will be analyzed.
inclusions (list) --
A list of rules for the internal access analyzer containing criteria to include in analysis. Only resources that meet the rule criteria will generate findings.
(dict) --
The criteria for an analysis rule for an internal access analyzer.
accountIds (list) --
A list of Amazon Web Services account IDs to apply to the internal access analysis rule criteria. Account IDs can only be applied to the analysis rule criteria for organization-level analyzers.
(string) --
resourceTypes (list) --
A list of resource types to apply to the internal access analysis rule criteria. The analyzer will only generate findings for resources of these types. These resource types are currently supported for internal access analyzers:
AWS::S3::Bucket
AWS::RDS::DBSnapshot
AWS::RDS::DBClusterSnapshot
AWS::S3Express::DirectoryBucket
AWS::DynamoDB::Table
AWS::DynamoDB::Stream
(string) --
resourceArns (list) --
A list of resource ARNs to apply to the internal access analysis rule criteria. The analyzer will only generate findings for resources that match these ARNs.
(string) --
dict
Response Syntax
{
'arn': 'string'
}
Response Structure
(dict) --
The response to the request to create a service-linked analyzer.
arn (string) --
The ARN of the service-linked analyzer that was created by the request. The analyzer name follows the format _AccessAnalyzerFor{ServiceName}-{Id} where Id is a randomly generated identifier.
Deletes a service-linked analyzer. This operation can be invoked by both authorized Amazon Web Services services and customers.
When invoked by a customer, IAM Access Analyzer performs a callback to the managing service to verify whether the analyzer is still in use and can be deleted. If the service indicates the analyzer is still in use, the deletion is rejected with ConflictException.
See also: AWS API Documentation
Request Syntax
client.delete_service_linked_analyzer(
analyzerName='string',
clientToken='string'
)
string
[REQUIRED]
The name of the service-linked analyzer to delete. Service-linked analyzer names follow the format _AccessAnalyzerFor{ServiceName}-{Id}.
string
A client token.
This field is autopopulated if not provided.
None
{'analyzer': {'managedBy': 'string'}}
Retrieves information about the specified analyzer.
See also: AWS API Documentation
Request Syntax
client.get_analyzer(
analyzerName='string'
)
string
[REQUIRED]
The name of the analyzer retrieved.
dict
Response Syntax
{
'analyzer': {
'arn': 'string',
'name': 'string',
'type': 'ACCOUNT'|'ORGANIZATION'|'ACCOUNT_UNUSED_ACCESS'|'ORGANIZATION_UNUSED_ACCESS'|'ACCOUNT_INTERNAL_ACCESS'|'ORGANIZATION_INTERNAL_ACCESS',
'createdAt': datetime(2015, 1, 1),
'lastResourceAnalyzed': 'string',
'lastResourceAnalyzedAt': datetime(2015, 1, 1),
'tags': {
'string': 'string'
},
'status': 'ACTIVE'|'CREATING'|'DISABLED'|'FAILED',
'statusReason': {
'code': 'AWS_SERVICE_ACCESS_DISABLED'|'DELEGATED_ADMINISTRATOR_DEREGISTERED'|'ORGANIZATION_DELETED'|'SERVICE_LINKED_ROLE_CREATION_FAILED'
},
'configuration': {
'unusedAccess': {
'unusedAccessAge': 123,
'analysisRule': {
'exclusions': [
{
'accountIds': [
'string',
],
'resourceTags': [
{
'string': 'string'
},
]
},
]
}
},
'internalAccess': {
'analysisRule': {
'inclusions': [
{
'accountIds': [
'string',
],
'resourceTypes': [
'AWS::S3::Bucket'|'AWS::IAM::Role'|'AWS::SQS::Queue'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::KMS::Key'|'AWS::SecretsManager::Secret'|'AWS::EFS::FileSystem'|'AWS::EC2::Snapshot'|'AWS::ECR::Repository'|'AWS::RDS::DBSnapshot'|'AWS::RDS::DBClusterSnapshot'|'AWS::SNS::Topic'|'AWS::S3Express::DirectoryBucket'|'AWS::DynamoDB::Table'|'AWS::DynamoDB::Stream'|'AWS::IAM::User',
],
'resourceArns': [
'string',
]
},
]
}
}
},
'managedBy': 'string'
}
}
Response Structure
(dict) --
The response to the request.
analyzer (dict) --
An AnalyzerSummary object that contains information about the analyzer.
arn (string) --
The ARN of the analyzer.
name (string) --
The name of the analyzer.
type (string) --
The type represents the zone of trust or scope for the analyzer.
createdAt (datetime) --
A timestamp for the time at which the analyzer was created.
lastResourceAnalyzed (string) --
The resource that was most recently analyzed by the analyzer.
lastResourceAnalyzedAt (datetime) --
The time at which the most recently analyzed resource was analyzed.
tags (dict) --
An array of key-value pairs applied to the analyzer. The key-value pairs consist of the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.
The tag key is a value that is 1 to 128 characters in length and cannot be prefixed with aws:.
The tag value is a value that is 0 to 256 characters in length.
(string) --
(string) --
status (string) --
The status of the analyzer. An Active analyzer successfully monitors supported resources and generates new findings. The analyzer is Disabled when a user action, such as removing trusted access for Identity and Access Management Access Analyzer from Organizations, causes the analyzer to stop generating new findings. The status is Creating when the analyzer creation is in progress and Failed when the analyzer creation has failed.
statusReason (dict) --
The statusReason provides more details about the current status of the analyzer. For example, if the creation for the analyzer fails, a Failed status is returned. For an analyzer with organization as the type, this failure can be due to an issue with creating the service-linked roles required in the member accounts of the Amazon Web Services organization.
code (string) --
The reason code for the current status of the analyzer.
configuration (dict) --
Specifies if the analyzer is an external access, unused access, or internal access analyzer. The GetAnalyzer action includes this property in its response if a configuration is specified, while the ListAnalyzers action omits it.
unusedAccess (dict) --
Specifies the configuration of an unused access analyzer for an Amazon Web Services organization or account.
unusedAccessAge (integer) --
The specified access age in days for which to generate findings for unused access. For example, if you specify 90 days, the analyzer will generate findings for IAM entities within the accounts of the selected organization for any access that hasn't been used in 90 or more days since the analyzer's last scan. You can choose a value between 1 and 365 days.
analysisRule (dict) --
Contains information about analysis rules for the analyzer. Analysis rules determine which entities will generate findings based on the criteria you define when you create the rule.
exclusions (list) --
A list of rules for the analyzer containing criteria to exclude from analysis. Entities that meet the rule criteria will not generate findings.
(dict) --
The criteria for an analysis rule for an analyzer. The criteria determine which entities will generate findings.
accountIds (list) --
A list of Amazon Web Services account IDs to apply to the analysis rule criteria. The accounts cannot include the organization analyzer owner account. Account IDs can only be applied to the analysis rule criteria for organization-level analyzers. The list cannot include more than 2,000 account IDs.
(string) --
resourceTags (list) --
An array of key-value pairs to match for your resources. You can use the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.
For the tag key, you can specify a value that is 1 to 128 characters in length and cannot be prefixed with aws:.
For the tag value, you can specify a value that is 0 to 256 characters in length. If the specified tag value is 0 characters, the rule is applied to all principals with the specified tag key.
(dict) --
(string) --
(string) --
internalAccess (dict) --
Specifies the configuration of an internal access analyzer for an Amazon Web Services organization or account. This configuration determines how the analyzer evaluates access within your Amazon Web Services environment.
analysisRule (dict) --
Contains information about analysis rules for the internal access analyzer. These rules determine which resources and access patterns will be analyzed.
inclusions (list) --
A list of rules for the internal access analyzer containing criteria to include in analysis. Only resources that meet the rule criteria will generate findings.
(dict) --
The criteria for an analysis rule for an internal access analyzer.
accountIds (list) --
A list of Amazon Web Services account IDs to apply to the internal access analysis rule criteria. Account IDs can only be applied to the analysis rule criteria for organization-level analyzers.
(string) --
resourceTypes (list) --
A list of resource types to apply to the internal access analysis rule criteria. The analyzer will only generate findings for resources of these types. These resource types are currently supported for internal access analyzers:
AWS::S3::Bucket
AWS::RDS::DBSnapshot
AWS::RDS::DBClusterSnapshot
AWS::S3Express::DirectoryBucket
AWS::DynamoDB::Table
AWS::DynamoDB::Stream
(string) --
resourceArns (list) --
A list of resource ARNs to apply to the internal access analysis rule criteria. The analyzer will only generate findings for resources that match these ARNs.
(string) --
managedBy (string) --
The service principal that manages this analyzer (for example, securityhubv2.amazonaws.com). This field is only present for service-linked analyzers and is not included for customer-managed analyzers.
{'analyzers': {'managedBy': 'string'}}
Retrieves a list of analyzers.
See also: AWS API Documentation
Request Syntax
client.list_analyzers(
nextToken='string',
maxResults=123,
type='ACCOUNT'|'ORGANIZATION'|'ACCOUNT_UNUSED_ACCESS'|'ORGANIZATION_UNUSED_ACCESS'|'ACCOUNT_INTERNAL_ACCESS'|'ORGANIZATION_INTERNAL_ACCESS'
)
string
A token used for pagination of results returned.
integer
The maximum number of results to return in the response.
string
The type of analyzer.
dict
Response Syntax
{
'analyzers': [
{
'arn': 'string',
'name': 'string',
'type': 'ACCOUNT'|'ORGANIZATION'|'ACCOUNT_UNUSED_ACCESS'|'ORGANIZATION_UNUSED_ACCESS'|'ACCOUNT_INTERNAL_ACCESS'|'ORGANIZATION_INTERNAL_ACCESS',
'createdAt': datetime(2015, 1, 1),
'lastResourceAnalyzed': 'string',
'lastResourceAnalyzedAt': datetime(2015, 1, 1),
'tags': {
'string': 'string'
},
'status': 'ACTIVE'|'CREATING'|'DISABLED'|'FAILED',
'statusReason': {
'code': 'AWS_SERVICE_ACCESS_DISABLED'|'DELEGATED_ADMINISTRATOR_DEREGISTERED'|'ORGANIZATION_DELETED'|'SERVICE_LINKED_ROLE_CREATION_FAILED'
},
'configuration': {
'unusedAccess': {
'unusedAccessAge': 123,
'analysisRule': {
'exclusions': [
{
'accountIds': [
'string',
],
'resourceTags': [
{
'string': 'string'
},
]
},
]
}
},
'internalAccess': {
'analysisRule': {
'inclusions': [
{
'accountIds': [
'string',
],
'resourceTypes': [
'AWS::S3::Bucket'|'AWS::IAM::Role'|'AWS::SQS::Queue'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::KMS::Key'|'AWS::SecretsManager::Secret'|'AWS::EFS::FileSystem'|'AWS::EC2::Snapshot'|'AWS::ECR::Repository'|'AWS::RDS::DBSnapshot'|'AWS::RDS::DBClusterSnapshot'|'AWS::SNS::Topic'|'AWS::S3Express::DirectoryBucket'|'AWS::DynamoDB::Table'|'AWS::DynamoDB::Stream'|'AWS::IAM::User',
],
'resourceArns': [
'string',
]
},
]
}
}
},
'managedBy': 'string'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
The response to the request.
analyzers (list) --
The analyzers retrieved.
(dict) --
Contains information about the analyzer.
arn (string) --
The ARN of the analyzer.
name (string) --
The name of the analyzer.
type (string) --
The type represents the zone of trust or scope for the analyzer.
createdAt (datetime) --
A timestamp for the time at which the analyzer was created.
lastResourceAnalyzed (string) --
The resource that was most recently analyzed by the analyzer.
lastResourceAnalyzedAt (datetime) --
The time at which the most recently analyzed resource was analyzed.
tags (dict) --
An array of key-value pairs applied to the analyzer. The key-value pairs consist of the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.
The tag key is a value that is 1 to 128 characters in length and cannot be prefixed with aws:.
The tag value is a value that is 0 to 256 characters in length.
(string) --
(string) --
status (string) --
The status of the analyzer. An Active analyzer successfully monitors supported resources and generates new findings. The analyzer is Disabled when a user action, such as removing trusted access for Identity and Access Management Access Analyzer from Organizations, causes the analyzer to stop generating new findings. The status is Creating when the analyzer creation is in progress and Failed when the analyzer creation has failed.
statusReason (dict) --
The statusReason provides more details about the current status of the analyzer. For example, if the creation for the analyzer fails, a Failed status is returned. For an analyzer with organization as the type, this failure can be due to an issue with creating the service-linked roles required in the member accounts of the Amazon Web Services organization.
code (string) --
The reason code for the current status of the analyzer.
configuration (dict) --
Specifies if the analyzer is an external access, unused access, or internal access analyzer. The GetAnalyzer action includes this property in its response if a configuration is specified, while the ListAnalyzers action omits it.
unusedAccess (dict) --
Specifies the configuration of an unused access analyzer for an Amazon Web Services organization or account.
unusedAccessAge (integer) --
The specified access age in days for which to generate findings for unused access. For example, if you specify 90 days, the analyzer will generate findings for IAM entities within the accounts of the selected organization for any access that hasn't been used in 90 or more days since the analyzer's last scan. You can choose a value between 1 and 365 days.
analysisRule (dict) --
Contains information about analysis rules for the analyzer. Analysis rules determine which entities will generate findings based on the criteria you define when you create the rule.
exclusions (list) --
A list of rules for the analyzer containing criteria to exclude from analysis. Entities that meet the rule criteria will not generate findings.
(dict) --
The criteria for an analysis rule for an analyzer. The criteria determine which entities will generate findings.
accountIds (list) --
A list of Amazon Web Services account IDs to apply to the analysis rule criteria. The accounts cannot include the organization analyzer owner account. Account IDs can only be applied to the analysis rule criteria for organization-level analyzers. The list cannot include more than 2,000 account IDs.
(string) --
resourceTags (list) --
An array of key-value pairs to match for your resources. You can use the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.
For the tag key, you can specify a value that is 1 to 128 characters in length and cannot be prefixed with aws:.
For the tag value, you can specify a value that is 0 to 256 characters in length. If the specified tag value is 0 characters, the rule is applied to all principals with the specified tag key.
(dict) --
(string) --
(string) --
internalAccess (dict) --
Specifies the configuration of an internal access analyzer for an Amazon Web Services organization or account. This configuration determines how the analyzer evaluates access within your Amazon Web Services environment.
analysisRule (dict) --
Contains information about analysis rules for the internal access analyzer. These rules determine which resources and access patterns will be analyzed.
inclusions (list) --
A list of rules for the internal access analyzer containing criteria to include in analysis. Only resources that meet the rule criteria will generate findings.
(dict) --
The criteria for an analysis rule for an internal access analyzer.
accountIds (list) --
A list of Amazon Web Services account IDs to apply to the internal access analysis rule criteria. Account IDs can only be applied to the analysis rule criteria for organization-level analyzers.
(string) --
resourceTypes (list) --
A list of resource types to apply to the internal access analysis rule criteria. The analyzer will only generate findings for resources of these types. These resource types are currently supported for internal access analyzers:
AWS::S3::Bucket
AWS::RDS::DBSnapshot
AWS::RDS::DBClusterSnapshot
AWS::S3Express::DirectoryBucket
AWS::DynamoDB::Table
AWS::DynamoDB::Stream
(string) --
resourceArns (list) --
A list of resource ARNs to apply to the internal access analysis rule criteria. The analyzer will only generate findings for resources that match these ARNs.
(string) --
managedBy (string) --
The service principal that manages this analyzer (for example, securityhubv2.amazonaws.com). This field is only present for service-linked analyzers and is not included for customer-managed analyzers.
nextToken (string) --
A token used for pagination of results returned.