File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -56578,9 +56578,6 @@ const main = async () => {
5657856578 return;
5657956579 }
5658056580
56581- // Get CWLogsClient
56582- let CWLogClient = new CloudWatchLogsClient();
56583-
5658456581 // Only create logFilterStream if tailLogs is enabled, and we wait for the task to stop in the pipeline
5658556582 if (tailLogs) {
5658656583 core.debug(`Logging enabled. Getting logConfiguration from TaskDefinition.`)
@@ -56615,6 +56612,7 @@ const main = async () => {
5661556612
5661656613 // Start Live Tail
5661756614 try {
56615+ const CWLogClient = new CloudWatchLogsClient();
5661856616 const response = await CWLogClient.send(new StartLiveTailCommand({
5661956617 logGroupIdentifiers: [logGroupIdentifier],
5662056618 logStreamNames: [logStreamName]
@@ -56647,7 +56645,6 @@ const main = async () => {
5664756645 }
5664856646
5664956647 // Close LogStream and store output
56650- CWLogClient.destroy();
5665156648 core.setOutput('log-output', logOutput);
5665256649
5665356650 // Describe Task to get Exit Code and Exceptions
Original file line number Diff line number Diff line change @@ -130,9 +130,6 @@ const main = async () => {
130130 return ;
131131 }
132132
133- // Get CWLogsClient
134- let CWLogClient = new CloudWatchLogsClient ( ) ;
135-
136133 // Only create logFilterStream if tailLogs is enabled, and we wait for the task to stop in the pipeline
137134 if ( tailLogs ) {
138135 core . debug ( `Logging enabled. Getting logConfiguration from TaskDefinition.` )
@@ -167,6 +164,7 @@ const main = async () => {
167164
168165 // Start Live Tail
169166 try {
167+ const CWLogClient = new CloudWatchLogsClient ( ) ;
170168 const response = await CWLogClient . send ( new StartLiveTailCommand ( {
171169 logGroupIdentifiers : [ logGroupIdentifier ] ,
172170 logStreamNames : [ logStreamName ]
@@ -199,7 +197,6 @@ const main = async () => {
199197 }
200198
201199 // Close LogStream and store output
202- CWLogClient . destroy ( ) ;
203200 core . setOutput ( 'log-output' , logOutput ) ;
204201
205202 // Describe Task to get Exit Code and Exceptions
You can’t perform that action at this time.
0 commit comments