Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws ssm start-automation-execution not accepting taget filtering by multiple tags #9028

Open
RoshmiB opened this issue Apr 9, 2024 · 1 comment
Labels
bug This issue is a bug. p2 This is a standard priority issue service-api This issue is due to a problem in a service API, not the SDK implementation. ssm

Comments

@RoshmiB
Copy link

RoshmiB commented Apr 9, 2024

Describe the bug

While running this command:-
aws --region us-west-2 ssm start-automation-execution
--document-name "AWS-ResizeInstance"
--parameters "InstanceType=t3a.small,AutomationAssumeRole=arn:aws:iam::<master_acc_id>:role/AWS-SystemsManager-AutomationAdministrationRole"
--target-parameter-name InstanceId
--targets Key=tag:MaintenanceDays,Values=30,127 Key=tag:MaintenanceTimeStart,Values=12
--target-locations Accounts=<target_acc_id>,Regions=us-west-2,us-east-2,ExecutionRoleName=AWS-SystemsManager-AutomationExecutionRole

Expected Behavior

It should run successfully

Current Behavior

It is throwing error :- botocore.errorfactory.InvalidAutomationExecutionParametersException: An error occurred (InvalidAutomationExecutionParametersException) when calling the StartAutomationExecution operation: Only one resource group or tag can be specified at a time

Reproduction Steps

run this command:-
aws --region us-west-2 ssm start-automation-execution
--document-name "AWS-ResizeInstance"
--parameters "InstanceType=t3a.small,AutomationAssumeRole=arn:aws:iam::<master_acc_id>:role/AWS-SystemsManager-AutomationAdministrationRole"
--target-parameter-name InstanceId
--targets Key=tag:MaintenanceDays,Values=30,127 Key=tag:MaintenanceTimeStart,Values=12
--target-locations Accounts=<target_acc_id>,Regions=us-west-2,us-east-2,ExecutionRoleName=AWS-SystemsManager-AutomationExecutionRole

Possible Solution

No response

Additional Information/Context

No response

CLI version used

aws-cli/2.15.36 Python/3.11.8 Linux/5.15.146.1-microsoft-standard-WSL2 exe/x86_64.ubuntu.22 prompt/off

Environment details (OS name and version, etc.)

Ubuntu 22.04.4 LTS

@RoshmiB RoshmiB added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Apr 9, 2024
@tim-finnigan tim-finnigan self-assigned this Apr 12, 2024
@tim-finnigan tim-finnigan added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Apr 12, 2024
@tim-finnigan
Copy link
Contributor

tim-finnigan commented Apr 12, 2024

Hi @RoshmiB thanks for reaching out. The start-automation-execution command corresponds to the StartAutomationExecution API. Therefore the parameter validation is set by the service team. Here is the Target API documentation showing supported formats for reference.

The SSM User Guide does have a section on targeting multiple managed nodes, where it shows send-command as supporting multiple tags. So I'm not sure if start-automation-execution is designed to not support multiple tags, or maybe this is something that needs to be clarified in the documentation.

Since this issue involves a service API which is used across the CLI/SDKs, I'm going to transfer it to our cross-SDK repository. I'll also reach out to the service team to try to get more information. (ref: P138676805)

Update - transferred back to original repository for continued tracking.

@tim-finnigan tim-finnigan added service-api This issue is due to a problem in a service API, not the SDK implementation. and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Apr 12, 2024
@tim-finnigan tim-finnigan transferred this issue from aws/aws-cli Apr 12, 2024
@tim-finnigan tim-finnigan changed the title aws ssm start-automation-execution not accepting taget filtering by multiple tags(short issue description) aws ssm start-automation-execution not accepting taget filtering by multiple tags Oct 30, 2024
@tim-finnigan tim-finnigan transferred this issue from aws/aws-sdk Oct 30, 2024
@tim-finnigan tim-finnigan added the p2 This is a standard priority issue label Oct 30, 2024
@tim-finnigan tim-finnigan removed their assignment Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p2 This is a standard priority issue service-api This issue is due to a problem in a service API, not the SDK implementation. ssm
Projects
None yet
Development

No branches or pull requests

2 participants