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.

Install

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

For information on configuring your AWS environment for Chef InSpec and creating an InSpec profile that uses the InSpec AWS resource pack, see the Chef InSpec documentation on the AWS cloud platform.

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

For a full list of available matchers, see 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