
Product
Secure Your AI-Generated Code with Socket MCP
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
aws-resource-validator
Advanced tools
Validate, get validation patterns and generate valid AWS resource names (for testing \ mocks)
aws_resource_validator
is a Python package that creates objects to validate, show constraints of common AWS resource names, and generate compatible patterns for tests. This helps ensure that AWS resource names comply with AWS naming rules and can be used for testing and validation purposes.
📜Documentation | Blogs website
You can install the package via pip:
pip install aws_resource_validator
Here's a simple example demonstrating how to use aws_resource_validator
:
from aws_resource_validator.class_definitions import Acm, class_registry
# Use type hint so that you can use `api_registry` with full class definitions
acm: Acm = class_registry.Acm
print(acm.Arn.pattern)
print(acm.Arn.type)
print(acm.Arn.validate("example-arn"))
print(acm.Arn.generate())
Using Pydantic models for boto3 models:
import boto3
from aws_resource_validator.pydantic_models.dynamodb.dynamodb_classes import ListTablesOutput
dynamodb = boto3.client('dynamodb')
def list_dynamo_tables() -> List[str]:
return ListTablesOutput(**dynamodb.list_tables()).TableNames
if __name__ == "__main__":
tables: List[str] = list_dynamo_tables()
print("DynamoDB Tables:", tables)
We welcome contributions from everyone. Please see our CONTRIBUTING.md for more details.
For information on reporting security vulnerabilities, please see our SECURITY.md.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
This project is licensed under the MIT License. See the LICENSE file for details.
If you have any questions, feel free to reach out to us:
FAQs
Validate, get validation patterns and generate valid AWS resource names (for testing \ mocks)
We found that aws-resource-validator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.