I am new to using AWS PowerShell and I am having issues with executing commands in PowerShell. Specifically, I am having issues running the below command. When I log into an AWS EC2 and execute the same command in CLI using the same account credentials it runs without failure. The error I receive states "Insufficient privileges to perform this action." I even went as far as using the admin account and I still receive the same error. I do not believe this matters, but I am running PowerShell on my local PC. Any guidance would be appreciated.
Command that generates the error
aws backup list-recovery-points-by-backup-vault --backup-vault-name Default --max-results 10000
PowerShell script I created for this purpose
Set-AWSCredential `
-AccessKey XXXXXXXXX `
-SecretKey XXXXXXXXX/XXXXXXX`
-StoreAs "MyProfile"
aws backup list-recovery-points-by-backup-vault --backup-vault-name Default --max-results 10000