How to use !Ref or Fn:GetAtt in lift models #345
Closed
cmcnicholas
started this conversation in
Constructs
Replies: 2 comments
-
OK further to the above I have managed to get the following to work: const fn = Fn.getAtt("MyTopic", "TopicArn");
const topic = Topic.fromTopicArn(this, "SomeId", fn.toString());
topic.addSubscription(new SqsSubscription(this.queue, { filterPolicy, rawMessageDelivery: true })); if there a friendly way to serialise/deserialise constructs:
one-of-them-queues:
type: queue
worker:
handler: worker.handler
subscriptions:
- topicRef:
Fn::GetAtt:
- MyTopic
- TopicArn for example, but what type am I expecting |
Beta Was this translation helpful? Give feedback.
0 replies
-
Managed to resolve this, see solution in #344 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I have opened a PR with support for queue subscriptions here: #344
But does anyone know how to use
!Ref
declarations with the lift models and/or CDK? I can't find any examples in this repo but essentially I would like to alter the code so it doesn't require an ARN but can depend on another serverless resource, e.g.is there examples out there of how this is achieved either within lift or separate plugins?
Beta Was this translation helpful? Give feedback.
All reactions