This demo application shows how to access an S3 bucket using the AWS .NET SDK with temporary credentials by assuming a role with STS.
https://github.com/ericbach/S3AssumeDemo/blob/master/docs/VPC%20endpoints.mp4
Set the AWS Account ID https://github.com/ericbach/S3AssumeDemo/blob/master/src/S3AccessDemo/Program.cs#L72
aws cloudformation create-stack --stack-name eric-bach-s3-assume-demo --template-body src/template.yml
dotnet run