Skip to content

How can I diagnose issues with aws.transfer events?

0

https://docs.aws.amazon.com/transfer/latest/userguide/track-connector-progress.html#track-connector-progress-eventbridge tells me that the transfer service will deliver an event to the default bus whenever an operation is performed.

I am performing StartDirectoryListing operations on an SFTP connector. They work, but I see no events when monitoring the default bus.

I have written a rule in TypeScript CDK to trigger on these events, but I can't see any evidence of the rule firing:

    const triggerStartCopiesEventRule = new events.Rule(this, "TriggerStartCopiesRule", {
      description: "Trigger the start-copies lambda",
      ruleName: "TriggerStartCopiesRule",
      eventBus: defaultEventBus,

      eventPattern: {
        source: ["aws.transfer"],
        detail: {
          eventName: events.Match.exactString("SFTPConnectorDirectoryListingCompleted"),
          connectorId: events.Match.exactString(connector.attrConnectorId),
          statusCode: events.Match.exactString("COMPLETED"),
        },
      },
      targets: [new targets.LambdaFunction(startCopiesHandler)],
    });
2 Answers
0

To diagnose issues with aws.transfer events, particularly for SFTP connector operations like StartDirectoryListing, you can take several steps:

  1. Verify event generation: Ensure that your SFTP connector is correctly configured and that the operations are actually completing successfully. The events are only generated upon completion of an operation.

  2. Check EventBridge rule configuration: Review your rule to ensure it matches the correct event pattern. For SFTP connector directory listing events, the detail-type should be "SFTP Connector Directory Listing Completed" rather than using eventName in the detail section. Your current rule might not be matching because of this discrepancy.

  3. Test with a broader event pattern: Temporarily modify your rule to capture all aws.transfer events by removing specific detail matching. This can help determine if any events are being generated at all.

{ "source": ["aws.transfer"], "detail-type": ["SFTP Connector File Send Completed", "SFTP Connector File Retrieve Completed", "SFTP Connector File Retrieve Failed", "SFTP Connector File Send Failed"] }

Refer https://docs.aws.amazon.com/transfer/latest/userguide/eventbridge.html

  1. Generate sample events: Use the EventBridge console to create a test event that matches your expected pattern. This can help verify if your rule and target are configured correctly.

  2. Enable EventBridge rule metrics: Turn on metrics for your rule to get more visibility into whether it's being triggered.

  3. Check CloudWatch Logs: Look for any error messages related to event delivery failures in CloudWatch Logs.

  4. Verify permissions: Ensure that your event targets (in this case, the Lambda function) have the necessary permissions to receive events from EventBridge.

  5. Monitor using alternative methods: While troubleshooting, you can use other monitoring methods provided by AWS Transfer Family, such as the ListFileTransferResults API operation or viewing SFTP connector logs in CloudWatch.

If after these steps you still don't see any events, it may be worth contacting AWS support to investigate further, as the service should be automatically generating these events for SFTP connector operations.
Sources
Troubleshoot monitoring and alerting issues - AWS Transfer Family
Managing Transfer Family events using Amazon EventBridge - AWS Transfer Family
Monitoring SFTP connectors - AWS Transfer Family
AWS Transfer Family events - Amazon EventBridge

answered a year ago

AWS
SUPPORT ENGINEER

revised a year ago

0

Hi! The documentation here provides guidance on how to capture the events emitted by Transfer family using eventbridge rules - https://docs.aws.amazon.com/transfer/latest/userguide/eventbridge.html#eventbridge-using-events-rules

If the issue persists, request you to reach out via AWS support or your account team for troubleshooting.

AWS

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.