Issue 130 | Cloudformation template parameters for Batch job memory and CPU #134
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
130
Description of changes:
Added a parameter for Batch job memory and CPU, so that when job fails with memory error , memory/CPU could be added. Also added JobDefinition ARN to custom resource definition to ensure that , when the job definition is updated , the startup Lambda is called to re-generate system-config.json.
During the test - update is called followed by delete ( which is ignored in Lambda code).
{
'RequestType': 'Update',
'ServiceToken': 'arn:aws:lambda:ap-south-1:ACCOUNT_ID:function:config-test-StartUpLambda-fM2kTJ2U9gEr',
'ResponseURL': 'RESPONSE_URL',
'StackId': 'STACK_ID',
'RequestId': 'REQUEST_ID',
'LogicalResourceId': 'StartUp',
'PhysicalResourceId': 'PHYSICAL_RESOURCE_ID',
'ResourceType': 'Custom::StartUpLambda',
'ResourceProperties': {
'ServiceToken': 'arn:aws:lambda:ap-south-1:ACCOUNT_ID:function:config-test-StartUpLambda-fM2kTJ2U9gEr',
'RedshiftPerformanceTestingJobDefinition': 'arn:aws:batch:ap-south-1:ACCOUNT_ID:job-definition/RedshiftPerformanceTest-0130518c4493769:3',
'RedshiftSubnetList': [
'SUBNET_1'
]
},
'OldResourceProperties': {
'ServiceToken': 'arn:aws:lambda:ap-south-1:ACCOUNT_ID:function:config-test-StartUpLambda-fM2kTJ2U9gEr',
'RedshiftPerformanceTestingJobDefinition': 'JOB_DEF_ARN',
'RedshiftSubnetList': [
'SUBNET_1'
]
}
}
{
'RequestType': 'Delete',
'ServiceToken': 'arn:aws:lambda:ap-south-1:ACCOUNT_ID:function:config-test-StartUpLambda-fM2kTJ2U9gEr',
'ResponseURL': 'RESPONSE_URL',
'StackId': 'STACK',
'RequestId': 'REQUEST_ID',
'LogicalResourceId': 'StartUp',
'PhysicalResourceId': 'PHYSICAL_RESOURCE_ID',
'ResourceType': 'Custom::StartUpLambda',
'ResourceProperties': {
'ServiceToken': 'arn:aws:lambda:ap-south-1:ACCOUNT_ID:function:config-test-StartUpLambda-fM2kTJ2U9gEr',
'RedshiftPerformanceTestingJobDefinition': 'JOB_DEF_ARN',
'RedshiftSubnetList': [
'SUBNET_1'
]
}
}
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.