First, let’s define the Amazon Machine Image (AMI) I will be using for the EC2. The target instance OS will be Linux with .Net Core installed. Conveniently, Amazon provides an Image of this. The AMI currently available is “.NET Core 2.1 with Amazon Linux 2”. Of course, you may also pick any other Linux AMI and setup .Net Core installation on startup.
The minimum requirements to have an EC2 as a deploy target in CodeDeploy are
Create and attach an IAM role, which allows access to specific S3 buckets.
Install CodeDeploy Agent on the EC2