Score:1

Scheduled task to upload a file to S3 with PowerShell ignores user profile settings

us flag

I am using Windows task scheduler with a user that has an AWS profile configuration under C:\Users<username>.aws\configuration (content below)

[default]
s3 =
    max_concurrent_requests = 300
    max_bandwidth = 5000MB/s


[profile BackupProfile]
s3 =
    max_concurrent_requests = 300
    max_bandwidth = 5000MB/s

The redacted script looks like this:

Set-AWSCredential -ProfileName BackupProfile 
Write-S3Object -BucketName xyausdpaisd-bkt -Region ap-south-1 -File $latest.FullName

When running the script manually, I get the expected speed (2Gbps) but when the same script is run with the Scheduled task (same user, as admin), the speed is around (150mbps).

Why is this scheduled task much slower when they are supposed to use the same S3 configuration?

cn flag
Have you tried increasing the task priority?
user2629636 avatar
us flag
I just did and it worked. Please suggest the answer and I'll mark it.
Score:2
cn flag

You can increase the priority of a task in an XML template and create a task with normal or above normal priority.

https://learn.microsoft.com/en-us/windows/win32/taskschd/tasksettings-priority

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.