In this, the first example introduced in the AWS SDK for Swift Developer's Guide, we create a simple command-line program that uses your default AWS account, as configured using the AWS CLI or otherwise, to simply create a new Cognito Identity Pool, or to return the ID of the existing one if one's already present.
For details and explanations of what you find here, see Your first project with AWS SDK for Swift in the AWS SDK for Swift Developer's Guide.