k1LoW/awspec
51.9
Weak · 6 November 2026
17.5k
lines of production code
Ruby
primary language
4
measurements over time
What this system is
Features
Add \`awspec generate\` command for generating spec files
Users can now use the new \awspec generate\ subcommand to automatically generate spec files for various AWS resources. The command supports generating specs for individual resources (such as VPCs, EC2 instances, RDS clusters, and S3 buckets) by providing specific identifiers, and also supports generating specs for all resources of a type (such as IAM users, Lambda functions, and CloudWatch alarms) without arguments. It accepts optional \--profile\, \--region\, and \--secrets\_path\ options to configure AWS credentials and region context.
lib/awspec/command · high confidence
Added development utility scripts for console, setup, and toolbox
New executable scripts have been added to the bin directory to streamline local development workflows. The setup script now automates dependency installation via bundle install, the console script provides an interactive Pry environment with AWSpec loaded for testing, and the toolbox script initializes the Awspec toolbox for infrastructure management.
bin · high confidence
Awspec v1.36.0: New matchers, generators, and configuration system
Awspec has been updated to version 1.36.0, introducing a comprehensive suite of new testing capabilities and structural improvements. Users can now leverage a wide array of new matchers for resources including IAM (e.g., \be\_allowed\_action\, \have\_inline\_policy\), VPC (e.g., \be\_connected\_to\_vpc\, \have\_vpc\_peering\_connection\), and CloudFront (e.g., \have\_custom\_response\_error\_code\). The tool also expands its code generation features with new generators for resources like ALB/NLB listeners, EKS nodegroups, and various RDS clusters, alongside a new \awspec generate\ CLI command. Additionally, the library now supports a centralized configuration system via \Awspec.configure\, allows region specification through RSpec shared contexts, and improves credential handling by integrating with the \awsecrets\ gem.
lib/awspec · high confidence
Expanded AWS resource spec generation coverage
The spec generator in lib/awspec/generator/spec now supports a significantly wider range of AWS resources, adding new generator classes for ACM, ALB and NLB (including listeners), Auto Scaling Groups, CloudWatch (Alarms, Events, Logs), CodeBuild, CodePipeline, Direct Connect, EBS, EFS, Elastic IPs, ElastiCache, Elasticsearch, ELB, IAM (Groups, Policies, Roles, Users), Internet Gateways, KMS, Lambda, Managed Prefix Lists, NAT Gateways, Network ACLs, Network Interfaces, RDS, and Route Tables. This allows users to generate comprehensive RSpec tests for these resources directly from their AWS environment.
lib/awspec/generator/spec · high confidence
Expanded AWSpec matcher library for comprehensive infrastructure testing
This release significantly expands the testing capabilities of the awspec library by introducing a large set of new RSpec matchers and refactoring existing ones. Users can now validate a wide range of AWS resources, including new matchers for IAM policies (\be\_allowed\_action\, \have\_inline\_policy\), Lambda environment variables (\have\_env\_var\, \have\_env\_var\_value\), CloudFront distributions (\have\_origin\, \have\_custom\_response\_error\_code\), Route53 record sets (\have\_record\_set\ with support for CAA, MX, and aliases), and AWS Backup plans (\belong\_to\_backup\_plan\, \have\_plan\_rule\). The update also adds matchers for networking components like VPC peering (\be\_connected\_to\_vpc\, \have\_vpc\_peering\_connection\), security groups (\be\_opened\_only\), and network interfaces (\have\_network\_interface\ with \as\_eth\ chains). Additionally, existing matchers such as \belong\_to\_subnet\ and \belong\_to\_vpc\ have been refactored to support new resource types like RDS DB Subnet Groups and RDS Proxies, and to use a consistent \type\ object interface instead of the previous \resource\ object.
lib/awspec/matcher · high confidence
Expanded stub coverage for AWS resources and services
The stub layer now includes comprehensive mock responses for a wide range of AWS services, enabling users to write specs for resources that were previously unsupported. New stubs cover account-level attributes (EC2, RDS, Lambda, SES, STS), Application Load Balancer components (load balancers, listeners, target groups), and AWS Certificate Manager. Support has also been added for AWS Backup (plans, selections, vaults), AWS Batch (compute environments, job definitions, job queues), CloudFormation, CloudFront, CloudTrail, CloudWatch (alarms, events, logs), and CodeBuild. These additions allow users to validate the configuration and state of these resources in their infrastructure-as-code tests without requiring live AWS credentials.
lib/awspec/stub · high confidence
Initial implementation of AWS resource type matchers
The \lib/awspec/type\ directory has been populated with a comprehensive set of new type classes, introducing matchers for a wide range of AWS services including EC2 (instances, security groups, EBS, AMI, VPC, subnets, route tables, EIP, network interfaces, internet gateways, customer gateways, VPN gateways, transit gateways), ELB/ALB/NLB (load balancers, listeners, target groups), ECS (clusters, services, tasks, container instances), EKS (clusters, node groups), RDS (DB instances, clusters, parameter groups, subnets), IAM (users, roles, groups, policies), S3 (buckets), CloudFormation, CloudWatch (alarms, logs, events), Lambda, Route53, SNS, SQS, Kinesis, DynamoDB, ElastiCache, Redshift, EMR, CodeBuild, CodeDeploy, CodePipeline, Backup, ACM, API Gateway, CloudFront, and more. This establishes the foundational DSL for testing AWS infrastructure state.
lib/awspec/type · high confidence
New template generator for AWSpec resource types
A new \Awspec::Generator::Template\ class has been added to \lib/awspec/generator/template.rb\, providing a programmatic way to scaffold new AWS resource types. When invoked, it generates the necessary stub files, type definitions (inheriting from either \ResourceBase\ or \AccountAttributeBase\), spec files, and documentation structures for a specified type. This tool simplifies the process of adding support for new AWS services by creating the boilerplate code and file structure required for integration.
lib/awspec/generator · high confidence
Behavioural changes
Automated release workflow and parallelized test execution
The release process is now automated via the \tagpr\ tool, which manages versioning in \lib/awspec/version.rb\ and generates changelog entries, replacing the previous manual release steps. Additionally, the Rake test suite has been restructured to support parallel execution of spec tasks (types, account, core, generator, and helper specs) using the \parallel\ gem, significantly speeding up test runs, while the CI configuration has migrated from Travis CI to GitHub Actions.
(repo-wide) · high confidence
Executable relocated and Ruby linting fixed
The main executable has been moved from the bin directory to the exe directory, and the frozen string literal comment has been added to resolve a Rubocop warning.
exe · high confidence
Expanded AWS resource coverage and improved API resilience
Awspec now supports a significantly wider range of AWS resources, including ECS clusters, EKS clusters, RDS DB clusters, WAFv2, and many others, allowing users to write assertions against these services. The library also introduces a retry mechanism for API calls that hit throttling limits (RequestLimitExceeded or Throttling errors), automatically backing off to improve stability under load. Additionally, some resource types have been renamed (e.g., \auto\_scaling\_group\ to \autoscaling\_group\, \s3\ to \s3\_bucket\) with deprecation warnings provided for the old names to ensure a smooth transition.
lib/awspec/helper · high confidence
Library initialization and dependency restructuring
The main library entry point has been restructured to explicitly load several new internal components (config, ext, error, stub, generator, toolbox, resource\_reader, shared\_context) and external dependencies (dry/inflector, ipaddress, awsecrets). This change updates the runtime requirements and module loading order, introducing new capabilities for stubbing, resource reading, and configuration while replacing the previous string extension with the broader ext module.
lib · high confidence
Refactor documentation generation into a dedicated Type module
The documentation generation logic has been extracted from the previous monolithic script into a new \Awspec::Generator::Doc::Type\ module. This change restructures how resource types and account attributes are processed, explicitly separating the generation of standard resource links from account-specific attributes and their corresponding documentation sections.
lib/awspec/generator/doc · high confidence
Refactor string inflection to use dry-inflector and add utility extensions
String inflection methods (camelize, pluralize, underscore, demodulize) now rely on the dry-inflector library instead of the previous custom implementation, changing the underlying behavior for these transformations. Additionally, new extension methods have been added to core classes: Array\#single\_resource raises an error if the array contains more than one item, Hash\#to\_struct converts hashes into Struct objects, and Struct\#tag\_name extracts the value of the 'Name' tag.
lib/awspec/ext · high confidence
Refactored resource lookup logic into a modular finder helper
The resource lookup logic has been moved from the resource types into a new, modular helper structure under \lib/awspec/helper/finder\. This change introduces dedicated finder modules for each AWS service (e.g., \Ec2\, \Alb\, \Rds\, \Iam\), centralizing how resources are fetched, paginated, and identified by ID or name. For users, this ensures consistent and reliable resource resolution across all supported AWS services, handling edge cases like duplicate names and API pagination uniformly.
lib/awspec/helper/finder · high confidence
Restructured AWS resource documentation generators
The documentation generation logic for AWSpec resources has been reorganized into a dedicated \lib/awspec/generator/doc/type\ directory. This change introduces a modular architecture with a shared \Base\ class and specific generator classes for each AWS resource type (such as EC2, ALB, RDS, and ECS), ensuring that documentation for these resources is generated consistently and is easier to maintain.
lib/awspec/generator/doc/type · high confidence
Test coverage
Added tests for AWSpec generator specs; Added tests for Awspec::Helper::ClientWrap initialization and retry logic; Added tests for configuration management, shared context, and resource type validation; Added tests for the documentation generator; Expanded test coverage for AWS resource types; Simplify spec helper configuration and update Ruby style.
Dependencies
Upgrade to AWS SDK v3 and require Ruby 3.0
The awspec gem now requires Ruby 3.0 or higher and upgrades its core dependency from AWS SDK v2 to v3. This change replaces several legacy dependencies with modern alternatives: \active\_support/inflector\ is replaced by \dry-inflector\, \IPAddr\ by the \ipaddress\ gem, and \ox\ is added as a conditional runtime dependency for Ruby 3.0+. Development dependencies have also been updated, including raising the Rake version requirement to \~\> 12.0 and adding \octorelease\, \parallel\, and \pry\.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 51 → 52 (+1.1)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 61 → 61 (+0.0)
- Architecture 87 → 85 (-2.0)
- Maturity 40 → 44 (+4.1)
- Readiness 50 → 50 (+0.0)
- Security 81 → 71 (-9.6)
Resolved (5)
- Ambiguous initialization entry points. Awspec.configure suggests configuration setup, while CLI.init suggests command-line interface initialization. It is unclear if these are distinct concerns or if one is a wrapper for the other, leading to confusion about the correct entry point for library vs CLI usage.
- Helper methods for ID/Name conversion duplicate intent of standard finders. get_id_by_name_tag and get_name_by_id are utility methods that essentially perform lookups. If find_efs is the standard way to get a resource, these helper methods create a parallel, confusing path for users who might want to resolve an ID from a name.
- Inconsistent naming for 'find by ID' vs 'select by criteria'. Some finders use find_<resource>(id) (e.g., Alb.find_alb(id)), while others use select_<resource>by<criteria> (e.g., Alb.select_alb_by_vpc_id). However, Sqs uses find_queue(queue_name) which is ambiguous (is it an ID or name?). More critically, Ebs.select_ebs_by_instance_id and Eip.select_eip_by_instance_id use 'select' for a specific lookup, whereas Ebs.find_ebs(volume_id) uses 'find'. The distinction between 'find' (usually by ID/ARN) and 'select' (usually by filter/criteria) is violated or inconsistently applied across services.
- Inconsistent pluralization and 'all' selection. While find vs select_all is a common pattern, some services like CloudwatchEvent use find_cloudwatch_event and select_all_cloudwatch_events, while others like Codebuild use find_codebuild_project and select_all_codebuild_projects. The inconsistency is minor but present in the naming of the 'all' method (e.g., select_all_* vs potentially find_all_* in other parts of the codebase not shown, but here the main issue is the mix of find and select verbs for similar operations across different services). Specifically, Alb uses select_all_alb_tags which is a different operation (tags vs resources), but Cloudwatch uses select_all_cloudwatch_alarms. The verb 'select' is used for 'get all', while 'find' is used for 'get one'. This is consistent within services but the API surface as a whole should ensure 'find' is always singular and 'select_all' is always plural.
- Redundant 'get' vs 'find' methods in WAFv2. Wafv2.get_ip_set and Wafv2.find_ip_set appear to do the same thing (retrieve a resource), but with different signatures (one takes ID, one takes Name). This duplicates intent and forces users to choose between two methods for the same logical operation.
Changes since last survey
- 2 commits — 2 feature/other, 0 fixes
By area
- doc/resource_types.md — 2 commits
Notable commits
- change: Commit from GitHub Actions (Doc)
- change: Commit from GitHub Actions (Doc)
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
k1LoW/awspec was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 8b7d8250e4ad472a927a13f71e14a0d2d7cf8a9d — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.2+preprod-5c4e66d9318b.