UNPKG

serverless-tag-resources

Version:

Datamart: Tag all AWS resources with dual legacy + datamart:* tag support

17 lines (13 loc) 467 B
"use strict"; const { SSMClient, AddTagsToResourceCommand } = require("@aws-sdk/client-ssm"); const { getClient } = require("../aws-clients"); async function tagSSMParameter(config, resource, tags) { const client = getClient(SSMClient, config); const command = new AddTagsToResourceCommand({ ResourceId: resource.PhysicalResourceId, ResourceType: "Parameter", Tags: tags, }); await client.send(command); } module.exports = { tagSSMParameter };