AWS Introduction
AWS Pricing
AWS Threats
AWS Misconfigurations
- Getting Started with AWS Audit
- Permissions required for Misconfigurations Detection
- API Gateway Audit
- Cloudformation Audit
- CloudFront Audit
- CloudTrail Audit
- Cloudwatch Audit
- DynamoDB Audit
- EC2 Audit
- Elastic Search Audit
- ELB Audit
- IAM Audit
- KMS Audit
- Kubernetes Audit
- Lambda Audit
- RDS Audit
- Redshift Audit
- Route53 Audit
- S3 Audit
- Security Groups Audit
- SES Audit
- SNS Audit
- IAM Deep Dive
- App Sync Audit
- Code Build Audit
- Open Search Audit
- Shield Audit
- SQS Audit
Kinesis Stream Shard Level Metrics
More Info:
Ensure enhanced Amazon Kinesis stream monitoring for shard-level metrics is enabled in order to increase visibility into your streams performance. Kinesis is a platform for streaming data on Amazon Web Services that provides you with the ability to build and manage your own custom streaming data applications for specialized needs. A Kinesis stream is an ordered sequence of data records collected within a dedicated storage layer. The data records within a Kinesis stream is distributed into unique identified groups called shards.
Risk Level
Low
Address
Cost optimization, Operational Maturity
Compliance Standards
CBP
Triage and Remediation
Remediation
To remediate the misconfiguration related to Kinesis Stream Shard Level Metrics in AWS DynamoDB, you can follow these steps using the AWS Management Console:
-
Login to AWS Console: Go to the AWS Management Console (https://aws.amazon.com/console/) and login using your credentials.
-
Navigate to DynamoDB Service: From the list of AWS services, click on “DynamoDB” to open the DynamoDB dashboard.
-
Select the Table: In the DynamoDB dashboard, select the table for which you want to remediate the misconfiguration related to Kinesis Stream Shard Level Metrics.
-
Edit Table Settings:
- Click on the “Overview” tab for the selected table.
- Scroll down to the “Table details” section and click on the “Manage stream” button.
-
Update Stream Settings:
- In the “Manage stream” dialog box, select the option to enable the stream for the DynamoDB table.
- Choose the stream view type as “New and old images” or “New images” based on your requirements.
- Click on the “Create” button to save the changes.
-
Verify Configuration:
- Once the stream is enabled for the DynamoDB table, verify that the Kinesis Stream Shard Level Metrics are now active and functioning properly.
By following these steps, you can successfully remediate the misconfiguration related to Kinesis Stream Shard Level Metrics in AWS DynamoDB using the AWS Management Console.
To remediate the misconfiguration related to Kinesis Stream Shard Level Metrics in AWS DynamoDB using AWS CLI, follow these steps:
- Open your terminal and configure AWS CLI with the necessary credentials by running the following command:
aws configure
Enter your AWS Access Key ID, Secret Access Key, default region, and default output format as prompted.
- Enable Kinesis Stream Shard Level Metrics for the DynamoDB table using the AWS CLI by running the following command:
aws dynamodb update-continuous-backups --table-name YOUR_TABLE_NAME --point-in-time-recovery-specification PointInTimeRecoveryEnabled=true
Replace YOUR_TABLE_NAME
with the name of your DynamoDB table.
- Verify that Kinesis Stream Shard Level Metrics have been successfully enabled for the DynamoDB table by running the following command:
aws dynamodb describe-continuous-backups --table-name YOUR_TABLE_NAME
Replace YOUR_TABLE_NAME
with the name of your DynamoDB table. Check the output to ensure that PointInTimeRecoverySpecification
shows PointInTimeRecoveryEnabled
as true
.
By following these steps, you can remediate the misconfiguration related to Kinesis Stream Shard Level Metrics in AWS DynamoDB using AWS CLI.
To remediate the misconfiguration related to Kinesis Stream Shard Level Metrics for AWS DynamoDB using Python, you can follow these steps:
-
Install boto3: If you haven’t already, install the boto3 library in Python. You can do this using pip by running the following command:
pip install boto3
-
Update the CloudWatch Metrics Configuration: Use the following Python script to update the CloudWatch Metrics configuration for the DynamoDB table:
import boto3
def update_dynamodb_cloudwatch_metrics(table_name):
client = boto3.client('dynamodb')
response = client.update_continuous_backups(
TableName=table_name,
PointInTimeRecoverySpecification={
'PointInTimeRecoveryEnabled': True
}
)
print(response)
# Replace 'your_table_name' with the name of your DynamoDB table
update_dynamodb_cloudwatch_metrics('your_table_name')
- Run the Python Script: Save the above Python script in a file, and run it in your Python environment. This script will enable continuous backups for the specified DynamoDB table, which will ensure that the CloudWatch Metrics for the table are properly configured.
By following these steps, you can remediate the misconfiguration related to Kinesis Stream Shard Level Metrics for AWS DynamoDB using Python.