• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In
You are now the owner of this repo.

silvermine / cloudformation-custom-resources / 25378473900

05 May 2026 01:12PM UTC coverage: 0.0%. Remained the same
25378473900

push

github

web-flow
Merge pull request #29 from MrMarCode/MrMarCode/upgrade-node-24

Mr mar code/upgrade node 24

0 of 117 branches covered (0.0%)

Branch coverage included in aggregate %.

0 of 270 new or added lines in 6 files covered. (0.0%)

6 existing lines in 3 files now uncovered.

0 of 356 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/CustomResourceHandler.js
1
'use strict';
2

NEW
3
const BaseResource = require('./BaseResource'),
×
NEW
4
      SimpleDynamoDBGlobalTable = require('./SimpleDynamoDBGlobalTable'),
×
NEW
5
      DynamoDBGlobalTable = require('./DynamoDBGlobalTable'),
×
NEW
6
      SimpleEmailServiceDomainVerification = require('./SimpleEmailServiceDomainVerification'),
×
NEW
7
      SimpleEmailServiceRuleSetActivation = require('./SimpleEmailServiceRuleSetActivation');
×
8

9
// SimpleDynamoDBGlobalTable is selected via the IsSimpleType flag below, so consumers
10
// continue to use the stable `Custom::DynamoDBGlobalTable` resource type.
NEW
11
const resources = {
×
12
   SimpleDynamoDBGlobalTable,
13
   DynamoDBGlobalTable,
14
   SimpleEmailServiceDomainVerification,
15
   SimpleEmailServiceRuleSetActivation,
16
};
17

18
// invoked by CloudFormation stack creates / updates / deletes
NEW
19
exports.handler = async (evt) => {
×
NEW
20
   const type = evt.ResourceType.replace(/^Custom::/, '');
×
21

NEW
22
   console.log('custom resource event: %j', evt);
×
23

NEW
24
   if (!Object.prototype.hasOwnProperty.call(resources, type)) {
×
NEW
25
      const resource = new BaseResource(evt);
×
26

NEW
27
      return resource.sendError(new Error(`Unsupported resource type: ${type}`));
×
28
   }
29

NEW
30
   let Resource = resources[type];
×
31

NEW
32
   console.log(`Type: "${type}"`);
×
NEW
33
   if (type === 'DynamoDBGlobalTable' && evt.ResourceProperties && evt.ResourceProperties.IsSimpleType) {
×
NEW
34
      console.log('Using simple version of DynamoDBGlobalTable');
×
NEW
35
      Resource = resources.SimpleDynamoDBGlobalTable;
×
36
   }
37

NEW
38
   const resource = new Resource(evt),
×
NEW
39
         method = `handle${evt.RequestType}`;
×
40

NEW
41
   try {
×
NEW
42
      return await resource[method]();
×
43
   } catch(err) {
44
      // handle{Create,Update,Delete} catch their own errors and respond, but guard here
45
      // in case any future override re-throws so CloudFormation always gets a response.
NEW
46
      return resource.sendError(err);
×
47
   }
48
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc