This template creates a CodeArtifact domain named _my-domain_ with an AWS Key Management Service encryption key and attaches an IAM resource-based policy.

CloudFormation Template