Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public makeParams() {
return {
[ResourceConstants.PARAMETERS.DynamoDBModelTableReadIOPS]: new NumberParameter({
Description: 'The number of read IOPS the table should support.',
Default: 5,
}),
[ResourceConstants.PARAMETERS.DynamoDBModelTableWriteIOPS]: new NumberParameter({
Description: 'The number of write IOPS the table should support.',
Default: 5,
}),
[ResourceConstants.PARAMETERS.DynamoDBBillingMode]: new StringParameter({
Description: 'Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes.',
Default: 'PAY_PER_REQUEST',
AllowedValues: ['PAY_PER_REQUEST', 'PROVISIONED'],
}),
[ResourceConstants.PARAMETERS.DynamoDBEnablePointInTimeRecovery]: new StringParameter({
Description: 'Whether to enable Point in Time Recovery on the table',
Default: 'false',
AllowedValues: ['true', 'false'],
}),
[ResourceConstants.PARAMETERS.DynamoDBEnableServerSideEncryption]: new StringParameter({
Description: 'Enable server side encryption powered by KMS.',
Default: 'true',
Default: 'python_streaming_function.lambda_handler'
}),
[ResourceConstants.PARAMETERS.ElasticsearchStreamingLambdaRuntime]: new StringParameter({
Description: `The lambda runtime \
(https://docs.aws.amazon.com/lambda/latest/dg/API_CreateFunction.html#SSS-CreateFunction-request-Runtime)`,
Default: 'python3.6'
}),
[ResourceConstants.PARAMETERS.ElasticsearchStreamingFunctionName]: new StringParameter({
Description: 'The name of the streaming lambda function.',
Default: 'DdbToEsFn'
}),
[ResourceConstants.PARAMETERS.ElasticsearchStreamingIAMRoleName]: new StringParameter({
Description: 'The name of the streaming lambda function IAM role.',
Default: 'SearchableLambdaIAMRole'
}),
[ResourceConstants.PARAMETERS.ElasticsearchDebugStreamingLambda]: new NumberParameter({
Description: 'Enable debug logs for the Dynamo -> ES streaming lambda.',
Default: 1,
AllowedValues: [0, 1]
}),
[ResourceConstants.PARAMETERS.ElasticsearchInstanceCount]: new NumberParameter({
Description: 'The number of instances to launch into the Elasticsearch domain.',
Default: 1
}),
[ResourceConstants.PARAMETERS.ElasticsearchDomainName]: new StringParameter({
Description: 'The name of the Elasticsearch domain.',
Default: 'appsync-elasticsearch-domain',
AllowedPattern: '^[a-z][a-z0-9-]*$',
MinLength: 1,
MaxLength: 28
}),
[ResourceConstants.PARAMETERS.ElasticsearchInstanceType]: new StringParameter({
public makeParams() {
return {
[ResourceConstants.PARAMETERS.AppSyncApiName]: new StringParameter({
Description: 'The name of the AppSync API',
Default: 'AppSyncSimpleTransform',
}),
[ResourceConstants.PARAMETERS.APIKeyExpirationEpoch]: new NumberParameter({
Description:
'The epoch time in seconds when the API Key should expire.' +
' Setting this to 0 will default to 7 days from the deployment date.' +
' Setting this to -1 will not create an API Key.',
Default: 0,
MinValue: -1,
}),
[ResourceConstants.PARAMETERS.CreateAPIKey]: new NumberParameter({
Description:
'The boolean value to control if an API Key will be created or not.' +
' The value of the property is automatically set by the CLI.' +
' If the value is set to 0 no API Key will be created.',
Default: 0,
MinValue: 0,
MaxValue: 1,
}),
AllowedValues: [
't2.small.elasticsearch', 't2.medium.elasticsearch', 'c4.large.elasticsearch',
'c4.xlarge.elasticsearch', 'c4.2xlarge.elasticsearch', 'c4.4xlarge.elasticsearch',
'c4.8xlarge.elasticsearch', 'm3.medium.elasticsearch', 'm3.large.elasticsearch',
'm3.xlarge.elasticsearch', 'm3.2xlarge.elasticsearch', 'm4.large.elasticsearch',
'm4.xlarge.elasticsearch', 'm4.2xlarge.elasticsearch', 'm4.4xlarge.elasticsearch',
'm4.10xlarge.elasticsearch', 'r3.large.elasticsearch', 'r3.xlarge.elasticsearch',
'r3.2xlarge.elasticsearch', 'r3.4xlarge.elasticsearch', 'r3.8xlarge.elasticsearch',
'r4.large.elasticsearch', 'r4.xlarge.elasticsearch', 'r4.2xlarge.elasticsearch',
'r4.4xlarge.elasticsearch', 'r4.8xlarge.elasticsearch', 'r4.16xlarge.elasticsearch',
'i2.xlarge.elasticsearch', 'i2.2xlarge.elasticsearch', 'i3.large.elasticsearch',
'i3.xlarge.elasticsearch', 'i3.2xlarge.elasticsearch', 'i3.4xlarge.elasticsearch',
'i3.8xlarge.elasticsearch', 'i3.16xlarge.elasticsearch'
]
}),
[ResourceConstants.PARAMETERS.ElasticsearchEBSVolumeGB]: new NumberParameter({
Description: 'The size in GB of the EBS volumes that contain our data.',
Default: 10
})
}
}
Default: 'python_streaming_function.lambda_handler',
}),
[ResourceConstants.PARAMETERS.ElasticsearchStreamingLambdaRuntime]: new StringParameter({
Description: `The lambda runtime \
(https://docs.aws.amazon.com/lambda/latest/dg/API_CreateFunction.html#SSS-CreateFunction-request-Runtime)`,
Default: 'python3.6',
}),
[ResourceConstants.PARAMETERS.ElasticsearchStreamingFunctionName]: new StringParameter({
Description: 'The name of the streaming lambda function.',
Default: 'DdbToEsFn',
}),
[ResourceConstants.PARAMETERS.ElasticsearchStreamingIAMRoleName]: new StringParameter({
Description: 'The name of the streaming lambda function IAM role.',
Default: 'SearchableLambdaIAMRole',
}),
[ResourceConstants.PARAMETERS.ElasticsearchDebugStreamingLambda]: new NumberParameter({
Description: 'Enable debug logs for the Dynamo -> ES streaming lambda.',
Default: 1,
AllowedValues: [0, 1],
}),
[ResourceConstants.PARAMETERS.ElasticsearchInstanceCount]: new NumberParameter({
Description: 'The number of instances to launch into the Elasticsearch domain.',
Default: 1,
}),
[ResourceConstants.PARAMETERS.ElasticsearchInstanceType]: new StringParameter({
Description: 'The type of instance to launch into the Elasticsearch domain.',
Default: 't2.small.elasticsearch',
AllowedValues: [
't2.small.elasticsearch',
't2.medium.elasticsearch',
'c4.large.elasticsearch',
'c4.xlarge.elasticsearch',
public makeParams() {
return {
[ResourceConstants.PARAMETERS.DynamoDBModelTableReadIOPS]: new NumberParameter({
Description: 'The number of read IOPS the table should support.',
Default: 5,
}),
[ResourceConstants.PARAMETERS.DynamoDBModelTableWriteIOPS]: new NumberParameter({
Description: 'The number of write IOPS the table should support.',
Default: 5,
}),
[ResourceConstants.PARAMETERS.DynamoDBBillingMode]: new StringParameter({
Description: 'Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes.',
Default: 'PAY_PER_REQUEST',
AllowedValues: ['PAY_PER_REQUEST', 'PROVISIONED'],
}),
[ResourceConstants.PARAMETERS.DynamoDBEnablePointInTimeRecovery]: new StringParameter({
Description: 'Whether to enable Point in Time Recovery on the table',
Default: 'false',
AllowedValues: ['true', 'false'],