Accessing the ARN/ID of an AWS resource through a plugin

Hi everyone,

I’m trying to write a plugin that operates on AWS resources defined in resources.Resources after they are created. In order to do that, I need the ID or ARN of the resource to operate on it with AWS’s API.

If I pass !Ref MyResource to the plugin via the custom section, I get a rather unhelpful object that looks like this: {Ref: "MyResource"}. If I access the resource through serverless.service.resources.Resources[], I get an object containing all the configuration information I put into the CloudFormation template, but no additional information like the ARN or ID.

Can I use CloudFormation outputs for this? If so, how do I get those values in the plugin?