Skip to content

EventBridge PutTargets does not check the syntax of target IDs. #7567

@wunderbarb

Description

@wunderbarb

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

For instance providing a target ID such as the ARN of a SQS queue is accepted by localstack. In real, the ID must follow regex [a-z0-9.-_]+ and be less than 64 characters.

Expected Behavior

Issue an error message

How are you starting LocalStack?

With a docker run command

Steps To Reproduce

How are you starting localstack (e.g., bin/localstack command, arguments, or docker-compose.yml)

docker run localstack/localstack-pro

Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)

...
pti := &eventbridge.PutTargetsInput{
		Rule: aws.String(ruleName),
		Targets: []types2.Target{
			{
				Arn: aws.String(q.GetARN()),
				Id:  aws.String(ruleName + q.GetARN()),
			},
		},
		EventBusName: nil,
	}
	_, err = c.PutTargets(context.Background(), pti)

Environment

- OS: Ubuntu 20.04
- LocalStack: localstack-pro: latest

Anything else?

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions