1 Answer
- Newest
- Most votes
- Most comments
0
Hi Michael,
- Integrate the AWS logging package into your .NET server application by adding AWS.Logger.AspNetCore from the repository to enable CloudWatch logging.
- Configure CloudWatch logging in your application's appsettings.json or programmatically, as outlined in the repository's documentation.
- Ensure IAM roles for the AWS service hosting your .NET application (such as Lambda or EC2) include CloudWatch log permissions (logs:CreateLogStream, logs:PutLogEvents).
- Verify configurations if logs are missing in CloudWatch, and utilize CloudTrail for any IAM permission issues.
If didn't work, I'm here to help.
answered a month ago
Relevant content
- asked 2 years ago
- asked a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
Thank you for this answer. I've done 1 and 2, and I believe this configuration is correct since I am able to view logs in CloudWatch when I run locally.
But I don't get any logs when my app is hosted on Amplify. It's unclear whether Amplify automatically has all permissions to write logs by default, or if there's a role I should modify. Perhaps I should ask another question more targeted at Amplify.
CloudTrail doesn't show any attempt to write the logs.