SSM parameter not available in account xxxx #26266
-
In a stack I create two constructs:
In MyFirstConstruct a string parameter is created:
which is then looked up in MySecondConstruct :
From what I understand the problem is that its trying to resolve the How do I create a new I did try with addDependency but it has no effect. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
@github-actions proposed-answer
Expose the Since these are within the same stack, you have no need (and don't want) to import anything, and can instead directly reference the construct this.stringParameter = new ssm.StringParameter(this, 'my-first-param-construct', {
stringValue: 'hello,
parameterName: 'my-first-param',
description: 'test',
});
---
export class MyStack extends Stack {
const first = new MyFirstConstruct(this, 'first-construct');
const second = new MySecond(this, 'second-construct', {
stringParameter: first.stringParameter
});
} |
Beta Was this translation helpful? Give feedback.
-
Closing the discussion for staleness. Please open a new discussion if you have further concerns. |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
@github-actions proposed-answer
Expose the
StringParameter
as a property of your construct. Pass this property into your second construct through the construct propsSince these are within the same stack, you have no need (and don't want) to import anything, and can instead directly reference the construct