Closed ScriptAutomate closed 11 months ago
Hey, thanks for bringing up the issue! Your script sounds cool. I'd be interested to know whether you also generate the content portions (outside of the structures and parameters).
We also auto-generate our documentation from the CFN resource specification. As such there is a slight delay before we update our GitHub docs repo with the latest supported resources and properties (see the Release History here: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/ReleaseHistory.html). We try to keep the delay as short as possible so there's very little drift.
Having said all that, we'll double check your diff to see if these all fall into that category of recently added resources/properties. Thanks for pointing this out!
Hey, thanks for bringing up the issue! Your script sounds cool. I'd be interested to know whether you also generate the content portions (outside of the structures and parameters).
We also auto-generate our documentation from the CFN resource specification. As such there is a slight delay before we update our GitHub docs repo with the latest supported resources and properties (see the Release History here: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/ReleaseHistory.html). We try to keep the delay as short as possible so there's very little drift.
Ah, cool, that helps explain. I completely overlooked the Release History page! I'll definitely have some comparison lookups in the future to see if missing stuff is likeley new stuff on delay. I should have also said this is using the latest us-west-2 cfn resource spec file, as I haven't included eval of the other regions.
I do actually pull other content to add into my code, for documentation purposes, such as resource and parameter descriptions. The current example is where I am using CFN resource documentation to generate resource-specific PowerShell Core functions. Here is an example output of one:
function New-AWSCFNApiGatewayAccount {
<#
.Synopsis
The AWS::ApiGateway::Account resource specifies the IAM role that Amazon API Gateway uses to write API logs to Amazon CloudWatch Logs.
.DESCRIPTION
The AWS::ApiGateway::Account resource specifies the IAM role that Amazon API Gateway uses to write API logs to Amazon CloudWatch Logs.
**Important**
If an API Gateway resource has never been created in your AWS account, you must add a dependency on another API Gateway resource, such as an AWS::ApiGateway::RestApi: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html or AWS::ApiGateway::ApiKey: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html resource.
If an API Gateway resource has been created in your AWS account, no dependency is required (even if the resource was deleted.
.PARAMETER CloudWatchRoleArn
The Amazon Resource Name (ARN of an IAM role that has write access to CloudWatch Logs in your account.
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-account.html
#>
[CmdletBinding()]
param(
[Parameter(Mandatory=$False)]
[String]$CloudWatchRoleArn
)
[PSCustomObject]@{
'Type' = 'AWS::ApiGateway::Account'
'Properties' = @{
'CloudWatchRoleArn' = "$CloudWatchRoleArn"
}
}
}
PowerShell Core comment-based help allows for help documentation in-terminal output to look like this:
PS /home/scriptautomate> Get-Help New-AWSCFNApiGatewayAccount -Full
NAME
New-AWSCFNApiGatewayAccount
SYNOPSIS
The AWS::ApiGateway::Account resource specifies the IAM role that Amazon API Gateway uses to write API logs to Amazon CloudWatch Logs.
SYNTAX
New-AWSCFNApiGatewayAccount [[-CloudWatchRoleArn] <String>] [<CommonParameters>]
DESCRIPTION
The AWS::ApiGateway::Account resource specifies the IAM role that Amazon API Gateway uses to write API logs to Amazon CloudWatch Logs.
**Important**
If an API Gateway resource has never been created in your AWS account, you must add a dependency on another API Gateway resource, such
as an AWS::ApiGateway::RestApi: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html or
AWS::ApiGateway::ApiKey: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html resource.
If an API Gateway resource has been created in your AWS account, no dependency is required (even if the resource was deleted.
PARAMETERS
-CloudWatchRoleArn <String>
The Amazon Resource Name (ARN of an IAM role that has write access to CloudWatch Logs in your account.
Required? false
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
RELATED LINKS
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-account.html
With the ability to convert into JSON:
PS /home/scriptautomate> New-AWSCFNApiGatewayAccount -CloudWatchRoleArn 'arn.xxxxx.xxx' | ConvertTo-Json
{
"Type": "AWS::ApiGateway::Account",
"Properties": {
"CloudWatchRoleArn": "arn.xxxxx.xxx"
}
}
It's a work in progress, but being able to simply pull this git repo, and parse the appropriate Markdown docs allows for easy built-in documentation/help generation. I'm going to be extending it to include region-specific rules/checks, so I had to build a tool that will create and manage my own reference repository as I couldn't find the spec files in any AWS github repo: ScriptAutomate/aws-cfn-resource-specs (I point this out in #4 )
Does the lag in source repo documentation replication explain these Broken Documentation
Links in CloudFormation Resource Specification Files? These links include for base of resource, and all sub-instances of link referenced by sub properties:
Resource | BrokenLink | WorkingLink |
---|---|---|
AWS::AutoScaling::AutoScalingGroup.InstancesDistribution | Broke | ReplaceWith |
AWS::AutoScaling::AutoScalingGroup.MixedInstancesPolicy | Broke | ReplaceWith |
If not, I'll open a second issue in relation to the broken links.
@ScriptAutomate Resource specification for us-east-1
will have a bit more than us-west-2
:
"region-specific rules/checks"
is interesting, would cfn-lint be a good fit?
@PatMyron thanks for the info on most-populated resource specs, and I'll also be taking a look at cfn-lint
!
@AWSRandall said: We also auto-generate our documentation from the CFN resource specification. As such there is a slight delay before we update our GitHub docs repo with the latest supported resources and properties (see the Release History here: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/ReleaseHistory.html). We try to keep the delay as short as possible so there's very little drift.
Looking at the release history over the past week, there haven't been any new resource specs that have been published reflecting the updates from the Aug. 29th update. Is there a similar lag time that occurs with spec json files reflecting changes referenced in release version history? For example, AWS::Config::OrganizationConfigRule
was recently added as a new Config Resource Type, but doesn't appear in any region's cfn resource spec json (v5.3.0 is latest as of Aug. 31).
Having said all that, we'll double check your diff to see if these all fall into that category of recently added resources/properties. Thanks for pointing this out!
I haven't done a new Documentation
link scan since opening this issue, so I don't know if any new doc links may have been added that are to documentation not with the source repo. With that being said, and reviewing the table in this issue, I believe the GitHub source documentation has been fully caught up with what I found missing or broken except for:
Existing Public Page | Missing from GitHub | Release History Date Ref |
---|---|---|
AWS::EFS::FileSystem LifecyclePolicy | aws-properties-elasticfilesystem-filesystem-lifecyclepolicy.md | June 13, 2019 |
Remaining stuff:
Documentation
links referenced in the CFN resource spec files? As in, the links that are present, but have since moved or were otherwise incorrect URL links? I am only asking because I do not know where else to raise this issue, since the CFN resource files themselves are not versioned within this AWS repo and this documentation repo seemed the best bet (I created #4 a while back for this reason). The latest CFN spec version (v5.3.0) still has the following broken Documentation
links for these resources (total of 10 broken links in the spec):Resource | BrokenLink | WorkingLink |
---|---|---|
AWS::AutoScaling::AutoScalingGroup.InstancesDistribution | Broke | ReplaceWith |
AWS::AutoScaling::AutoScalingGroup.MixedInstancesPolicy | Broke | ReplaceWith |
NOTE: I've created an issue in my own repository for these broken links where I am tracking these files at ScriptAutomate/aws-cfn-resource-specs: [v5.1.0] Broken Documentation Links
UPDATE: I have finished some automated tooling around broken Documentation
field lookups in CFN resource spec files, as issue tracked here: [Documentation Tracker JSON] Verification of Documentation Links Working, and Existing in AWS CFN Doc Source Repo. Here are most-current results:
MissingDocLinks
(which are Documentation
key values that don't exist in the CFN resource spec files even though they should) and BrokenDocLinks
solutions, if I could figure out a resolution.I found a total of 17 issues. They seem to be a mix of issues around:
CloudFormationResourceSpecification.json
filesHere are the types of issues I've come across:
Documentation
key of CloudFormationResourceSpecification.json
file is pointing to an incorrect html page, and needs to be updated. Seems to be an issue with the CloudFormationResourceSpecification.json
file.Documentation
key is not present in the CloudFormationResourceSpecification.json
file, and should be added. Seems to be an issue with the CloudFormationResourceSpecification.json
file.AWS::DLM::LifecyclePolicy.Parameters
and AWS::EFS::FileSystem.LifecyclePolicy
, both part of a collection of updates referenced in release history from a June 13, 2019 release.11/11/2019 EDIT: Increased days of time in below table for latest 8.0.0
cfn spec file release.
10/31/2019 EDIT: Increased days of time where items are still broken by another 30 days.
Based on the history of this issue, and what is actually considered missing docs that aren't merely a result of the slight lag between source documentation syncs (as in, has the error existed for greater than 2 weeks, as mentioned by @AWSRandall ), these are the 14 missing or otherwise broken documentation errors spread across the three categories mentioned in the previous comment:
Resource | DaysBrokenAtLeast | Error |
---|---|---|
AWS::Transfer::User.SshPublicKey | 94 | MissingDocLinks |
AWS::EC2::LaunchTemplate.CapacityReservationPreference | 94 | MissingDocLinks |
AWS::AutoScaling::AutoScalingGroup.InstancesDistribution | 94 | BrokenDocLinks |
AWS::AutoScaling::AutoScalingGroup.LaunchTemplate | 94 | BrokenDocLinks |
AWS::AutoScaling::AutoScalingGroup.LaunchTemplateOverrides | 94 | BrokenDocLinks |
AWS::AutoScaling::AutoScalingGroup.MixedInstancesPolicy | 94 | BrokenDocLinks |
AWS::CodePipeline::CustomActionType.ArtifactDetails | 80 | BrokenDocLinks |
AWS::CodePipeline::CustomActionType.ConfigurationProperties | 80 | BrokenDocLinks |
AWS::CodePipeline::CustomActionType.Settings | 80 | BrokenDocLinks |
AWS::OpsWorks::Instance.EbsBlockDevice | 80 | BrokenDocLinks |
AWS::OpsWorks::Layer.VolumeConfiguration | 80 | BrokenDocLinks |
AWS::DLM::LifecyclePolicy.Parameters | 151 | MissingFromAWSGitHubSourceRepo |
AWS::EFS::FileSystem.LifecyclePolicy | 151 | MissingFromAWSGitHubSourceRepo |
AWS::Glue::Trigger.NotificationProperty | 45 | MissingFromAWSGitHubSourceRepo |
This table was generated from documentation-broken-links-detailed.json
, located within my CFN auditing repository. That JSON includes potential fixes for most of the issues, and should be referenced when resolving problems along with the previous comment defining BrokenDocLinks
, MissingDocLinks
, and MissingFromAWSGitHubSourceRepo
I will no longer be updating the table in the last comment. The most up-to-date documentation lookup errors can be found here, which will continue keeping results of AWS documentation audits for changes/errors/etc:
It includes a list of errors that will be related to this issue. As of today, at least 10 or 13 of the documentation errors have existed for anywhere between 100 and 210 days (broken documentation links, completely missing documentation, absence of documentation link in spec file, missing in GitHub source mirror, etc.).
Some additional, helpful information (but not fully updated/accurate because it's rather tedious and no longer managed), can be found here:
If there are any questions, feel free to ask.
I have since archived the following project:
If this is of any assistance, the final generated list of broken links was last done back in January 2023, so I don't know how valid they may be anymore:
Closing this issue or pull request in advance of archiving this repo. For more information about the decision to archive this repo (and others in the 'awsdocs' org), see the announcement on the AWS News Blog.
I've been auto-generating code from CFN Resource specification files, and part of the generation runs through and automatically builds help documentation. Though, many of the source files that I would be pulling from only exist on the live user guide and not in the GitHub source documentation. Is there some kind of release strategy where documentation becomes available in the official AWS documentation before hitting the source repo here?