From b6b745cfe6e5bf1b94f759c437f8b56fe81042db Mon Sep 17 00:00:00 2001 From: Philip Kotliyakov Date: Wed, 4 Mar 2026 18:46:37 +1000 Subject: [PATCH 1/2] added section regarding ec2 http put hopes when running aws cli step in a container --- .../docs/deployments/custom-scripts/aws-cli-scripts.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/docs/deployments/custom-scripts/aws-cli-scripts.md b/src/pages/docs/deployments/custom-scripts/aws-cli-scripts.md index 12caacd83c..da611fa755 100644 --- a/src/pages/docs/deployments/custom-scripts/aws-cli-scripts.md +++ b/src/pages/docs/deployments/custom-scripts/aws-cli-scripts.md @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2024-08-26 +modDate: 2025-03-04 title: AWS CLI and PowerShell scripts description: AWS CLI and PowerShell Scripts allow you to manage your AWS resources as part of your deployment process. icon: fa-regular fa-file-code @@ -128,6 +128,10 @@ To use your own version of the AWS CLI or AWS PowerShell cmdlets when using Dyna - Configure your step to use a Dynamic Worker pool that supports [execution containers](/docs/projects/steps/execution-containers-for-workers). - Configure your step to run in an execution container with a [compatible Docker image](/docs/projects/steps/execution-containers-for-workers/#which-image) that contains the versions of the AWS CLI or AWS PowerShell cmdlets that you would like to use. +## EC2 workers and execution containers + +If the worker is an EC2 instance and you configure your step to run inside a container on that worker, you must configure the EC2 instance's HTTP PUT response hop limit to 2. This is required because accessing the [Instance Metadata Service](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html) (IMDS) from within a container adds an additional network hop. You can configure this using the [modify-instance-metadata-options](https://docs.aws.amazon.com/cli/latest/reference/ec2/modify-instance-metadata-options.html) AWS CLI command. + ## Older versions In Octopus 2021.2 a warning will also appear in the deployment logs if the AWS tools bundled with Octopus Deploy are used in a step. Older versions of Octopus will not display this warning. From 483eb9af73bb6bf12e1f49e4599c6404e255d945 Mon Sep 17 00:00:00 2001 From: Philip Kotliyakov Date: Wed, 4 Mar 2026 19:02:53 +1000 Subject: [PATCH 2/2] linting --- src/pages/docs/deployments/custom-scripts/aws-cli-scripts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/docs/deployments/custom-scripts/aws-cli-scripts.md b/src/pages/docs/deployments/custom-scripts/aws-cli-scripts.md index da611fa755..83db18c8f9 100644 --- a/src/pages/docs/deployments/custom-scripts/aws-cli-scripts.md +++ b/src/pages/docs/deployments/custom-scripts/aws-cli-scripts.md @@ -76,7 +76,7 @@ PowerShell scripts run by the `Run an AWS CLI Script` step have access to the AW This means you can run scripts using a mix of the AWS CLI and PowerShell commands: -``` +```powershell # This will write out information on the Get-AWSPowerShellVersion CmdLet. get-command Get-AWSPowerShellVersion | fl *