4. Certification Automation
Objective
Automate access certification processes to ensure access rights are reviewed periodically and comply with security requirements.
Step 1: Verify DynamoDB Table
1.1 Check Existing Table
- Open Amazon DynamoDB in the console
- Verify that the
AccessCertifications
table was created in chapter 2 - This table will be used to store certification data
Step 2: Create Lambda Function
2.1 Create Lambda Function
- Open AWS Lambda in the console
- Click Create function
- Choose Author from scratch
- Enter function details:
- Function name:
AccessCertificationTrigger
- Runtime: Python 3.9
- Architecture: x86_64

- Click Create function
- In the Code tab, replace the default code with the following:
import json
import boto3
from datetime import datetime
def lambda_handler(event, context):
print("Access Certification Trigger Started")
# Initialize AWS clients
dynamodb = boto3.resource('dynamodb')
table = dynamodb.Table('AccessCertifications')
# Create certification record
response = table.put_item(
Item={
'UserId': 'system',
'CertificationDate': datetime.now().isoformat(),
'Status': 'Triggered',
'Type': 'Quarterly Review'
}
)
return {
'statusCode': 200,
'body': json.dumps('Certification process triggered successfully')
}
- Click Deploy to save changes
- Go to Configuration tab

- Click Permissions
- Click on the role name to open IAM console
- Click Add permissions → Attach policies

- Search and attach policy AmazonDynamoDBFullAccess
- Select Add permissions

Step 3: Setup EventBridge Scheduler
3.1 Create Scheduled Rule
- Open Amazon EventBridge in AWS Console
- Click Rules in the sidebar
- Click Create rule
Step 1: Define rule detail
Enter rule information:
- Name:
AccessCertificationSchedule
- Description:
Quarterly access certification review
- Event bus: default
- Enable the rule on the selected event bus
In Rule type, select Schedule
Click Next

Step 2: Define schedule
- In Occurrence, select Recurring schedule
- In Schedule pattern, select Rate-based schedule
- Enter 90 and select Days

- In Flexible time window, enter 15 minutes
- Click Next
Step 3: Select target
- In Target API, select AWS Lambda Invoke
- In Lambda function, select AccessCertificationTrigger
- Click Next

- Skip the tags section, click Next
Step 5: Review and create
- Review configuration and click Create rule

Step 4: Test the Automation
4.1 Verify EventBridge Schedule
- In Amazon EventBridge console
- Click Schedules in the sidebar (not Rules)
- Verify that schedule AccessCertificationSchedule is created and Enabled
4.2 Test Lambda Function Manually
- Go to AWS Lambda console
- Select function AccessCertificationTrigger
- Click Test to create a test event
- Use default test event and click Test
- Check execution results
4.3 Verify DynamoDB Record
- Go to Amazon DynamoDB console
- Select table AccessCertifications
- Click Explore table items
- Verify that a new record was created by the Lambda function
Expected Results
After completion:
- ✅ DynamoDB table for certification data storage
- ✅ Lambda function processing certification logic
- ✅ EventBridge scheduled triggers quarterly
- ✅ Automated quarterly access reviews
- ✅ Audit trail and monitoring
Next Steps
Continue to 5. Privilege Analytics to set up privilege analysis.