Skip to content

Commit

Permalink
[Improvement] * - Revert Custom Resource workaround introduced on Nov…
Browse files Browse the repository at this point in the history
… 2019 (commit 0194e26)
  • Loading branch information
michaelwittig committed Mar 5, 2020
1 parent 7368557 commit af6f3a7
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion jenkins/jenkins2-ha-agents.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2198,7 +2198,7 @@ Resources:
Code:
ZipFile: |
'use strict';
const response = require('./cfn-response');
const response = require('cfn-response');
exports.handler = (event, context, cb) => {
const throughput = parseInt(event.ResourceProperties.ThroughputInMibps, 10);
const threshold = Math.round(throughput * 1048576 * 600 * 0.9);
Expand Down
2 changes: 1 addition & 1 deletion jenkins/jenkins2-ha.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ Resources:
Code:
ZipFile: |
'use strict';
const response = require('./cfn-response');
const response = require('cfn-response');
exports.handler = (event, context, cb) => {
const throughput = parseInt(event.ResourceProperties.ThroughputInMibps, 10);
const threshold = Math.round(throughput * 1048576 * 600 * 0.9);
Expand Down
16 changes: 8 additions & 8 deletions security/account-password-policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,29 +142,29 @@ Resources:
ZipFile: |
'use strict';
const AWS = require('aws-sdk');
const response = require('./cfn-response');
const response = require('cfn-response');
const iam = new AWS.IAM({apiVersion: '2010-05-08'});
exports.handler = (event, context, cb) => {
console.log(`Invoke: ${JSON.stringify(event)}`);
const done = (err) => {
function done(err) {
if (err) {
console.log(`Error: ${JSON.stringify(err)}`);
response.send(event, context, response.FAILED, {});
} else {
response.send(event, context, response.SUCCESS, {});
}
};
}
if (event.RequestType === 'Delete') {
iam.deleteAccountPasswordPolicy({}, done);
} else if (event.RequestType === 'Create' || event.RequestType === 'Update') {
let params = {
AllowUsersToChangePassword: event.ResourceProperties.AllowUsersToChangePassword === 'true',
HardExpiry: event.ResourceProperties.HardExpiry === 'true',
const params = {
MinimumPasswordLength: parseInt(event.ResourceProperties.MinimumPasswordLength, 10),
RequireLowercaseCharacters: event.ResourceProperties.RequireLowercaseCharacters === 'true',
RequireNumbers: event.ResourceProperties.RequireNumbers === 'true',
RequireSymbols: event.ResourceProperties.RequireSymbols === 'true',
RequireNumbers: event.ResourceProperties.RequireNumbers === 'true',
RequireUppercaseCharacters: event.ResourceProperties.RequireUppercaseCharacters === 'true',
RequireLowercaseCharacters: event.ResourceProperties.RequireLowercaseCharacters === 'true',
AllowUsersToChangePassword: event.ResourceProperties.AllowUsersToChangePassword === 'true',
HardExpiry: event.ResourceProperties.HardExpiry === 'true'
};
if (parseInt(event.ResourceProperties.MaxPasswordAge, 10) > 0) {
params.MaxPasswordAge = parseInt(event.ResourceProperties.MaxPasswordAge, 10);
Expand Down
2 changes: 1 addition & 1 deletion state/elasticache-memcached.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ Resources:
Code:
ZipFile: |
'use strict';
const response = require('./cfn-response');
const response = require('cfn-response');
exports.handler = (event, context, cb) => {
const nodes = parseInt(event.ResourceProperties.NumCacheNodes, 10);
const azs = event.ResourceProperties.AvailabilityZones.split(',');
Expand Down
2 changes: 1 addition & 1 deletion vpc/vpc-vpn-bastion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ Resources:
Code:
ZipFile: |
'use strict';
const response = require('./cfn-response');
const response = require('cfn-response');
exports.handler = (event, context, cb) => {
const throughput = parseInt(event.ResourceProperties.ThroughputInMibps, 10);
const threshold = Math.round(throughput * 1048576 * 600 * 0.9);
Expand Down
2 changes: 1 addition & 1 deletion wordpress/wordpress-ha-aurora.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,7 @@ Resources:
Code:
ZipFile: |
'use strict';
const response = require('./cfn-response');
const response = require('cfn-response');
exports.handler = (event, context, cb) => {
const throughput = parseInt(event.ResourceProperties.ThroughputInMibps, 10);
const threshold = Math.round(throughput * 1048576 * 600 * 0.9);
Expand Down
2 changes: 1 addition & 1 deletion wordpress/wordpress-ha.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,7 @@ Resources:
Code:
ZipFile: |
'use strict';
const response = require('./cfn-response');
const response = require('cfn-response');
exports.handler = (event, context, cb) => {
const throughput = parseInt(event.ResourceProperties.ThroughputInMibps, 10);
const threshold = Math.round(throughput * 1048576 * 600 * 0.9);
Expand Down

0 comments on commit af6f3a7

Please sign in to comment.