What are valid reasons for this failure?
(Choose two.)
The networking configuration does not allow the EC2 instances to reach the internet via a NAT gateway or internet gateway, and the CodeDeploy endpoint cannot be reached.
The IAM user who triggered the application deployment does not have permission to interact with the CodeDeploy endpoint.
The target EC2 instances were not properly registered with the CodeDeploy endpoint.
An instance profile with proper permissions was not attached to the target EC2 instances.
The appspec.yml file was not included in the application revision.
Explanations:
If the EC2 instances cannot reach the CodeDeploy service due to a lack of internet access (e.g., missing NAT or Internet Gateway), the deployment will fail as the service cannot communicate with the deployment group.
The IAM user who triggers the deployment does not affect the success of the deployment itself, as long as the necessary permissions are granted to the EC2 instances and the CodeDeploy service role.
EC2 instances are automatically registered with the CodeDeploy service when they are part of the deployment group. Registration does not need to be done manually.
An instance profile with proper permissions is necessary for EC2 instances to interact with CodeDeploy. Without it, the deployment cannot proceed, leading to failure.
Missing the appspec.yml file would cause the deployment to fail, but in this case, it wouldn’t cause the status to show as “Skipped.” Instead, it would show as an error or failed deployment due to the missing file.