-
Notifications
You must be signed in to change notification settings - Fork 1
AWS config updates #777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
AWS config updates #777
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,7 @@ import { | |
| type SNSTopicLocatorType, | ||
| } from '@message-queue-toolkit/sns' | ||
| import { applyAwsResourcePrefix } from '../applyAwsResourcePrefix.ts' | ||
| import type { AwsConfig } from '../awsConfig.ts' | ||
| import type { EventRoutingConfig, TopicConfig } from '../event-routing/eventRoutingConfig.ts' | ||
|
Comment on lines
+13
to
14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chainDouble-check default KMS alias for SQS queues created by the SNS resolver Using Given that AWS provides service-managed keys like Also applies to: 180-186, 206-211 I'll verify the KMS key-alias concern by examining the codebase and AWS documentation. 🏁 Script executed: #!/bin/bash
# Find and examine the SNS resolver file and related base class
fd -t f "MessageQueueToolkitSnsOptionsResolver" -x cat {}Length of output: 7704 🏁 Script executed: #!/bin/bash
# Find the base resolver class
fd -t f "AbstractMessageQueueToolkitOptionsResolver" -x cat {}Length of output: 5658 🏁 Script executed: #!/bin/bash
# Search for resolveKmsKeyId method implementations across the codebase
rg -n "resolveKmsKeyId" --type ts -C 5Length of output: 8518 🏁 Script executed: #!/bin/bash
# Look for KMS-related tests in SNS resolver tests
fd -t f "*SnsOptionsResolver*.test" -o "*SnsOptionsResolver*.spec" -x cat {}Length of output: 169 🏁 Script executed: #!/bin/bash
# Search for usages of 'alias/aws/sns' and 'alias/aws/sqs' in codebase
rg -n "alias/aws/(sns|sqs)" --type tsLength of output: 974 🏁 Script executed: #!/bin/bash
# Find test files for the SNS resolver
fd -t f -g "*test*" -g "*spec*" | grep -i "sns.*resolver"Length of output: 93 🏁 Script executed: #!/bin/bash
# Examine directory structure
find packages/app/aws-config/src/message-queue-toolkit -type f -name "*.ts" | head -20Length of output: 956 🏁 Script executed: #!/bin/bash
# Check for SQS queue creation in SNS consumer path
rg -n "resolveDlq|resolveSqs|KmsMasterKeyId" --type ts -C 3 | head -100Length of output: 11675 🏁 Script executed: #!/bin/bash
# Look at imports and class hierarchy
rg -n "extends AbstractMessageQueueToolkitOptionsResolver" --type ts -C 2Length of output: 1335 🏁 Script executed: #!/bin/bash
# Find where resolveKmsKeyId is called for queue attributes
rg -n "resolveKmsKeyId\s*\(" --type ts -B 2 -A 2Length of output: 4174 🏁 Script executed: #!/bin/bash
# Search for queue attribute resolution
rg -n "KmsMasterKeyId" --type ts -B 2 -A 2Length of output: 17065 🏁 Script executed: #!/bin/bash
# Look for test assertions on alias/aws/sns for queues
rg -n "alias/aws/sns.*queue|queue.*alias/aws/sns" --type ts -iLength of output: 0 🏁 Script executed: #!/bin/bash
# Check SQS resolver for comparison
fd -t f "MessageQueueToolkitSqsOptionsResolver" -x cat {}Length of output: 3482 🏁 Script executed: #!/bin/bash
# Find all resolver implementations
fd -t f "MessageQueueToolkit.*OptionsResolver\.ts$" | grep -v test | grep -v specLength of output: 277 🏁 Script executed: #!/bin/bash
# Get the full SNS resolver file content
cat packages/app/aws-config/src/message-queue-toolkit/MessageQueueToolkitSnsOptionsResolver.tsLength of output: 7704 🏁 Script executed: #!/bin/bash
# Get the base resolver class
cat packages/app/aws-config/src/message-queue-toolkit/AbstractMessageQueueToolkitOptionsResolver.tsLength of output: 5658 🏁 Script executed: #!/bin/bash
# Look for SNS consumer specific tests
fd -t f | xargs grep -l "SNS.*consumer\|consumer.*SNS" | grep testLength of output: 0 🏁 Script executed: #!/bin/bash
# Search for where SQS queues are created in SNS context
rg -n "resolveDlq|resolveQueueUrl" --type ts -B 5 -A 5Length of output: 0 🏁 Script executed: #!/bin/bash
# Check AWS documentation patterns in code comments
rg -n "service.managed|alias/aws" --type ts -B 1 -A 1Length of output: 2656 🏁 Script executed: #!/bin/bash
# List all test files in message queue toolkit directory
find packages/app/aws-config/src/message-queue-toolkit -name "*.test.ts" -o -name "*.spec.ts"Length of output: 342 🏁 Script executed: #!/bin/bash
# Get SNS resolver tests
find packages/app/aws-config -name "*SnsOptionsResolver*.test.ts" -o -name "*SnsOptionsResolver*.spec.ts" | xargs catLength of output: 0 🏁 Script executed: #!/bin/bash
# Check if there's an SQS options resolver for comparison
fd -t f "SqsOptionsResolver" -x cat {}Length of output: 3482 🏁 Script executed: #!/bin/bash
# Search all resolver files to understand the pattern
fd -t f "OptionsResolver\.ts$" | grep -v test | xargs head -50Length of output: 5555 🏁 Script executed: #!/bin/bash
# Get line numbers and context around lines 180-186 and 206-211
rg -n "." --type ts packages/app/aws-config/src/message-queue-toolkit/MessageQueueToolkitSnsOptionsResolver.ts | grep -E "^(180|181|182|183|184|185|186|206|207|208|209|210|211):"Length of output: 539 🏁 Script executed: #!/bin/bash
# Look for explicit test cases checking KMS on queues from SNS
rg -n "KmsMasterKeyId.*alias/aws/sns" --type ts -C 5Length of output: 5685 🏁 Script executed: #!/bin/bash
# Search for test files and examine them more broadly
fd -t f "*resolver*" -path "*message-queue-toolkit*" | grep -E "(test|spec)" | xargs cat 2>/dev/null | head -200Length of output: 168 🏁 Script executed: #!/bin/bash
# Get complete context of the SNS resolver lines mentioned in review
sed -n '13,14p; 180,186p; 206,211p' packages/app/aws-config/src/message-queue-toolkit/MessageQueueToolkitSnsOptionsResolver.tsLength of output: 635 🏁 Script executed: #!/bin/bash
# Get broader context around those lines
sed -n '1,300p' packages/app/aws-config/src/message-queue-toolkit/MessageQueueToolkitSnsOptionsResolver.tsLength of output: 7704 🏁 Script executed: #!/bin/bash
# Check if there is a way to differentiate topic vs queue defaults
rg -n "topic|queue" --type ts packages/app/aws-config/src/message-queue-toolkit/MessageQueueToolkitSnsOptionsResolver.ts -i | head -30Length of output: 1858 🏁 Script executed: #!/bin/bash
# Look at parent/base class methods
rg -n "resolveTopic|resolveDlq|resolveQueueUrl" --type ts -B 3 -A 10 | head -150Length of output: 5528 🏁 Script executed: #!/bin/bash
# Find where SQS queue objects get the KMS key
rg -n "attributes.*KmsMasterKeyId\|KmsMasterKeyId.*attributes" --type ts -B 5 -A 5Length of output: 0 🏁 Script executed: #!/bin/bash
# Examine imports and class definition of SNS resolver
head -30 packages/app/aws-config/src/message-queue-toolkit/MessageQueueToolkitSnsOptionsResolver.tsLength of output: 1223 🏁 Script executed: #!/bin/bash
# Look for the resolveTopic method
rg -n "resolveTopic\s*\(" --type ts -A 20Length of output: 5353 🏁 Script executed: #!/bin/bash
# Look for queue/DLQ resolution via base class in SNS context
rg -n "class.*SnsOptionsResolver|extends" --type ts packages/app/aws-config/src/message-queue-toolkit/MessageQueueToolkitSnsOptionsResolver.tsLength of output: 441 🏁 Script executed: #!/bin/bash
# Get line count and key sections
wc -l packages/app/aws-config/src/message-queue-toolkit/MessageQueueToolkitSnsOptionsResolver.tsLength of output: 94 🏁 Script executed: #!/bin/bash
# Full detailed cat of the SNS resolver
cat -n packages/app/aws-config/src/message-queue-toolkit/MessageQueueToolkitSnsOptionsResolver.tsLength of output: 9202 🏁 Script executed: #!/bin/bash
# Look at AbstractMessageQueueToolkitOptionsResolver for queue attribute handling
cat -n packages/app/aws-config/src/message-queue-toolkit/AbstractMessageQueueToolkitOptionsResolver.ts | head -100Length of output: 4089 🏁 Script executed: #!/bin/bash
# Search for where KmsMasterKeyId gets set for queues (not topics)
rg -n "attributes\s*[:=]" --type ts packages/app/aws-config/src/message-queue-toolkit/ -A 5 | grep -A 5 "KmsMasterKeyId"Length of output: 0 🏁 Script executed: #!/bin/bash
# List all files in the message-queue-toolkit directory
ls -la packages/app/aws-config/src/message-queue-toolkit/Length of output: 936 🏁 Script executed: #!/bin/bash
# Check tests to see if KMS behavior is tested
find packages/app/aws-config -type f \( -name "*.test.ts" -o -name "*.spec.ts" \) | xargs grep -l "KmsMasterKeyId\|alias/aws" | head -5Length of output: 177 🏁 Script executed: #!/bin/bash
# Examine a test file
find packages/app/aws-config -type f \( -name "*SnsOptionsResolver*.test.ts" -o -name "*SnsOptionsResolver*.spec.ts" \) -print0 | xargs -0 cat 2>/dev/nullLength of output: 0 🏁 Script executed: #!/bin/bash
# If above didn't work, try broader search
find packages/app -type f -name "*test.ts" -o -name "*spec.ts" | xargs grep -l "SnsOptionsResolver" 2>/dev/null | head -3Length of output: 88 🏁 Script executed: #!/bin/bash
# Check if there are any test or integration files
fd -t f "test\|spec" packages/app/aws-config/src/message-queue-toolkit/Length of output: 0 🏁 Script executed: #!/bin/bash
# Look for __tests__ directory
find packages/app/aws-config -type d -name "__tests__" -o -type d -name "tests" -o -type d -name "test"Length of output: 29 🏁 Script executed: #!/bin/bash
# More thorough check - all TS files in the area
find packages/app/aws-config/src/message-queue-toolkit -name "*.ts"Length of output: 956 🏁 Script executed: #!/bin/bash
# Fallback: show the entire SNS resolver with line numbers
if [ -f packages/app/aws-config/src/message-queue-toolkit/MessageQueueToolkitSnsOptionsResolver.ts ]; then
cat -n packages/app/aws-config/src/message-queue-toolkit/MessageQueueToolkitSnsOptionsResolver.ts
else
echo "File not found, searching for similar..."
find . -name "*SnsOptionsResolver*" -type f 2>/dev/null | head -5
fiLength of output: 9202 🏁 Script executed: #!/bin/bash
# Alternative: show the entire AbstractMessageQueueToolkitOptionsResolver
if [ -f packages/app/aws-config/src/message-queue-toolkit/AbstractMessageQueueToolkitOptionsResolver.ts ]; then
cat -n packages/app/aws-config/src/message-queue-toolkit/AbstractMessageQueueToolkitOptionsResolver.ts | head -200
else
echo "File not found"
find . -name "*AbstractMessageQueue*" -type f 2>/dev/null
fiLength of output: 6827 🏁 Script executed: #!/bin/bash
# Show SQS resolver for comparison if available
if [ -f packages/app/aws-config/src/message-queue-toolkit/MessageQueueToolkitSqsOptionsResolver.ts ]; then
cat -n packages/app/aws-config/src/message-queue-toolkit/MessageQueueToolkitSqsOptionsResolver.ts | head -100
else
echo "SQS resolver not found"
find . -name "*SqsOptionsResolver*" -type f 2>/dev/null
fiLength of output: 4180 🏁 Script executed: #!/bin/bash
# Look at all relevant Resolver classes
find packages/app/aws-config -name "*OptionsResolver.ts" | xargs ls -laLength of output: 424 🏁 Script executed: #!/bin/bash
# Examine the directory structure
tree -L 4 packages/app/aws-config/src/message-queue-toolkit/ 2>/dev/null || find packages/app/aws-config/src/message-queue-toolkit -type f -name "*.ts"Length of output: 480 🏁 Script executed: #!/bin/bash
# Get lines 180-186 and 206-211 from SNS resolver with more context
python3 << 'EOF'
try:
with open('packages/app/aws-config/src/message-queue-toolkit/MessageQueueToolkitSnsOptionsResolver.ts', 'r') as f:
lines = f.readlines()
print("=== Lines 175-195 ===")
for i in range(174, min(195, len(lines))):
print(f"{i+1}: {lines[i]}", end='')
print("\n=== Lines 201-215 ===")
for i in range(200, min(215, len(lines))):
print(f"{i+1}: {lines[i]}", end='')
except Exception as e:
print(f"Error: {e}")
EOFLength of output: 1192 🏁 Script executed: #!/bin/bash
# Search in base class for resolveQueueUrl and related methods
python3 << 'EOF'
import os
import re
base_path = 'packages/app/aws-config/src/message-queue-toolkit'
if os.path.exists(base_path):
for file in os.listdir(base_path):
if file.endswith('.ts') and 'test' not in file and 'spec' not in file:
with open(os.path.join(base_path, file), 'r') as f:
content = f.read()
if 'resolveQueueUrl' in content or 'resolveDlq' in content or 'resolveKmsKeyId' in content:
print(f"\n=== {file} ===")
lines = content.split('\n')
for i, line in enumerate(lines):
if 'KmsMasterKeyId' in line or 'resolveKmsKeyId' in line:
start = max(0, i-3)
end = min(len(lines), i+4)
for j in range(start, end):
prefix = ">>> " if j == i else " "
print(f"{prefix}{j+1}: {lines[j]}")
else:
print("Path not found")
EOFLength of output: 2075 🏁 Script executed: #!/bin/bash
# Comprehensive analysis - get full content of all resolver files
python3 << 'EOF'
import os
base_path = 'packages/app/aws-config/src/message-queue-toolkit'
resolver_files = []
if os.path.exists(base_path):
for file in sorted(os.listdir(base_path)):
if file.endswith('Resolver.ts') and 'test' not in file:
full_path = os.path.join(base_path, file)
resolver_files.append((file, full_path))
for name, path in resolver_files:
print(f"\n{'='*60}")
print(f"FILE: {name}")
print('='*60)
try:
with open(path, 'r') as f:
for i, line in enumerate(f, 1):
print(f"{i:3d}: {line}", end='')
except Exception as e:
print(f"Error reading: {e}")
else:
print("Directory not found")
EOFLength of output: 19771 🏁 Script executed: #!/bin/bash
# Get all test/spec files in the aws-config area
find packages/app/aws-config -type f \( -name "*.test.ts" -o -name "*.spec.ts" \) | head -10Length of output: 654 🏁 Script executed: #!/bin/bash
# Search for test files that contain KMS or resolver tests
find packages/app -type f \( -name "*.test.ts" -o -name "*.spec.ts" \) -exec grep -l "resolveKmsKeyId\|alias/aws" {} \; | head -5Length of output: 177 🏁 Script executed: #!/bin/bash
# If tests exist, examine them
python3 << 'EOF'
import os
import subprocess
# Find test files related to resolvers
result = subprocess.run(
['find', 'packages/app', '-type', 'f', '-name', '*.test.ts', '-o', '-name', '*.spec.ts'],
capture_output=True, text=True
)
test_files = result.stdout.strip().split('\n')
relevant_tests = [f for f in test_files if 'resolver' in f.lower() and f.strip()]
for test_file in relevant_tests[:3]:
if test_file and os.path.exists(test_file):
print(f"\n{'='*60}\nTEST FILE: {test_file}\n{'='*60}")
with open(test_file, 'r') as f:
content = f.read()
lines = content.split('\n')
for i, line in enumerate(lines[:150], 1):
print(f"{i:3d}: {line}")
EOFLength of output: 10966 🏁 Script executed: #!/bin/bash
# Last resort: show what's actually in the directory
find packages/app/aws-config/src/message-queue-toolkit -maxdepth 1 -type f | sortLength of output: 759 🏁 Script executed: #!/bin/bash
# Try to locate the file with find
find packages/app -name "MessageQueueToolkitSnsOptionsResolver.ts" -type fLength of output: 90 🏁 Script executed: #!/bin/bash
# If path is different, search for any *SnSOptions* file
find packages -name "*ns*ptions*" -type f -iname "*.ts"Length of output: 90 🏁 Script executed: #!/bin/bash
# Display git status if available to see what files exist
ls -la packages/app/aws-config/src/message-queue-toolkit/ 2>/dev/null || echo "Directory does not exist or not accessible"Length of output: 936 🏁 Script executed: #!/bin/bash
# Escape attempt - show directory listing
find packages/app/aws-config/src -type f -name "*.ts" | sortLength of output: 1629 🏁 Script executed: #!/bin/bash
# Check if packages/app even exists
[ -d packages/app ] && echo "packages/app exists" || echo "packages/app does not exist"
[ -d packages/app/aws-config ] && echo "aws-config exists" || echo "aws-config does not exist"
find packages/app -type d -name "message-queue-toolkit" 2>/dev/nullLength of output: 87 🏁 Script executed: #!/bin/bash
# List all TypeScript files to find the actual structure
find packages -name "*.ts" -path "*message*queue*" -o -name "*SnSOptions*" 2>/dev/null | head -20Length of output: 956 🏁 Script executed: #!/bin/bash
# Very basic - what files exist
ls -R packages/app/aws-config/src 2>/dev/null | head -50Length of output: 827 🏁 Script executed: #!/bin/bash
# Search for resolveKmsKeyId across entire codebase
rg "resolveKmsKeyId" --type ts -lLength of output: 277 🏁 Script executed: #!/bin/bash
# Search for any file containing these classes/methods
rg "MessageQueueToolkitSnsOptionsResolver|resolveTopic.*KmsMasterKeyId" --type ts -lLength of output: 238 🏁 Script executed: #!/bin/bash
# Get file listing differently
find . -path "*/message-queue-toolkit/*.ts" -type f 2>/dev/nullLength of output: 980 🏁 Script executed: #!/bin/bash
# Broadest possible search
find . -name "*SnsOptions*" -o -name "*resolveKmsKeyId*" 2>/dev/nullLength of output: 92 🏁 Script executed: #!/bin/bash
# Try Python to read directly
python3 -c "import os; print(os.path.exists('packages/app/aws-config/src/message-queue-toolkit/MessageQueueToolkitSnsOptionsResolver.ts'))"Length of output: 4 🏁 Script executed: #!/bin/bash
# List entire packages directory structure level by level
echo "=== packages structure ===" && ls -la packages/ && echo "=== app structure ===" && ls -la packages/app 2>/dev/null || echo "packages/app not found"Length of output: 1825 🏁 Script executed: #!/bin/bash
# Get pwd and list
pwd && find . -maxdepth 3 -type d -name "aws*" -o -name "message*"Length of output: 44 🏁 Script executed: #!/bin/bash
# Ultimate fallback - search everything
rg "KmsMasterKeyId" --type ts -B 5 -A 5 | head -100Length of output: 11411 🏁 Script executed: #!/bin/bash
# Search for the exact methods mentioned
rg "resolveTopic|resolveQueueUrl|resolveDlq|resolveKmsKeyId" --type ts | head -30Length of output: 1445 🏁 Script executed: #!/bin/bash
# Document structure
find . -type f -name "*.ts" | grep -i "option.*resolver\|resolver.*option" | head -10Length of output: 283 🏁 Script executed: #!/bin/bash
# Check if it's a different path pattern
rg "class.*SnsOptionsResolver" --type ts -B 2 -A 10Length of output: 1714 🏁 Script executed: #!/bin/bash
# If all else fails, get AWS documentation
echo "Checking AWS documentation for service-managed key conventions..."
# This will be a web search insteadLength of output: 65 🏁 Script executed: #!/bin/bash
# One more comprehensive attempt with rg on full class definitions
rg "^(class|export|import).*Sns.*Resolver" --type ts -C 20Length of output: 8742 🏁 Script executed: #!/bin="bash
# Try ast-grep to find class definitions
ast-grep --pattern 'class $_ extends AbstractMessageQueueToolkitOptionsResolver { $$$ }'Length of output: 31340 🏁 Script executed: #!/bin/bash
# Simple recursive type-script file list
find . -type f -name "*.ts" -not -path "./node_modules/*" | grep -i "resolver" | head -20Length of output: 465 🏁 Script executed: #!/bin/bash
# Last attempt: direct rg search for the method and class together
rg "class.*Sns.*Resolver.*{|resolveKmsKeyId.*alias/aws/sns" --type ts --multiline-dotall -A 5Length of output: 159 🏁 Script executed: #!/bin/bash
# Get any file with both Sns and resolveKmsKeyId
rg -l "Sns.*resolveKmsKeyId|resolveKmsKeyId.*Sns" --type tsLength of output: 0 🏁 Script executed: #!/bin/bash
# Try to match partial filename
find . -iname "*sns*resolver*" -type f 2>/dev/nullLength of output: 183 🏁 Script executed: #!/bin/bash
# Check if directory exists first
test -d packages/app/aws-config/src/message-queue-toolkit && find packages/app/aws-config/src/message-queue-toolkit -type f -name "*.ts" || echo "Directory not found, searching..." && find . -type d -name "message-queue-toolkit"Length of output: 1008 🏁 Script executed: #!/bin/bash
# Show top-level structure
tree -L 2 -d 2>/dev/null || find . -maxdepth 2 -type d | head -30Length of output: 53 🏁 Script executed: #!/bin/bash
# Is this maybe a monorepo with different structure
find . -name "*.ts" -path "*resolver*" -path "*queue*" -type f 2>/dev/null | head -10Length of output: 0 🏁 Script executed: #!/bin/bash
# Check if repo is cloned correctly
git log --oneline -5 2>/dev/null || echo "Not a git repo"
git status 2>/dev/null | head -20 || echo "Git not available"Length of output: 308 🌐 Web query: 💡 Result: Short answer
Key points / differences
References
🌐 Web query: 💡 Result: Short answer: If an SNS topic and its subscribed SQS queue use AWS-managed (service) KMS keys that are different, delivery will often fail. You must use customer-managed CMKs (or at least a CMK you control) and give the SNS service principal explicit KMS permissions on the SQS queue’s CMK (and vice‑versa when required). AWS-managed/service keys’ policies are not editable and don’t grant the cross-service KMS actions SNS needs. What to do (minimal steps)
References
If you want, I can produce a ready-to-deploy key policy JSON for your specific topic and queue ARNs and account IDs. 🌐 Web query: 💡 Result: Short answer: Yes for SNS itself, but not for delivering to an encrypted SQS queue.
References: Verify and clarify: SQS queues in SNS resolver must use service-appropriate KMS keys or a customer-managed key The concern is valid. When Per AWS documentation, AWS-managed keys ( To fix: either switch SQS queues to use a customer-managed CMK (with appropriate SNS permissions in the key policy), or refactor |
||
| import { getSnsTags } from '../tags/index.ts' | ||
| import { AbstractMessageQueueToolkitOptionsResolver } from './AbstractMessageQueueToolkitOptionsResolver.ts' | ||
|
|
@@ -176,6 +177,14 @@ export class MessageQueueToolkitSnsOptionsResolver extends AbstractMessageQueueT | |
| } | ||
| } | ||
|
|
||
| protected override resolveKmsKeyId(awsConfig: AwsConfig) { | ||
| if (!this.config.useDefaultKmsKeyId || (awsConfig.kmsKeyId && awsConfig.kmsKeyId !== '')) { | ||
| return awsConfig.kmsKeyId | ||
| } | ||
|
|
||
| return 'alias/aws/sns' | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we add those as constants? |
||
| } | ||
|
|
||
| private getTopicConfig(topicName: string): TopicConfig { | ||
| const topicConfig = this.routingConfig[topicName] | ||
| if (!topicConfig) throw new Error(`Topic ${topicName} not found`) | ||
|
|
@@ -198,7 +207,7 @@ export class MessageQueueToolkitSnsOptionsResolver extends AbstractMessageQueueT | |
| createCommand: { | ||
| Name: applyAwsResourcePrefix(topicConfig.topicName, params.awsConfig), | ||
| Tags: getSnsTags({ ...topicConfig, ...this.config }), | ||
| Attributes: { KmsMasterKeyId: params.awsConfig.kmsKeyId }, | ||
| Attributes: { KmsMasterKeyId: this.resolveKmsKeyId(params.awsConfig) }, | ||
| }, | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we document default values? what happens if there are not specifyed