Skip to main content

aws_cognito_identity_pools Resource

Use the aws_cognito_identity_pools InSpec audit resource to test properties of multiple Cognito identity pools.

For additional information, including details on parameters and properties, see the AWS documentation on Cognito identity pool.

Installation

This resource is available in the Chef InSpec AWS resource pack.

See the Chef InSpec documentation on cloud platforms for information on configuring your AWS environment for InSpec and creating an InSpec profile that uses the InSpec AWS resource pack.

Syntax

Ensure that an identity pool exists.

describe aws_cognito_identity_pools do
  it { should exist }
end

Parameters

This resource does not require any parameters.

Properties

identity_pool_ids
The IDs of the identity pool.
identity_pool_names
The names of the identity pool.

Examples

Ensure an identity pool is available.

describe aws_cognito_identity_pools do
  its('identity_pool_ids') { should include 'IDENTITY_POOL_ID' }
end

Ensure that the state is ENABLED or DISABLED.

describe aws_cognito_identity_pools do
    its('identity_pool_names') { should include 'IDENTITY_POOL_NAME' }
end

Matchers

This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our Universal Matchers page.

The controls will pass if the list method returns at least one result.

exist

Use should to test that the entity exists.

describe aws_cognito_identity_pools do
  it { should exist }
end

Use should_not to test the entity does not exist.

describe aws_cognito_identity_pools do
  it { should_not exist }
end

be_available

Use should to check if the identity pool is available.

describe aws_cognito_identity_pools do
  it { should be_available }
end

AWS Permissions

Your Principal will need the CognitoIdentity:Client:ListIdentityPoolsResponse action with Effect set to Allow.

Edit this page on GitHub

Thank you for your feedback!

×









Search Results