쿠키 기본 설정 선택

당사는 사이트와 서비스를 제공하는 데 필요한 필수 쿠키 및 유사한 도구를 사용합니다. 고객이 사이트를 어떻게 사용하는지 파악하고 개선할 수 있도록 성능 쿠키를 사용해 익명의 통계를 수집합니다. 필수 쿠키는 비활성화할 수 없지만 '사용자 지정' 또는 ‘거부’를 클릭하여 성능 쿠키를 거부할 수 있습니다.

사용자가 동의하는 경우 AWS와 승인된 제3자도 쿠키를 사용하여 유용한 사이트 기능을 제공하고, 사용자의 기본 설정을 기억하고, 관련 광고를 비롯한 관련 콘텐츠를 표시합니다. 필수가 아닌 모든 쿠키를 수락하거나 거부하려면 ‘수락’ 또는 ‘거부’를 클릭하세요. 더 자세한 내용을 선택하려면 ‘사용자 정의’를 클릭하세요.

AWS Shell Script task

포커스 모드
AWS Shell Script task - AWS Toolkit for Microsoft Azure DevOps
이 페이지는 귀하의 언어로 번역되지 않았습니다. 번역 요청

Synopsis

Run a shell script using Bash with AWS credentials.

Description

Runs a shell script in Bash, setting AWS credentials and Region information into the shell environment using the standard environment keys AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN and AWS_REGION.

Parameters

You can set the following parameters for the task. Required parameters are noted by an asterisk (*). Other parameters are optional.

Display name*

The default name of the task instance, which can be modified: AWS Shell Script

AWS Credentials

Specifies the AWS credentials to be used by the task in the build agent environment.

You can specify credentials using a service endpoint (of type AWS) in the task configuration or you can leave unspecified. If unspecified the task will attempt to obtain credentials from the following sources in order:

  • From task variables named AWS.AccessKeyID, AWS.SecretAccessKey and optionally AWS.SessionToken.

  • From credentials set in environment variables in the build agent process. When using environment variables in the build agent process you may use the standard AWS environment variables: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and optionally AWS_SESSION_TOKEN.

  • If the build agent is running on an Amazon EC2 instance, from the instance metadata associated with the EC2 instance. For credentials to be available from EC2 instance metadata the instance must have been started with an instance profile referencing a role granting permissions to the task to make calls to AWS on your behalf. For more information, see Using an IAM role to grant permissions to applications running on Amazon EC2 instances.

AWS Region

The AWS Region code (us-east-1, us-west-2 etc.) of the Region containing the AWS resources the task will use or create. For more information, see Regions and endpoints in the Amazon Web Services General Reference.

If a Region is not specified in the task configuration, the task will attempt to obtain the Region to be used using the standard AWS environment variable AWS_REGION in the build agent process's environment. Tasks running in build agents hosted on Amazon EC2 instances (Windows or Linux) will also attempt to obtain the Region using the instance metadata associated with the EC2 instance if no Region is configured on the task or set in the environment variable.

Note: The Regions listed in the picker are those known at the time this software was released. New Regions that are not listed can still be used by entering the Region code of the Region (for example, us_west_2).

Arguments

The arguments to be passed to the shell script.

Script Source

The source of the script to run in the shell. Choose Script file to enter the file path to the script to be run or Inline script to specify the source code for the script in the task configuration.

Script Path

When Script Source is set to Script file, specifies the file path to the script to execute. This must be a fully qualified path or a path relative to the $(System.DefaultWorkingDirectory) location. The script file must exist.

Inline Script

The source code of the script to run when Script Source is set to Inline script. A maximum of 5000 characters is allowed.

Specify Working Directory

If selected a custom working directory, which must exist, can be specified for the script. The default behavior when unchecked is to set the working directory for the shell to be the script file location.

Working Directory

If Specify Working Directory is checked, contains the custom working directory for the script.

Fail on Standard Error

If this option is selected, the task will fail if any errors are written to the standard error stream.

Task Permissions

Permissions for this task to call AWS service APIs depend on the activities in the supplied script.

이 페이지에서

프라이버시사이트 이용 약관쿠키 기본 설정
© 2025, Amazon Web Services, Inc. 또는 계열사. All rights reserved.