Added AddressManagerTracingPipe#182
Added AddressManagerTracingPipe#182FedericaMoschese wants to merge 1 commit intofeature/PN-16895-epicfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an EventBridge Pipe to forward selected DynamoDB stream events from the PostelBatch table into an SQS “address manager tracing” input queue.
Changes:
- Introduces new CloudFormation parameters for the tracing SQS queue and PostelBatch DynamoDB Stream ARN.
- Adds
AWS::Pipes::Pipeplus an execution IAM role to ship DynamoDB stream events to SQS. - Adds a dev config default for the pipe desired state (
STOPPED).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| scripts/aws/cfn/microservice.yml | Adds parameters and resources for AddressManagerTracingPipe (DynamoDB Stream → SQS) and execution role/policy. |
| scripts/aws/cfn/microservice-dev-cfg.json | Adds AddressManagerTracingPipeDesiredState to dev configuration parameters. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| FilterCriteria: | ||
| Filters: | ||
| - Pattern: > | ||
| { | ||
| "eventName": ["MODIFY"], | ||
| "dynamodb": { | ||
| "$or": [ | ||
| { | ||
| "NewImage": { | ||
| "fileKey": { "S": [{ "exists": true }] } | ||
| } | ||
| }, | ||
| { | ||
| "NewImage": { | ||
| "outputFileKey": { "S": [{ "exists": true }] } | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| Target: !Ref PnAddressManagerTracingInputQueueARN | ||
| TargetParameters: | ||
| InputTemplate: > | ||
| { | ||
| "eventType": "NORMALIZER", | ||
| "normalizer": { | ||
| "batchId": <$.dynamodb.NewImage.batchId.S>, | ||
| "oldFileKey": <$.dynamodb.OldImage.fileKey.S>, | ||
| "oldOutputFileKey": <$.dynamodb.OldImage.outputFileKey.S>, | ||
| "newFileKey": <$.dynamodb.NewImage.fileKey.S>, | ||
| "newOutputFileKey": <$.dynamodb.NewImage.outputFileKey.S> | ||
| } | ||
| } |
There was a problem hiding this comment.
The filter matches events where either NewImage.fileKey or NewImage.outputFileKey exists, but the InputTemplate always references both $.dynamodb.NewImage.fileKey.S and $.dynamodb.NewImage.outputFileKey.S (and also both OldImage.* keys). This can produce failed transformations or malformed payloads when one of the referenced attributes is absent. Consider tightening FilterCriteria to require all fields used by the template (e.g., batchId + both new keys, and any old keys you need), or adjust the template so it only includes fields guaranteed to exist for matched events.
| "batchId": <$.dynamodb.NewImage.batchId.S>, | ||
| "oldFileKey": <$.dynamodb.OldImage.fileKey.S>, | ||
| "oldOutputFileKey": <$.dynamodb.OldImage.outputFileKey.S>, |
There was a problem hiding this comment.
The pipe payload depends on dynamodb.OldImage.* being present in the stream record. That only happens if the DynamoDB Stream is configured with an OLD_IMAGE-containing view type (typically NEW_AND_OLD_IMAGES). Consider documenting this requirement near PostelBatchTableStreamArn / the pipe definition (or otherwise making it explicit in infra) to avoid a deploy that silently produces events without OldImage and breaks the expected payload.
| Type: String | ||
| Description: Name of address manager tracing input queue | ||
|
|
||
| PnAddressManagerTracingInputQueueARN: |
There was a problem hiding this comment.
Parameter naming is inconsistent with the other *Arn parameters in this template (...DLQArn, ...TableArn, etc.). Consider renaming PnAddressManagerTracingInputQueueARN to PnAddressManagerTracingInputQueueArn for consistency (and update references accordingly) to reduce confusion and improve maintainability.
| PnAddressManagerTracingInputQueueARN: | |
| PnAddressManagerTracingInputQueueArn: |
|
|
||
| PnAddressManagerTracingInputQueueURL: | ||
| Type: String | ||
| Description: URL of address manager tracing input |
There was a problem hiding this comment.
The parameter description looks truncated/ambiguous. Consider clarifying it to something like URL of address manager tracing input queue to match the other queue-related descriptions and avoid confusion during stack parameterization.
| Description: URL of address manager tracing input | |
| Description: URL of address manager tracing input queue |
|



No description provided.