79130226

Date: 2024-10-27 09:09:18
Score: 3.5
Natty:
Report link

In the AWS SDK for .NET, credentials are selected in a specific order. You can find it in the AWS SDK for .NET Developer Guide: https://docs.aws.amazon.com/sdk-for-net/v3/developer-guide/creds-assign.html

Does that mean that AWS will spin off an EC2 instance on your behalf...?

No. If your .NET code is running on an EC2 instance, and no other credentials are available in the 7 previous steps to resolve credentials (see link above), then the AWS SDK will grab your instance's profile credentials.

And when they say the application configurations, in the case of .NET 8 do they mean credentials stored in the app settings.json file?

You can set your AWS profile in your appsettings.json, and then authenticate with the AWS CLI so your code uses credentials setup in environment variables automatically:

Having AWS credentials dynamically set as environment variables on a local environment is fine from a security perspective.

This seems to be only about local development, how does that translate to a production environment?

Normally, you'd take a "batteries-included" approach in production: Let your code running in AWS grab the default instance credentials tied to the IAM role for the instance (whether its an EC2 instance role, or an AWS Lambda execution role), and let it attempt to access AWS resources that way. You'd have to make sure your instance has the right policies set for the role.

I'm asking all of this because I'm very new to adding such 3rd party services to my code and this time I want my WEB API to run on GitHub Pages and therefore I will have to have my repository be public, which no info can be found anywhere in the source code.

GitHub Pages will not able to host your web application - it just hosts files meant to be presented in your web browser. If you want to run a server-side REST API, you need something that will run .NET code in the cloud for you. Some resources to get started:

Reasons:
  • RegEx Blacklisted phrase (1): I want
  • RegEx Blacklisted phrase (1.5): I'm very new
  • Long answer (-1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: ArguingMussels