In order for EC2 instance to be able to access Aurora database, you need to update security groups and add
default security group (the one used when you created Aurora database) to the EC2 instance.
On the AWS Console page, click on the
EC2 link under the
Compute section (or search for
DotNet5Graviton2 instance, go to
Actions -> Security -> Change security groups.
default security group, click
Add security group and then save changes.