Skip to content

Missing APIs in AWS AppSync – Unable to Trace in CloudTrail

0

Hi everyone,

I’m facing an issue where some APIs in my AppSync environment have disappeared over the past two months. Here's the context:

We use AWS extensively for development, and AppSync is a core component of our stack. I’ve checked CloudTrail using filters for eventSource: appsync.amazonaws.com but couldn’t find any relevant logs indicating deletion or modification of these APIs. Our team follows a structured CI/CD process, but I haven’t identified any deployment logs pointing to this issue. AWS Config is not enabled, so I can’t use historical configuration data to track changes. Steps I’ve Taken:

Verified IAM activity logs for any unauthorized or accidental changes. Checked all CloudTrail logs for AppSync-related events over the past two months. Reviewed our CI/CD pipeline logs for any actions that might have impacted the APIs. Current Situation: Despite these efforts, I’m unable to determine what happened to these APIs. I want to know if there’s any other way to:

Retrieve details about when these APIs might have been deleted. Understand if there are internal AWS logs accessible through support. Identify tools or configurations I should enable to prevent such issues in the future. I’m considering raising a support ticket but wanted to check here for any advice or similar experiences.

Any insights or suggestions would be greatly appreciated!

Thanks in advance for your help!

asked 2 years ago246 views

2 Answers
0

Based on the information provided, it seems you're facing a challenging situation with missing APIs in your AWS AppSync environment. While CloudTrail is typically the go-to service for tracking API activity and changes in AWS, there are a few important points to consider:

  1. CloudTrail logging for AWS AppSync: It's important to note that AWS AppSync supports logging of calls made through the AWS AppSync API to CloudTrail. However, at this time, calls to your APIs and calls made to resolvers are not logged by AWS AppSync into CloudTrail. This limitation might explain why you're not seeing relevant logs in CloudTrail for the missing APIs.

  2. CloudTrail event types: CloudTrail records four categories of events: management events, data events, network activity events, and insights events. Make sure you're looking at the correct event type when searching for AppSync-related activities.

  3. CloudTrail log retention: By default, CloudTrail Event history provides a record of the past 90 days of management events in an AWS Region. If the APIs disappeared more than 90 days ago, you might not see the relevant logs in the default Event history.

To address your specific questions:

  1. Retrieving details about API deletion: Unfortunately, without proper logging in place, it may be difficult to determine exactly when and how the APIs were deleted.

  2. Internal AWS logs: AWS support might have access to additional logs, but this is not guaranteed. It's worth opening a support ticket to explore this possibility.

  3. Preventing future issues:

    • Enable AWS Config for historical configuration tracking.
    • Set up a CloudTrail trail to deliver events to an Amazon S3 bucket for long-term storage and analysis.
    • Implement stricter access controls and the principle of least privilege for your AWS resources.
    • Consider using AWS CloudTrail Insights to help identify unusual activity associated with API calls.

Moving forward, it's crucial to implement comprehensive logging and monitoring for your AWS environment. This includes setting up CloudTrail trails, enabling AWS Config, and potentially using additional monitoring tools to keep track of your resources and detect any unexpected changes promptly.

Lastly, don't rule out the possibility of human error or an unintended consequence of a deployment. Review your deployment processes and access controls to minimize the risk of accidental deletions or modifications in the future.

Opening a support ticket with AWS is a good next step to explore any additional options for investigating this issue and preventing similar occurrences in the future.
Sources
Logging AWS AppSync API calls with AWS CloudTrail - AWS AppSync
AWS CloudTrail Features - Amazon Web Services

answered 2 years ago

0

Can you share details of the general type of API modifications that are not being logged to CloudTrail. With CloudTrail enabled API creation, update, and deletion events should be logged along with schema, datasource, and function updates. I would recommend creating a support case if you haven't done so already.

AWS

answered 2 years 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.