- Newest
- Most votes
- Most comments
Based on the output you shared, it appears that your Lambda function test was successful but didn't perform the RDS snapshot operations you expected. Let me explain what happened and how to conduct a more effective test.
The output you're seeing is from a default "Hello World" Lambda function template, not your actual RDS snapshot management code. The function simply returned a success message with "Hello from Lambda!" in the body, which indicates that:
- Your Lambda function executed without errors
- It's returning the default template response
- No actual RDS snapshot operations were performed
The logs show a very short execution time (1.67 ms), which is too brief for any meaningful RDS operations to have occurred.
To conduct a real test of your RDS snapshot management function:
- Ensure your Lambda function contains the actual code for managing RDS snapshots (not just the Hello World template)
- Verify that your function has the necessary IAM permissions (rds:DescribeDBSnapshots, rds:CopyDBSnapshot, rds:DeleteDBSnapshot, and for cross-region operations, rds:CrossRegionCommunication)
- Create a test event that includes any required parameters your function needs (source region, target region, retention period, etc.)
- After running the test, check CloudWatch Logs for detailed execution information beyond the basic START/END/REPORT entries
If your function is properly configured, you should see log entries showing the snapshots being processed, and the execution time should be longer since RDS operations take more time than simply returning a string.
For cross-region snapshot copying specifically, make sure your function has the proper permissions and that your code is correctly identifying the snapshots to copy or delete based on your criteria.
Sources
Create your first Lambda function - AWS Lambda
Cannot find permissions for: rds:DescribeDBSnapshots, rds:CopyDBSnapshot, rds:DeleteDBSnapshot when creating Role. | AWS re:Post
answered a year ago
Relevant content
asked 2 years ago
asked 2 years ago
asked 2 years ago
- AWS OFFICIALUpdated 3 years ago

How do I "Ensure your Lambda function contains the actual code for managing RDS snapshots (not just the Hello World template)" ? There was no "Hello World template" just this empty json:
{
}
What goes in between the brackets?
Thanks!