Skip to content

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

@RoshmiB

Description

@RoshmiB

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.p2This is a standard priority issueservice-apiThis issue is due to a problem in a service API, not the SDK implementation.ssm

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions