The issue I'm seeing is very much what happened here: https://forums.aws.amazon.com/thread.jspa?threadID=246123&tstart=0.
However, I have not worked with Powershell and would rather make this work without having to learn how to.
I have scheduled a task using Windows Schedule to run when an EC2 instance of Windows Server starts (started by a CloudWatch trigger). The task launches a Console Application that is supposed to pull data from a GoogleSheet, writes it as a RSS JSON file, and uploads it to an S3 bucket.
Everything works fine when the instance starts and +I log in+. The task runs, the console app runs, and the S3 bucket item is updated.
This does not work when (I see in the S3 bucket that the latest modification date is when I logged in last) not logged in, however, but I know that the task is running (shows in the history log of the scheduled task).
The instance has an IAM role attached for full S3 access.
The console app is a C# app. It uses the AmazonS3Config() method:
AmazonS3Config config = new AmazonS3Config();
var awsAccessKey = ConfigurationManager.AppSettings["AWSAccessKey"];
var awsSecretKey = ConfigurationManager.AppSettings["AWSSecretKey"];
AmazonS3Client client = new AmazonS3Client(awsAccessKey, awsSecretKey, RegionEndpoint.USEast1);
tUtil = new TransferUtility(client);
In App.config I have the credentials for the AmazonS3Config() method:
<appSettings>
<add key="AWSAccessKey" value="****" />
<add key="AWSSecretKey" value="****" />
<add key="ClientSettingsProvider.ServiceUri" value="" />
</appSettings>
The task scheduler settings:
In addition to the above, I have carefully followed the instructions in this video. The app no longer checks for keys in the app.config file, they instead come from the EC2 instance itself. But this did not resolve the problem.
Suggestions?



does not workis too vague. - helloV