title | platform |
---|---|
About the aws_cognito_userpools Resource |
aws |
Use the aws_cognito_userpools
InSpec audit resource to test properties of multiple Cognito user pools.
Ensure that a user pool exists.
describe aws_cognito_userpools do
it { should exist }
end
For additional information, see the AWS documentation on Cognito user pool.
Property | Description |
---|---|
ids | The IDs of the user pools. |
names | The names of the user pools. |
lambda_configs | The lambda trigger configuration of the user pools. |
statuses | The statuses of the user pools. |
last_modified_dates | The last_modified_dates of the user pools. |
creation_dates | The creation_dates of the user pools. |
describe aws_cognito_userpools do
its('ids') { should include 'USER_POOL_ID' }
end
describe aws_cognito_userpools do
its('names') { should include 'USER_POOL_NAME' }
end
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.
Use should
to test that the entity exists.
describe aws_cognito_userpools do
it { should exist }
end
Use should_not
to test the entity does not exist.
describe aws_cognito_userpools do
it { should_not exist }
end
Use should
to check if the user pool is available.
describe aws_cognito_userpools do
it { should be_available }
end
Your Principal will need the CognitoIdentityProvider:Client:ListUserPoolsResponse
action with Effect
set to Allow
.