diff --git a/lib/infra/infra-stack.ts b/lib/infra/infra-stack.ts index 5cb6489e30f..c06b7da2e1c 100644 --- a/lib/infra/infra-stack.ts +++ b/lib/infra/infra-stack.ts @@ -506,7 +506,7 @@ export class InfraStack extends Stack { // final run command based on whether the distribution type is min or bundle if (props.minDistribution) { // using (stackProps.minDistribution) condition is not working when false value is being sent - cfnInitConfig.push(InitCommand.shellCommand('set -ex;cd opensearch; sudo -u ec2-user nohup ./bin/opensearch >> install.log 2>&1 &', + cfnInitConfig.push(InitCommand.shellCommand('set -ex;cd opensearch; sudo -u ec2-user cp config/opensearch.yml config/elasticsearch.yml; sudo -u ec2-user nohup ./bin/opensearch >> install.log 2>&1 &', { cwd: '/home/ec2-user', ignoreErrors: false,