How Do You Schedule a Redshift Stored Procedure Daily Cost-Effectively?

Answer Correct answer: C — Use Amazon Redshift query editor v2 to schedule the stored procedure to run daily, avoiding extra service costs.

A data engineer finished testing an Amazon Redshift stored procedure that processes and inserts data into a table that is not mission critical. The engineer wants to automatically run the stored procedure on a daily basis. Which solution will meet this requirement in the MOST cost-effective way?

  1. Create an AWS Lambda function to schedule a cron job to run the stored procedure.
  2. Schedule and run the stored procedure by using the Amazon Redshift Data API in an Amazon EC2 Spot Instance.
  3. Use query editor v2 to run the stored procedure on a schedule. Correct Answer
  4. Schedule an AWS Glue Python shell job to run the stored procedure.

Community Votes

C
81%
A
19%

81% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

Tests whether you choose native Redshift scheduling over external services for a daily stored procedure; the trap is treating a low unit price for Lambda or Spot as cheaper than a built-in feature that adds no separate service.

Amazon Redshift query editor v2 supports scheduled queries, so a stored procedure can run daily without standing up extra compute. For a non-mission-critical table, this native scheduling is the most cost-effective solution.

Selecting AWS Lambda because serverless looks cheapest, while ignoring the code, IAM, and VPC/Data API wiring required to reach Redshift compared with query editor v2 scheduling.

Community Discussion (7 comments)

artworkad 👍 7 Selected: C
This can be achieved with query editor v2 (https://docs.aws.amazon.com/redshift/latest/mgmt/query-editor-v2-schedule-query.html)
andrologin 👍 4 Selected: C
I go with C because it runs the query within the Redshift instance, B may not be appropriate because it involves other services on top of the Redshift instance and there is movement of data across the services.
4d716d6 👍 1 Selected: B
given that the table is not mission-critical and requires the "MOST cost-effective way."
salayea28 👍 1 Selected: B
I am going with option B, given that the table is not mission-critical and requires the "MOST cost-effective way." AWS Spot Instances are Amazon EC2 instances that allow you to utilize spare EC2 capacity at a significantly lower cost than On-Demand instances. These instances are ideal for flexible workloads that can tolerate interruptions, such as batch processing, data analysis, and background processing jobs.
GHill1982 👍 2 Selected: C
I think all options other than using the query editor will incur additional costs.
tgv 👍 3 Selected: A
AWS Lambda, combined with Amazon CloudWatch Events for scheduling, provides a low-cost, serverless, and reliable way to automatically run the stored procedure daily.
lalitjhawar 👍 1
A. Create an AWS Lambda function to schedule a cron job to run the stored procedure.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

Amazon Redshift query editor v2 includes a native scheduled query feature that can run SQL statements, including a CALL to a stored procedure, on a daily cadence. Because scheduling happens within the existing Redshift environment under IAM permissions, there is no additional compute service to provision or pay for beyond the cluster that already exists. The table being non-mission-critical does not change the comparison: the question asks for the most cost-effective automatic daily run, and an in-place Redshift scheduler avoids extra infrastructure. As artworkad pointed to in the AWS documentation, query editor v2 scheduling is the built-in mechanism for exactly this scenario. This is why C is the correct answer.

Why the Other Options Are Wrong

A is possible by using an EventBridge (CloudWatch Events) schedule to trigger Lambda, but it requires writing and maintaining function code plus IAM and network connectivity to Redshift, so it adds moving parts and potential data-transfer/NAT costs. B uses a Spot Instance, which has a low hourly rate but still requires an instance, storage, startup logic, and tolerance for interruption, making it operationally heavier and not guaranteed to run the procedure daily without extra orchestration. D uses an AWS Glue Python shell job, which is billed per DPU-hour and is overkill for a single stored procedure call, so it is less cost-effective than the native scheduler. All three external options introduce additional AWS services, which the cost-effectiveness requirement discourages for such a simple daily task.

Community Comment Notes

Artworkad shared the AWS documentation link for scheduling queries in query editor v2, directly supporting the chosen answer. Andrologin reasoned that query editor v2 runs the query within the Redshift instance, whereas option B drags in other services and data movement across services, which is a sensible cost and complexity argument. GHill1982 noted that "all options other than using the query editor will incur additional costs". Tgv favored Lambda with a scheduled event, but that view discounts the operational setup and permissions Lambda still requires. The strong community preference for C aligns with the native Redshift scheduling capability.

Official Reference

Exam Strategy

When the requirement says MOST cost-effective and the service is Redshift, prefer native Redshift features such as query editor v2 scheduling over external compute. External options can look cheap per unit, but the extra service, code, and connectivity usually make them less cost-effective for a simple scheduled stored procedure. Eliminate answers that require running or managing EC2 or Glue when a built-in scheduler exists.

Frequently Asked Questions

Why is AWS Lambda not the most cost-effective option for scheduling this Redshift stored procedure?

Lambda needs custom code, IAM permissions, and VPC or Data API connectivity to reach Redshift, adding operational overhead even if invocation cost is low.

Can Redshift query editor v2 schedule a CALL statement for a stored procedure?

Yes, scheduled queries in query editor v2 run SQL against your Redshift cluster and can include CALL statements to invoke stored procedures.

Related Analysis

Practice All DEA-C01 Questions

Access 100 questions with complete answers and detailed explanations.

View Full DEA-C01 Practice Test →

← Back to DEA-C01 Study Guide