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

How to check EC2 security group id using Powershell command?

How to check EC2 security group ID using PowerShell command? I am new to PowerShell. I tried to browse but couldn't find the answer.
0
votes
1 answer

Use-STSRole : Credential generation from SAML authentication failed

the AWS Powershell SAML code below works without problems on all windows workstations but on all windows servers we get this error: Use-STSRole : Credential generation from SAML authentication failed. + CategoryInfo : InvalidOperation:…
0
votes
2 answers

Unable to connect to remote server using Enter-PSSession cmdlet

I am getting below error message when I try to access one of the AWS Cloud Servers through"Enter-PSSession" cmdlet. I have Admin rights on the server and provide the necessary credential as well but still no gain. Please help to resolve or suggest…
0
votes
0 answers

Import-Module AWSPowerShell taking 30 seconds on EC2 instance - how to reduce?

I have a powershell script that runs on an EC2 t2.medium instance, but the script is taking 30 seconds just to import the AWSPowershell module. I've tried importing only the cmdlets that I need, but it made no difference in load time. Is it possible…
scw
  • 5,450
  • 8
  • 36
  • 49
0
votes
1 answer

How to get AWS service Catalog Provisioned Product's Envet Output section details through AWS Cli

Actually Service Catalog is using CloudFormation template for provisioning the Products/environments. I tried Provisioning the product with help of AWS document example. In that AWS is having CF template for Creating AWS Instance with public…
0
votes
2 answers

AWS latest ami imageId from an old imageid?

I have an EC2 Instance running an old AMI from AWS, which in my current setup is from WINDOWS_2016_BASE. Now I know that, but the Instance doesn't know that. Using PowerShell I want the EC2 Instance to create more like itself, but not from an AMI…
0
votes
1 answer

With AWS Powershell commandlets, how do I specify a different endpoint for S3 buckets

I have AWS instances in several regions (us-east-1, us-west-2). I use CodeDeploy to take .zip files stored in S3 and deploy them to AutoScale groups. However, since the S3 bucket only exists in us-east-1, and I am attempting to deploy to…
0
votes
1 answer

How can I cache to 1 minute with S3 and CloudFront and Write-S3Object

I have a staging CloudFront site that is sourced from S3 What I would like to do is to set this up so Cloudfront caches only for one minute and then any request after that will go back to the S3 to get new data. If possible I would also like to know…
0
votes
1 answer

Getting (more detailed) Elastic Beanstalk deployment logs - .NET/CLI/PowerShell

I'm deploying (a .NET app) to Elastic Beanstalk from scratch using PowerShell. I'm building a PS script because it's going to run on a CI server and I want to fully understand the process. The documentation doesn't want to make it easy, finding the…
0
votes
1 answer

Powershell script not executed on windows instance launched by AWS Autoscaling

I have a script scheduled in task scheduler and triggered at "System Startup". The script does the following: adds a remote machine to domain, move it to specific organizational unit, add it to group, then add it to elastic load balancer and…
0
votes
1 answer

How can I make a macro to run a few PowerShell commands one after the other?

I am using Amazon Web Service Powershell extension. I have multiple commands I want to run after each other like this: PS C:\g> Write-S3Object -BucketName "user-staging" -Key "index.html" -File "index.html" PS C:\g> Write-S3Object -BucketName…
Samantha J T Star
  • 30,952
  • 84
  • 245
  • 427
0
votes
1 answer

How do I examine the contents of a psobject array in Powershell?

I'm trying to set up a Powershell script that copies volume snapshots in AWS from one region to another. I think the script below should work but I have a sneaking suspicion that my psobject $Snapshots is not getting properly populated with the…
-1
votes
1 answer

How to send SES RawEmail with Attachment through PowerShell

I'm trying to design a PowerShell script that utilizes AWS SES to send a RawEmail with a .csv attachment, but information is scant on how to actually attach the attachment: PS C:\Users\jsmith_prod\Desktop\SSMSScript> ls Directory:…
-1
votes
1 answer

Unable to authenticate when invoking AWS cmdlets with SSO profile in visual studio code

I'm using visual studio code with the AWS cli version 2.9.13, I've got an SSO profile configured which I use to authenticate to the AWS service using device code authentication - I can then use this profile to connect to our AWS code commit…
-2
votes
1 answer

AWS Credential setup gives error in Windows Server

I am trying to set up my AWS on my local machine through windows PowerShell, it gives me the following error message; Set-AWSCredentials -AccessKey = XXXXXXXXXXXXXX -SecretKey = AAAAAAAAAAAAAAAAAAAAAAAAAAAA -StoreAs testuser Set-AWSCredentials : A…
1 2 3
10
11