Skip to content

Commit 02be78c

Browse files
committed
fix(ci-lease): add s3vectors:* to CIDeployRole + capture CFN events on failure
Council-chatbot CFN deploy failed silently because: 1. CIDeployRole missing s3vectors:* permission. Council-chatbot uses AWS::S3Vectors::VectorBucket + AWS::S3Vectors::Index (newer service, separate IAM namespace from s3:*). Without this permission, those resources fail to create, the stack rolls back, and CFN deploy returns a generic 'Failed to create/update the stack'. 2. The Capture CFN events step was skipped because the deploy step set stack_name to GITHUB_OUTPUT AFTER the deploy command — but the command errored before reaching the echo, so the output stayed empty and the gated Capture step never ran. Moved the echo to BEFORE the deploy command so events get captured even on failure. Add s3vectors:* to ScenarioResourceManagement. Future scenarios that use other newer/specialised services will need similar additions.
1 parent 147c360 commit 02be78c

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/scenario-ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ jobs:
121121
run: |
122122
set -euo pipefail
123123
STACK_NAME="ndx-try-${SCENARIO}"
124+
# Emit the stack name to GITHUB_OUTPUT FIRST so the Capture
125+
# CFN events step (gated on stack_name) runs even if deploy
126+
# fails — without the events we can't debug the failure.
127+
echo "stack_name=$STACK_NAME" >> "$GITHUB_OUTPUT"
124128
# CFN requires templates >51KB to be staged in S3. Several
125129
# scenarios (council-chatbot, simply-readable, ai-contact-centre)
126130
# exceed this. Create a per-account staging bucket on demand —
@@ -143,7 +147,6 @@ jobs:
143147
--capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM CAPABILITY_AUTO_EXPAND \
144148
--no-fail-on-empty-changeset \
145149
--tags Project=ndx-try Scenario="$SCENARIO" RunId="${{ github.run_id }}"
146-
echo "stack_name=$STACK_NAME" >> "$GITHUB_OUTPUT"
147150
148151
- name: Run scenario smoke spec
149152
env:

cloudformation/isb-hub-orgmgmt/ci-deploy-role-stackset/template.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ Resources:
188188
- Effect: Allow
189189
Action:
190190
- 's3:*'
191+
- 's3vectors:*'
191192
- 'lambda:*'
192193
- 'apigateway:*'
193194
- 'dynamodb:*'

0 commit comments

Comments
 (0)