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
2
votes
1 answer

How to use Powershell 7 from AzureDevops with AWS Tools

I am writing a powershell script and would like to take advantage of the 7.0 version of Powershell. Specifically because I need access to the new features of CovertFrom-Json that are not available in 5.1. My script has the following command:…
2
votes
2 answers

How can I retrieve all data from a given AWS Powershell cmdlets/alias?

When running a cmdlet like Get-WKSWorkspaces, it will return a set of properties about your workspaces (e.g. WorkspaceID, Username, SubnetID, BundleID, etc.), but not everything you see in the AWS GUI. I am specifically trying to pull things like…
2
votes
2 answers

How to get an ec2 instance id from instance name

i want to retrieve an ec2 instance's ID from it's name which I have set as the value of it's tag. I have a VM with key as 'Name' and value as 'testvm1'. Is there something like (get-ec2 instance id) | where-object {$_.(key.value) - eq "testvm1"}
jeevanreddymandali
  • 395
  • 3
  • 8
  • 23
2
votes
1 answer

GET-S3Bucket Name resolution failure attempting to reach service in region eu-west-1

I am attempting to connect to AWS s3 with Powershell but have hit this error when I run Get-S3Bucket and any PS scripts i want to run "GET-S3BucketL Name resolution failure attempting to reach service in region eu-west-1 (as supplied to the -Region…
2
votes
1 answer

List of AWS instances by TAG value using powershell

We are taging our AWS instances, I will like to retrieve a list of ALL our instances (ELB, S3, EC2, Security Groups) by TAG reference. for instance we consistently TAG our resources with something like this: { "Key": "Project", …
2
votes
3 answers

How to remove curly brackets from the PowerShell output

This is regarding AWS Certificate manager: Get-ACMCertificatelist | Get-ACMCertificateDetail | Select -ExpandProperty renewalsummary | Where-object {$_.renewalStatus -ne "Success"} Following is the output and I want to remove those curly…
2
votes
3 answers

Error in PowerShell due to copying the content of an S3 bucket

I copy the content of an S3 bucket to a local directory, however I get an error output from the powershell. Copy-S3Object : The requested range is not satisfiable It is pointing to this command: Copy-S3Object -BucketName $bucket -Key $object.Key…
2
votes
2 answers

Exclude files or certain type when writing to Amazon AWS S3

I am trying to upload folders to S3 to serve as static website. The problem I have is that within the folders, there are files of certain extensions such as .css, .png, .svg, etc. I am using AWS PowerShell tools and when I upload the following…
Junaid
  • 1,708
  • 16
  • 25
2
votes
2 answers

AWS IAM Policy for restricting instances by associated IAM role

What I'm trying to do (continuing off on a question I asked previously: How can I filter AWS Instances by IAM role in powershell and get the private ip address of that instance?) is get the private ip addresses of instances with a specific IAM Role.…
2
votes
1 answer

amazon EC2 command line interface not returning all my snapshots

So I am tasked with creating a Batch script to handle creating and deleting snapshots of one of our servers. Well I have most of it working but the problem I am having is trying to list out more than 11 snapshots. We have well over 200 snapshots on…
Tomas
  • 1,392
  • 2
  • 9
  • 13
2
votes
2 answers

AWS powershell :Get value of a Tag in ec2 instance

I can fetch the Tag's key-value pair of a instance using powershell. I have an object, $instance and $instance.Tags yields the following list: Key Value --- …
Sumit Murari
  • 1,597
  • 3
  • 28
  • 43
2
votes
2 answers

How do I get my own AMIs with AWS Tools for Powershell?

I am trying out AWS Powershell tool. What is the command to load AMI image I created in my environment? Apparently get-ec2image command loads all the available image on the market, which is not what I want.
2
votes
2 answers

How can I set the Cache-Control when using Write-S3Object?

I am using Windows Powershell for AWS and I have tried the following: Write-S3Object -BucketName 'user-ab-staging' -KeyPrefix 'content/css' -Folder 'content/css' -SearchPattern '*.css' -Metadata @{"Cache-Control" = "Value"} …
Samantha J T Star
  • 30,952
  • 84
  • 245
  • 427
2
votes
1 answer

How to retrieve IAM Entities limits and current usage via Powershell

I need to retrieve the following current count and capacity(limit) for AWS account: users groups roles instance profiles server certificates per AWS account. I have tried next commands: Get-EC2AccountAttributes, Describe methods of Ec2Client…
Set
  • 47,577
  • 22
  • 132
  • 150
2
votes
2 answers

How can I count running EC2 Instances?

I'm looking for a very basic script to count the number of running EC2 instances at AWS using PowerShell. I have found several methods but for some reason when I try them, I do not get the results I expect. The closest I have is this: $instancestate…
Mike J
  • 1,200
  • 6
  • 20
  • 31