0

I want to use the powershell in my AWS Elastic Beanstalk to install some windows feature(ie. web sockets).

i found this https://docs.aws.amazon.com/vsts/latest/userguide/awspowershell-module-script.html but I don't know and I cant find the task equivalent for this. currently in my pipeline I have this

      - task: AmazonWebServices.aws-vsts-tools.awsshellscript.awsshellscript@1
        displayName: 'Install Web Socket Protocol'
        inputs:
          scriptSource: 'inline'
          script: 'Install-WindowsFeature -name Web-WebSockets'
          awsCredentials: 'AWS-test'
          regionName: 'ap-southeast-2'
          applicationName: 'test'
          environmentName: 'test-staging'

but this one runs on the bash shell script. What is the equivalent task for powershell script?

1 Answer 1

1

Azure Pipeline AWS Powershell script task

What you are looking for should be the extension AWS Toolkit for Azure DevOps:

Tasks for Amazon S3, AWS Elastic Beanstalk, AWS CodeDeploy, AWS Lambda and AWS CloudFormation and more, and running commands in the AWS Tools for Windows PowerShell module and the AWS CLI.

After installing this extension, we could add the task AWS Tools for Windows PowerShell Script:

enter image description here

- task: AmazonWebServices.aws-vsts-tools.AWSPowerShellModuleScript.AWSPowerShellModuleScript@1
  displayName: 'AWS Tools for Windows PowerShell Script: '
  inputs:
    awsCredentials: 'AWS-test'
    regionName: xxxx
    arguments: xxxx
    scriptType: inline

Hope this helps.

Sign up to request clarification or add additional context in comments.

2 Comments

Where did you store AWS-test?
@MohamadShiralizadeh I know this is over a year old but for anyone who runs into this, AWS-test is set in the DevOps Project settings, in Service connections.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.