Different Between User Pool and Identity Pool

As per https://serverless-stack.com/chapters/cognito-user-pool-vs-identity-pool.html, user pool is used for authentication and identity pool is used to assigned permission for accessing AWS resources. But the user who only associated with user pool can access AWS resources like S3, DynamoDB in my serverless framework. Why does it happen? Is it because of iam roles that I defined in YML file.

Thanks,
Kind Regards,
John