v4.1.02026-11-23
AWS 部署框架(ADF)本次更新带来两项新能力:引导流水线的测试环节现在可以关闭,单条流水线支持最多 1000 个 action、每个 wave 100 个。修复方面,补齐了更新部署引导栈所需的 iam:PassRole 权限,账户筛选改用 Organizations 账户的 State 字段(Status 已废弃),并解决了 Terraform 流水线升级后 S3 后端加密配置缺失、跳转角色策略在超过 361 个账户时生成异常等问题。同时为 Organizations API 调用加入重试与缓存,减少限流风险。依赖全面升级至最新版(CDK v2.278、SAM CLI 1.174.0、boto3 1.44.5),CodeBuild 镜像切换到 aws/codebuild/standard:8.0,并移除了 Python 3.9 构建支持。无破坏性变更,建议先在非生产环境验证后再升级。
v4.0.02024-06-11
ADF v4.0 是一次以安全为核心的版本,围绕最小权限原则收紧了框架默认授予和使用的权限。
主要变化包括:收紧 IAM 角色与策略中过度授权的部分,利用 IAM 新特性缩小默认权限范围,降低攻击面;确需特权的场景也压缩了权限的范围与时长。同时修复了 IAM 角色的混淆代理问题,通过 aws:SourceArn 条件将角色限定到具体资源——如果你此前把这些角色用在 ADF 之外的场景,需要相应修补 Assume Role 策略。
跨账号访问也做了重构:引入 jump role 来限制高权限 Cross-Account Access Role 的使用,配合 bootstrap 栈新增的 adf-bootstrap-update-deployment-role 承担常规更新。安装或升级时可用新参数 GrantOrgWidePrivilegedBootstrapAccessUntil 设定一个截止时间,为 jump role 临时开通特权通道,供你修改 ADF 本体或 bootstrap 模板时使用。此后 aws-deployment-framework-bootstrap 的 CodeBuild 项目不再能无限制地扮演特权角色,必须经由 jump role。账号管理流程同样被限制在非保护的组织单元内。
升级前请仔细核对全部破坏性变更,并先在非生产环境完整测试。
v3.2.12024-05-27
v3.2.1 修复了 v3.2.0 中阻碍全新环境安装的若干问题,为 v4 升级测试扫清障碍。修复包括:管理账户配置别名、CodeBuild 阶段命名、Jinja2 模板渲染、部署账户 IAM 引导缺失、默认 VPC 删除权限、跨账户访问角色标签、CloudFormation 跨区域变更集审批,以及账户管理 Lambda 等。同时升级 Jinja2 至 3.1.4。
安装方面迎来新流程:内置全新安装器,新增依赖检查、版本校验、预部署警告与未提交更改检查。全新安装请参阅安装指南,升级则按管理指南操作。建议先在非生产环境充分验证升级流程。
v3.2.02023-01-24
Our biggest release to date; with 20 new features, 62 improvements, and 61 bug fixes!
Please note: this update refactored the account creation and pipeline generation to use Step Functions.
Thereby, the process to track how the update progresses and how you could validate its operation changed.
Please read the docs on updating ADF.
We are thankful to the community that helped enhance ADF.
With this release, we decided to list the contributions per author (listed in alphabetical order) within each section.
Highlighting the great contributions and enhancements that were made by them.
Features 🏗
apogorielov:
* Add ability to override the default branch for all source code providers #370.
benbridts:
Allow top-level keys starting with x- or x in deployment maps to add support for YAML anchors #347.
dsudduth:
* Fix AWS partition reference, adding support for AWS Gov Cloud #381, closes #332.
ivan-aws:
* Add ability to use CodeStar sources in deployment map #312.
* Add support to configure object ACL with S3 put object calls #412.
pozeus:
* Add support for CodeBuild to pull from docker hub #349, requested in #196.
srabidoux:
* Add support for account-specific SCP deployments #395.
stemons:
* Add support for Terraform deployments #397, closes #259, implements #114.
StewartW:
* Add ChatBot support for notifications, lifting the limit on pipelines that notify through Slack #367, closes 257, closes 297.
* Add support for pipeline triggers #392, closes #372.
* Add ability to define CodeCommit artifact format #389, closes #387.
* Add deployment waves for targets, removing the manual effort to spread 50 accounts per stage #358, closes #290, implements #128, closes #296, closes #250, closes #427.
* Add support to exclude specific account ids from a target group #358, closes #145.
sbkok:
* Add ability to disable trigger on changes for S3/CC/GH source providers #357:
Allows starting the pipeline only upon a completiontrigger event, closes #308.
* Allows you to disable reacting to the Github webhook, closes #337.
* Add support to change the default branch on ADF bootstrap and pipelines repositories #508.
* Add support for CodeBuild to run inside a VPC #517.
Refactor generateparams.py helper, adding support for per parameter/tag resolution from specific to least specific params file #559, closes #452, closes #294.
* Add support for CodeStar CodeBuild clone ref, allowing to work on git commits in CodeBuild in pipelines #563.
* Allow CloudFormation parameter file name configuration per target #565.
Fixes 🐞
benbridts:
* Remove unacceptable characters from CloudFormation Stack names #346.
dependabot:
* Bumb ejs from 2.6.1 to 3.1.7 in Fargate node sample application #480.
* Bump express from 4.16.4 to 4.17.3 in Fargate node sample application #555.
javydekoning:
* Fix resource reference in Step Function state machine policy #461, closes #460.
* Fix string should be array reference in Event Bridge Rule #456, closes #455.
* Bumb Jinja2 and Boto3 versions to 3.1.1 and 1.21.31 respectively #457, closes #454.
* Ensure account alias is configured or fail #465, closes #242.
* Fix account file processing and add debug logging #459, closes #458.
mhdaehnert:
* Separate artifact storage bucket for CodePipeline and CodeBuild to improve parallel execution #271, closes #270.
Nr18:
* Fix S3 object ownership controls #448, closes #447.
* Fix param overrides functionality to support using the same source #446, closes #445.
rickardl:
* Support paginator for parameters and empty descriptions in moved to root lambda #273, fixes #272.
tylergohl:
* Add retry for InvalidTemplateError and GenericAccountConfigureError #384, closes #383.
StewartW:
* Fix deployment account Step Function time outs #401, closes #400.
* Fix incorrect step name in step function #406.
* Update get account region function to use opted-in regions to #423, closes #420.
* Reduce adf-codepipeline-role policy size when ADF deploys to many regions #475, closes #474.
sbkok:
Add missing requirements file for shared python helpers, fixes use of retrieveorganization_accounts.py helper #352.
* Fix duplicate notification endpoint setup in pipeline generation #362.
* Fix specifying the tag on CodeBuild repository image to use #377, closes #374.
* Fix permission to set Support Subscription upon account creation #402, closes #379.
* Fix duplicated steps in Account Bootstrap Step Function #414.
* Fix global-iam example comment explaining where it is deployed #421.
* Fix use of correct region for AWS Organizations API depending on the partition it runs in #485.
* Fix correct use of build/deploy parameters for CodeBuild provider #489, closes #488.
* Fix account processing to be part of our SAR distribution #487.
* Fix Makefile use of find command on macOS #497, closes #473.
* Fix update process to only flag helpers as executable #499.
* Fix correct use of partitions #502.
* Fix use of NodeJS 14 with Standard 5.0 CodeBuild containers #500, closes #385.
* Fix MarkupSafe to v2.0.1 as v2.1 breaks compatibility with Jinja2<3.0.0 #498, closes #467, closes #441.
* Fix use of separate container image per target #501, closes #382.
* Fix wrapt version dependency #504.
* Fix syncing deployment map files to S3 when needed #506.
* Fix missing permission on cross-account org read-only role #509.
* Fix permission to update termination protection on pipeline stacks #511.
* Fix ADF state machines #514, closes #513.
* Fix updating account alias when needed #515.
* Fix tenacity version dependency #520.
* Fix Step Function input file syncing to upload only when content changed #530, part of #518.
* Fix pipeline generation policies #533.
* Fix repository creation permission in pipeline management #536.
* Fix stale pipeline deletion #535.
* Fix account creation wait for bootstrap to complete #537, closes #518.
* Fix initial commit implementation #534.
* Fix account bootstrap on organization unit move #539.
* Fix IAM Tag permissions #545.
* Fix initial commit on new/fresh install #544.
* Fix ADF Config storage, needs to be stored before used the first time #548.
* Fix pipeline regeneration upon account move #550, closes #549.
* Fix syncing to S3 in the root of the bucket #558.
* Fix CodePipeline source account id lookup to support missing account id for providers like CodeStar #561.
* Fix CreateRolePolicy permissions on global.yml bootstrap stacks #564.
* Fix clean-up of stale deployment map files in the pipeline bucket #562.
* Fix CodePipeline references to a specific config per stage over a default provider config #565.
* Fix executable flags of helper scripts #573.
* Fix CloudFormation permissions to update the pipeline notification SNS topic subscriptions #572.
* Fix permissions to enable CodeBuild as a deployment provider #571.
* Fix typos in pipeline management logical id #567.
Fix generateparams.py pipeline regions lookup #584.
* Fix bootstrapping in non-protected OUs only #590.
Improvements ✨
benbridts:
* Clean up of protected organization unit error message #353.
* Improvements to the Serverless Application Repository template #343, closes #342.
javydekoning:
* Add CloudFormation linting using cfn-lint #466, closes #464.
* Replace Travis with GitHub Actions #481.
* Add YAML linting using yamllint #470, closes #463.
* Fix yamllint findings #482.
* Upgrade to CDK v1.168, pylint v2.13 and others #486.
* Add MegaLint to organize execution of all linters configured #492, part of #491.
* Fix linting issues in RDK sample #495.
* Fix editor config linting #516, part of #491.
* Improve docs, add markdown linting, and change master account to management account in docs #521, part of #491.
* Improve code and docs by adding CSpell ch
v3.1.22021-03-12
Fixes 🐞
* Fix use of the resolve: intrinsic function on the first parameter
in the parameter files, #336.
v3.1.12021-03-03
Fixes 🐞
Fixes timeout and environmentvariables to be used when defined in the default CodeBuild Deployment provider properties #307, closes #306.
Fixes intrinsic functions for accountregion param files #333, closes #147.
* Fixes use of deployment from source directly when build stage is disabled #334, closes #236 and closes #318.
v3.1.02021-02-16
Features 🏗
* Adds Enterprise Support to account creation process #233, closes #232:
* ADF will raise a ticket to add the account to an existing AWS support subscription when an account is created. As a prerequisite, your organization master account must already have enterprise support activated.
* Adds nested deployment map support #266 and #328, closes #265:
This enables usage of sub directories within the deploymentmaps folder.
Fixes 🐞
* Fixes specific role usage to be used in Build and Deploy only #295.
* Corrects removing pipelines anchor in docs #279.
* Fixes CI builds due to isort version mismatch #284.
Fixes error handling of generateparams intrinsic upload function #277, closes #276.
Fixes specinline attribute of CodeBuild in docs #289.
Fixes provider specinline support of CodeBuild in #293.
* Fixes supported list of intrinsic upload path styles, enables usage of s3-url and s3-key-only #275, closes #299.
* Fixes create deployment account concurrency failure #287, closes #280.
* Fixes approval stage usage, by limiting specific role usage to Build and Deploy steps #295.
* Fixes yarnpkg GPG #313, closes #325.
* Removes dependency on botocore.vendored.requests #326, closes #324.
Improvements ✨
* Improves docs on providers and their properties #274.
* Separates pipeline cleanup from input generation script #288.
* Upgrades Python from v3.7 to v3.8 #313.
* Upgrades CodeBuild image from "aws/codebuild/standard:2.0" to "aws/codebuild/standard:5.0" #313, closes #267, closes #300.
* Upgrades CDK from v1.32 to v1.88 #313, closes #292.
Many thanks to our community for driving this release. And special thanks to @StewartW for contributing new features to ADF!
v3.0.62020-04-28
- CDK Version 1.25 -> 1.32
- Account Alias’ are no longer automatically created as the accounts full name.
- Adding ability to tag pipelines (example included in docs)
- Adding in cloudformation:* in global-iam-example.yml for target accounts.
- Adding in additional wait time for account creation process (Temporary Fix)
v3.0.12020-01-20
Fixes 🐛 - SCP and Tagging Policy files were not using relative pathing
Resolves initial issue in 3.0.0 that caused SCP and tagging policy files to not use relative pathing when being searched for in the folder structure and thus being stored as absolute paths (including the adf-bootstrap prefix)
v3.0.02020-01-14
v3.0.0 🏎
This release is specifically focused two main topics: Security and Account provisioning
Security:
In this release we are limiting default IAM policies to ensure pipeline phases such as custom deployments or build phases cannot be used to elevate ones own permissions. To ensure strict separation of concerns and enforce high standards around IAM we have created two new IAM Role that lives on each AWS Account within the organization. These role are created in the global.yml (base stack) of each account and are used for the following purposes:
- adf-automation-role:
> When creating pipelines in ADF there are certain things that are required to be setup on multiple different accounts. For example, the source account requires a repository on it, and also a CloudWatch event. Previously the codebuild role would assume the adf-cloudformation-deployment-role in the target account and create the required cloudformation stack. This pattern allowed the adf-codebuild-role to much power and thus we have removed this link. This new role (adf-automation-role) is assumed by codebuild in the aws-deployment-framework-pipelines pipeline exclusively and cannot be assumed by the standard (other) deployment pipelines.
- adf-readonly-automation-role:
> When codebuild runs as part of a standard deployment pipeline (anything other than aws-deployment-framework-pipelines) it uses the role: adf-codebuild-role by default. The adf-codebuild-role has access to assume this new role (adf-readonly-automation-role) on each account within the organization. It assumes this role when running certain intrinsic functions such as import or resolve which allow values to be retrieved from other AWS Accounts within the organization. Previously, codebuild would assume the adf-cloudformation-deployment-role to retrieve these values which can have many actions allowed making it inappropriate to assume.
This change effectively lowers the amount of permissions the default adf-codebuild-role has. Prior to this release, using codebuild as a deployment stage would also default to the adf-codebuild-role which would allow the deployment stage more accesses than intended. From this release onwards, codebuild stages will default to the adf-codebuild-role. However, since this role has very limited access, it will most likely require the user to define a custom role in order to assume and deploy resources into other accounts. For example, if you wanted to deploy some resources with Terraform, or run "cdk deploy" you would need to provide an IAM role that has been created which has the required permissions to do so. For more information on how to create such as role, see the commented out adf-custom-deploy-role in the example-global-iam.yml.
Account Provisioning:
Until this release ADF has not had a streamlined automated way to create and move AWS accounts into organizational units. With 3.0.0 we are introducing an account provisioner concept that handles the creation and OU location of AWS Accounts in a declarative format. As part of the bootstrap repository we have created a new root folder titled adf-accounts, this folder contains definition files (yaml) that describe AWS accounts along with an assortment of properties. The bootstrap pipeline automation component (in codebuild) will parse the files and create or move the accounts into their defined state. This allows for end to end creation, bootstrapping and pipeline generation of an AWS account (all from code!). For more information on this process and a breakdown of the file properties and syntax itself see the admin guide (also see readme.md in adf-accounts folder). A huge thank you to @thiezn and team for this work!
Inter OU Moving of AWS Accounts
Moving accounts between two OU's will now trigger the previous base stack to be removed and the new base stack aligned with that Organizational Unit to be applied.
Tagging Policies
With this release, ADF enables streamlined automation and management of Tagging Policies via AWS Organizations. Tagging Policies can now be applied to OU's in the same manner as Service Control Policies could be in prior versions. Using a tagging-policy.json file in a specific folder of the bootstrap repository that matches to your organization structure enables the tagging policy for the specific OU. Read more about how tagging policies work here and see the example-tagging-policy.json in the bootstrap repo for a simple reference.
Seperation of adf-cloudformation-deployment-role IAM Policy
Moving forward we have decided to move the adf-cloudformation-deployment-role policy out of the global.yml and into a new file called global-iam.yml, this change hopes to simplify and create a separation between the global.yml which contains resources related to ADF in general as opposed to the new file (global-iam.yml) which relates to what can and cannot be deployed into the account that applies that specific base stack. the new global-iam.yml file is searched for recursively in the same fashion other global.yml or regional.yml files.
Other Changes:
- Resolved #196 - Support for custom codebuild images (You can now use custom build images in your build or deploy actions with CodeBuild. See user-guide for more information and examples.)
- Resolved #198 - Parameter Store is no longer used for the state of the pipeline definition, this has been moved to S3.
- Resolved #191 - Simple check tp determine region is correct when deploying from SAR.
- Resolved #189 - Enable flag for build stage bug fixed, now works as intended.
- Resolved #180 - error handling has been fixed to correct this.
- Resolved #178 - ADF Account provisioning is here!
- Resolved #177 - Upgrades will not touch the global-iam.yml file which holds the cloudformation-deployment-role-policy.
- Resolved #188 - Removed hardcoded "master" from source account cloudwatch event.
- Resolved #148 - Base stack (iam and bootstrap) are removed and re-added based on inter OU account moves.
- cdk version bumped to 1.2.0
- removed hard coding of master branch on PR event action on source accounts.
Upgrading from 2.x to 3.x
With the change to 3.0 we have decided to move the bootstrap content (templates/scps) in the bootstrap repository into its own folder (adf-bootstrap). Since the bootstrap folder path is changing from the root of the repository into the adf-bootstrap folder, you will need to move your existing folder structure (.yml/scp files) into the new format. When deploying ADF 3.x from the SAR a Pull Request will get made against the bootstrap repository as per normal upgrade process. The 3.0 PR will move the ADF specific content including the deployment folder into the new structure, if you have significantly altered the global/regional.yml for the deployment account be sure to adjust this as intended prior to merging to master. If you require to make alterations to the structure of the folders/templates simply pull the 3.0 branch down and add in your existing folder/OU structure as desired with the adf-bootstrap folder as the new root and push back into the branch.
With the 3.0 change there is also an example-global-iam.yml file that is included in the root of the adf-bootstrap folder. This file should be renamed to global-iam.yml and distributed into the folders/OUs that you intend to have Cloudformation deploy resources into. This is required in order to define what actions the role on the target accounts will have access to when deploying Cloudformation resources via CodePipeline.
Steps to perform for the upgrade process:
- Open SAR from us-east-1 in the master account.
- Navigate to ADF, tick "I acknowledge that this app creates custom IAM roles and resource policies." and hit Deploy.
- Once deployed, navigate to CodeCommit,