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
1
vote
1 answer

Register-SSMTaskWithMaintenanceWindow Cmdlet for AWS

I have following CMD. $newtarget is a new maintenance window defined before. $newtask = Register-SSMTaskWithMaintenanceWindow -Windowid $newmw -ServiceRoleArn "arn:aws:iam::xxxxxx" -MaxConcurrency 1 -MaxError 1 -TaskArn "AWS-RunPowerShellScript"…
1
vote
1 answer

Get-SSMMaintenanceWindowTargets Cmdlet with AWS

following code function Get-SSMMaintenanceWindowMatch ($instance) { $mws = (Get-SSMMaintenanceWindowList -Region eu-central-1).WindowId for ($i=0; $i -le $mws.Length; $i++) { $val = ((Get-SSMMaintenanceWindowTargets -region…
ghraz0r
  • 31
  • 5
1
vote
0 answers

Function_Check for registered instances in Maintenance Windows

I have following code. function Get-SSMMaintenanceWindowMatch ([string]$instance,[string]$mwtag) { $mws = (Get-SSMMaintenanceWindowList -Region eu-central-1).WindowId for ($i=0; $i -le $mws.Length; $i++) { $val =…
ghraz0r
  • 31
  • 5
1
vote
1 answer

AWS PowerShell to retrieve the Bucket name and S3 key of source bundle of Elastic Beanstalk Environment

How do I get the S3 key and bucket name of source bundle of application that is running on an elastic beanstalk environment? Suppose I deploy a java application on an elastic beanstalk Environment and I have its environment name and version label by…
1
vote
2 answers

AWS Windows Powershell ECR Login

I am new to AWS and Docker. I am trying to setup AWS ECR and docker and trying to retrieve ECR Login using windows powershell. I am trying to use the command - Invoke-Expression -Command (aws ecr get-login) which gives me the error My problem is…
user9057272
  • 367
  • 2
  • 5
  • 17
1
vote
3 answers

How to create a new folder in S3 using AWS PowerShell

I have a bucket already created but I want to create new folders inside this bucket, not upload data or anything else, just create new folders. How can I do this ? Thanks
Laerte Junior
  • 244
  • 3
  • 16
1
vote
1 answer

AWS powershell credential_source = Ec2InstanceMetadata

I'm trying to set the credential_source = Ec2InstanceMetadata option in the profile config file so applications/tools running on an EC2 can assume a specific role rather than the Instance Profile role. I have the following config file at…
ubi
  • 4,041
  • 3
  • 33
  • 50
1
vote
1 answer

How to get EC2 Instances IpAddress of a cloudformation stack using PowerShell?

I want to list down IpAddresses of EC2 Instances of a CloudFormation stack using PowerShell. I'm trying the below command but it is not returning IpAddress. Get-CFNStackResourceList -StackName 'teststack' -LogicalResourceId 'EC2Instance' -region…
1
vote
1 answer

AWS CLI describe-instances inconsistency

I have a Bamboo task that invokes a batch file on a remote EC2. That batch file executes a test, then calls a PowerShell script to parse the test.Finally I grab the instance Id of our bamboo server and send the results of the test back via ssm. My…
J_sdev
  • 341
  • 1
  • 13
1
vote
1 answer

NewAg-ApiKey format errors

I'm trying to run the NewAg-ApiKey cmdlet in aws powershell. I'm unsure on the format of the StageKeys . Can someone clarify this? Currently writing the New-AgApiKey as: New-AGApiKey -CustomerId '11' -Description 'aa' -Enabled $True…
1
vote
1 answer

Sort AWS Instances by Tag:Name in PowerShell after Get-EC2Instance Cmdlet

I'm trying to sort the AWS Instances I pull with the Get-EC2Instance cmdlet but the issue I'm facing is that the property is a Tag and I'm not sure how to format it properly. I only know about assigning simple properties like "Sort-Object -Property…
nuk11888
  • 161
  • 2
  • 3
  • 15
1
vote
3 answers

AWS PowerShell update CloudFront distribution

I am trying to update my CloudFront distribution using AWSPowerShell module for PowerShell. When I use the update cmdlet from the module, I always get an error about not providing the "IfMatch" parameter. $cfd = Update-CFDistribution @parameters…
1
vote
1 answer

Powershell script while writing to AWS Cloudwatch throws error - Write-CWMetricData :

We are using Microsoft HPC (High performance computing). When a job is running, I want to see various HPC metrics and publish them onto AWS Cloudwatch. Below is the script that was on AWS site. Entire script runs fine but the last line which tries…
1
vote
1 answer

AWS Volume/Disk space utilization for linux and windows in linux

I am looking to pull the cloudwatch metrics for volume/disk space utilization and i was able to do it with below aws powershell script additionally to that i am also trying to figure out a way to associate size of the volume/Disk in windows and…
1
vote
0 answers

Amazon Webservice Powershell Credentials Setup Errors

I am trying to set up my AWS on my local machine through Windows Powershell and am getting the following error message: PS C:\windows\system32> Set-AWSCredentials -AccessKey AKIAJVD4X35xxxxxx -SecretKey 8CyGJKtOtqesdroQS/IJVZwNnZSr/xxxxxxxx -StoreAs…
Arnav Kundra
  • 111
  • 1
  • 4