Skip to content

Conversation

@njmei
Copy link
Collaborator

@njmei njmei commented Nov 20, 2025

Per AWS documentation:
https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-overview-of-managing-access.html#sqs-resource-and-operations

The ARN format for SQS resources is:
arn:aws:sqs:region:account_id:queue_name

The existing sqs_policy_statement function (and tests) wrongly assumed that a resource_type needed to be provided to create the following format:
arn:partition:service:region:account-id:resource-type:resource-id

This commit fixes the function (and tests) to remove the unnecessary resource_type that was being added to the ARN.

@njmei njmei force-pushed the add-sqs-policy-statement branch from ff2a1aa to 09c8c82 Compare November 20, 2025 03:51
@njmei njmei changed the title Fix bug (and tests) in sqs_policy_statement fucntion Fix bug (and tests) in sqs_policy_statement function Nov 20, 2025
@codecov
Copy link

codecov bot commented Nov 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.51%. Comparing base (8dd3c48) to head (c274f5c).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #48   +/-   ##
=======================================
  Coverage   52.51%   52.51%           
=======================================
  Files          58       58           
  Lines        2866     2866           
  Branches      246      246           
=======================================
  Hits         1505     1505           
  Misses       1334     1334           
  Partials       27       27           
Files with missing lines Coverage Δ
...c/aibs_informatics_cdk_lib/common/aws/iam_utils.py 82.85% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Per AWS documentation:
https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-overview-of-managing-access.html#sqs-resource-and-operations

The ARN format for SQS resources is:
`arn:aws:sqs:region:account_id:queue_name`

The existing `sqs_policy_statement` function (and tests) *wrongly*
assumed that a `resource_type` needed to be provided to create the
following format:
`arn:partition:service:region:account-id:resource-type:resource-id`

This commit fixes the function (and tests) to remove the unnecessary
`resource_type` that was being added to the ARN.
@njmei njmei force-pushed the add-sqs-policy-statement branch from 09c8c82 to c274f5c Compare November 20, 2025 03:53
@njmei njmei merged commit 881c115 into main Nov 20, 2025
6 checks passed
@njmei njmei deleted the add-sqs-policy-statement branch November 20, 2025 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants