Questions tagged [aws-powershell]

The AWS Tools for Windows PowerShell are a set of PowerShell cmdlets that are built on top of the functionality exposed by the AWS SDK for .NET.

The AWS Tools for Windows PowerShell are a set of PowerShell cmdlets that are built on top of the functionality exposed by the AWS SDK for .NET. The AWS Tools for Windows PowerShell enable you to script operations on your AWS resources from the PowerShell command line.

Questions involving the AWS Command Line Interface (CLI) should be tagged with instead.

Resources

Books

165 questions
15
votes
4 answers

'Get-ECRLoginCommand' is not recognized as the name of a cmdlet, function, script file, or operable program

I am trying to download a Docker image from AWS and following the instructions at AWS I'm running: (Get-ECRLoginCommand).Password | docker login --username AWS --password-stdin aws_account_id.dkr.ecr.region.amazonaws.com However, I'm getting the…
sashoalm
  • 75,001
  • 122
  • 434
  • 781
13
votes
3 answers

How to download files from S3 to a local folder

I have a requirement to download files from an AWS S3 bucket to a local folder, count the number of files in the local folder, check against S3, and send an email with the number of files. I tried to download files from S3 but I am getting an error…
komali
  • 163
  • 1
  • 3
  • 6
13
votes
4 answers

AWS Powershell to retrieve AWS account number

Does anyone know how to get AWS account number using AWS Powershell? Doesn't look like there's an API available for that.
minisch
  • 323
  • 5
  • 19
10
votes
1 answer

In Powershell, how can i get a Base64encoded memorystream of a local zip file?

i've been trying to use the AWS Update-LMFunctionCode to deploy my file to an existing lambda function in AWS. Differing from the Publish-LMFunction where I can provide just a path to the zipFile (-FunctionZip), the Update-LMFunction wants a…
Jeff Martin
  • 10,812
  • 7
  • 48
  • 74
8
votes
1 answer

Issuing Temporary Credentials to sign into AWS Management Console using AssumeRole, existing Policies, and unique URL

I want to issue temporary credentials to existing users, to allow them access to the AWS Management Console, by providing them a URL created with these temporary credentials. I am following along with a written example given through AWS…
8
votes
1 answer

Get a list of s3 buckets associated with amazon access key using powershell?

I have tried googling how I could retrieve a list of available s3 buckets associated with an Amazon Access Key, but either I am searching the wrong terms, or I haven't went through enough results. I have an access key and secret key, but I do not…
Jim P.
  • 1,087
  • 3
  • 9
  • 24
8
votes
4 answers

How to upload all files of a specific type to S3 Bucket?

When I do this: foreach ($f in (Get-ChildItem -filter "*.flv")){ Write-S3Object -BucketName bucket.example -File $f.fullName -Key $f.name -CannedACLName PublicRead } I get this error: Write-S3Object : At line:1 char:51 + foreach ($f in…
user773737
7
votes
1 answer

Login to AWS from AWS Tools for Powershell

I'm trying to use AWS Tools from Powershell, but I don't know how to log in. So when I run a command I naturally get this error: No credentials specified or obtained from persisted/shell defaults. How do I login? I read the article at…
sashoalm
  • 75,001
  • 122
  • 434
  • 781
7
votes
1 answer

Why does Set-SQSQueueAttribute fail with an 'InvalidOperationException: Invalid value for the parameter Policy' error?

Here is my issue, other than being new to AWS. I have been given the task of reproducing our production site that is in US-East-1 to US-West-2 for a DR site. I am running into an issue with creating the SNS alerts. The following code was from an AWS…
Don
  • 71
  • 1
  • 1
  • 3
7
votes
2 answers

How can I set AWS credentials in AWS PowerShell

I just downloaded the latest version of AWS Powershell and tried this: Before I don't remember any problem. Now I am getting this error message: PS C:\Program Files (x86)\AWS Tools\PowerShell\AWSPowerShell> Set-AWSCredentials -AccessKey xxxxxxxx…
Alan2
  • 23,493
  • 79
  • 256
  • 450
6
votes
3 answers

Add tag to an AWS EC2 instance using AWS PowerShell?

How do I use the Amazon Web Services (AWS) PowerShell module to add a tag (key-value pair) to an EC2 instance?
user189198
6
votes
2 answers

Where is the AWS Tools for Windows PowerShell Source Code

I would like to extend the AWS PowerShell commands. Many of the AWS SDKs are on GitHub, for example AWS .NET SDK, but not the AWS Tools for Windows PowerShell.
Barry MSIH
  • 3,525
  • 5
  • 32
  • 53
6
votes
2 answers

How to assign AWS credentials to SYSTEM user?

I have a Powershell script that uploads audit logs to an S3 repository. The script works fine when I run it while logged in but I need to define a scheduled task and the task needs to be run as SYSTEM user. Can someone recommend a way that I can…
rnolen
  • 131
  • 9
6
votes
1 answer

Synchronising IIS servers in aws ec2 with autoscaling best practice

We run our web application on Amazon EC2 with load-balanced, autoscaling web servers (IIS). Before autoscaling, our deployment process was file-copy to a couple of big web servers. Now with autoscaling we have anything from 5 to 12 webservers which…
sentece
  • 156
  • 1
  • 10
5
votes
1 answer

AWS PowerShell Use-STSRole : The security token included in the request is invalid

In my Jenkins build job I'm using this command to assume an AWS role: $Creds = (Use-STSRole -Region us-east-1 -RoleArn arn:aws:iam::$IAM_ACCOUNT_ID`:role/$IAM_ROLE -RoleSessionName jenkins).Credentials I'm getting the following error: Use-STSRole…
Nic
  • 12,220
  • 20
  • 77
  • 105
1
2 3
10 11