Skip to content

Commit 1d87b4d

Browse files
committed
Removed Bedrock Data Automation (BDA) Project ARN CloudFormation parameter
1 parent b4e3458 commit 1d87b4d

15 files changed

Lines changed: 10 additions & 459 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ SPDX-License-Identifier: MIT-0
55

66
## [Unreleased]
77

8+
### Changed
9+
10+
- **Removed `Bedrock Data Automation (BDA) Project ARN` CloudFormation parameter** — The deploy-time `Pattern1BDAProjectArn` parameter has been removed as it was redundant with the per-config-version BDA project management already available in the Web UI, CLI, and GraphQL API. BDA projects are now managed entirely post-deployment: enable `use_bda: true` in your configuration, then use "Sync to BDA" to create or link a BDA project, or "Sync from BDA" to import from any existing BDA project. This simplifies the deployment experience (one fewer parameter) and better aligns the CloudFormation interface with the system's actual architecture. Existing deployed stacks are unaffected — runtime BDA project ARN resolution reads from DynamoDB per-version tracking, not from the CloudFormation parameter. Also removed the unused `nested/bda-lending-project/` directory (dead code not referenced by any template) and the legacy `BDA_PROJECT_ARN` environment variable fallback from the sync resolver.
11+
812
### Fixed
913

1014
- **CLI: Remove deprecated `--pattern` references** — Updated `idp-cli.md` and CLI code to reflect the unified pattern architecture. Removed `--pattern` from all deploy and config command examples/options.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.5.2-wip1
1+
0.5.2-wip2

docs/configuration.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,6 @@ Key parameters that can be configured during CloudFormation deployment:
281281

282282
### Pattern-Specific Parameters
283283
- **Configuration Preset**: `ConfigurationPreset` — Select from available presets (lending-package-sample, bank-statement-sample, etc.)
284-
- **BDA Project ARN**: Optional existing Bedrock Data Automation project ARN (for BDA mode)
285284
- **Custom Model ARNs**: Optional custom fine-tuned classification/extraction model ARNs
286285

287286
> **Note**: The processing mode (BDA vs Pipeline) is controlled by the `use_bda` flag in the configuration, not by deployment parameters. See the [architecture docs](./architecture.md) for details.

nested/appsync/extracted_resources.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,10 +1466,6 @@
14661466
LOG_LEVEL: !Ref LogLevel
14671467
CONFIGURATION_TABLE_NAME: !Ref ConfigurationTable
14681468
STACK_NAME: !Ref AWS::StackName
1469-
BDA_PROJECT_ARN: !If
1470-
- HasPattern1BDAProjectArn
1471-
- !Ref Pattern1BDAProjectArn
1472-
- !GetAtt BDASAMPLEPROJECT.Outputs.ProjectArn
14731469
LoggingConfig:
14741470
LogGroup: !Ref SyncBdaIdpResolverFunctionLogGroup
14751471
Policies:
@@ -1507,10 +1503,7 @@
15071503
- bedrock:ListBlueprints
15081504
- bedrock:DeleteBlueprint
15091505
Resource:
1510-
- !If
1511-
- HasPattern1BDAProjectArn
1512-
- !Ref Pattern1BDAProjectArn
1513-
- !GetAtt BDASAMPLEPROJECT.Outputs.ProjectArn
1506+
- !Sub "arn:${AWS::Partition}:bedrock:${AWS::Region}:${AWS::AccountId}:data-automation-project/*"
15141507
- !Sub "arn:${AWS::Partition}:bedrock:${AWS::Region}:${AWS::AccountId}:blueprint/*"
15151508
- !Sub "arn:${AWS::Partition}:bedrock:${AWS::Region}:aws:blueprint/*"
15161509

nested/appsync/src/lambda/sync_bda_idp_resolver/index.py

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ def handler(event: Dict[str, Any], context) -> Dict[str, Any]:
2424
BDA project ARN resolution order:
2525
1. Explicit bdaProjectArn from UI arguments (user-provided)
2626
2. Version tracking table (previously linked project)
27-
3. BDA_PROJECT_ARN env var (legacy/migration fallback)
28-
4. Auto-create new project (for idp_to_bda direction)
27+
3. Auto-create new project (for idp_to_bda direction)
2928
3029
Supports four sync directions:
3130
- "bda_to_idp": Sync from BDA blueprints to IDP classes (read BDA, update IDP)
@@ -51,9 +50,6 @@ def handler(event: Dict[str, Any], context) -> Dict[str, Any]:
5150
config_table = os.environ.get('CONFIGURATION_TABLE_NAME')
5251
manager = ConfigurationManager(table_name=config_table) if config_table else None
5352

54-
# Legacy fallback: env var from CloudFormation deployment
55-
default_bda_project_arn = os.environ.get('BDA_PROJECT_ARN')
56-
5753
# Resolve BDA project ARN using priority chain
5854
bda_project_arn = None
5955
arn_source = None
@@ -78,26 +74,13 @@ def handler(event: Dict[str, Any], context) -> Dict[str, Any]:
7874
arn_source = "version-tracking"
7975
logger.info(f"Using tracked BDA project ARN for version '{versionName}': {bda_project_arn}")
8076

81-
# Priority 3: Legacy env var fallback (skip if CREATE_NEW was requested)
82-
if not bda_project_arn and not force_create_new and default_bda_project_arn:
83-
bda_project_arn = default_bda_project_arn
84-
arn_source = "env-var-legacy"
85-
logger.info(f"Using legacy BDA_PROJECT_ARN env var: {bda_project_arn}")
86-
# Migrate: save this legacy ARN to version tracking for future use
87-
if manager and save_arn:
88-
try:
89-
manager.set_bda_project_arn(versionName, bda_project_arn, "synced")
90-
logger.info(f"Migrated legacy BDA ARN to version tracking for '{versionName}'")
91-
except Exception as e:
92-
logger.warning(f"Failed to migrate legacy BDA ARN to version tracking: {e}")
93-
94-
# Priority 4: Auto-create for idp_to_bda or bidirectional (or when CREATE_NEW forced)
77+
# Priority 3: Auto-create for idp_to_bda or bidirectional (or when CREATE_NEW forced)
9578
if not bda_project_arn and (force_create_new or sync_direction in ("idp_to_bda", "bidirectional")):
9679
logger.info(f"No BDA project found, auto-creating for version '{versionName}'")
9780
if manager:
9881
manager.set_bda_sync_status(versionName, "creating")
9982
try:
100-
bda_service = BdaBlueprintService(dataAutomationProjectArn=default_bda_project_arn)
83+
bda_service = BdaBlueprintService()
10184
bda_project_arn = bda_service.get_or_create_project_for_version(versionName)
10285
arn_source = "auto-created"
10386
logger.info(f"Auto-created BDA project for version '{versionName}': {bda_project_arn}")

nested/appsync/template.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,6 @@ Parameters:
173173
Type: String
174174
AllowedValues: ["true", "false"]
175175

176-
Pattern1BDAProjectArn:
177-
Type: String
178-
179-
HasPattern1BDAProjectArn:
180-
Type: String
181-
AllowedValues: ["true", "false"]
182-
183176
# Lambda Layers from main template
184177
IDPCommonBaseLayerArn:
185178
Type: String
@@ -194,7 +187,6 @@ Conditions:
194187
HasGuardrail: !Equals [!Ref HasGuardrailConfig, "true"]
195188
ShouldCreateEvaluationBaselineBucket: !Equals [!Ref ShouldCreateEvaluationBaselineBucket, "true"]
196189
ShouldCreateReportingBucket: !Equals [!Ref ShouldCreateReportingBucket, "true"]
197-
HasBDAProjectArn: !Equals [!Ref HasPattern1BDAProjectArn, "true"]
198190

199191
Resources:
200192

@@ -2679,10 +2671,6 @@ Resources:
26792671
LOG_LEVEL: !Ref LogLevel
26802672
CONFIGURATION_TABLE_NAME: !Ref ConfigurationTableName
26812673
STACK_NAME: !Ref StackName
2682-
BDA_PROJECT_ARN: !If
2683-
- HasBDAProjectArn
2684-
- !Ref Pattern1BDAProjectArn
2685-
- !Ref Pattern1BDAProjectArn
26862674
LoggingConfig:
26872675
LogGroup: !Ref SyncBdaIdpResolverFunctionLogGroup
26882676
Policies:

nested/bda-lending-project/src/bda_project_lambda/index.py

Lines changed: 0 additions & 185 deletions
This file was deleted.

nested/bda-lending-project/src/bda_project_lambda/requirements.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)