Skip to content

Update Deprecated APIs #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions cdk/stacks/step-batch-stack.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Duration, PhysicalName, Stack } from "aws-cdk-lib";
import { FlowLogDestination, FlowLogTrafficType, Peer, Port, SecurityGroup, Vpc } from "aws-cdk-lib/aws-ec2";
import { FlowLogDestination, FlowLogTrafficType, IpAddresses, Peer, Port, SecurityGroup, Vpc } from "aws-cdk-lib/aws-ec2";
import { Volume } from "aws-cdk-lib/aws-ecs";
import { AccessPoint, FileSystem } from "aws-cdk-lib/aws-efs";
import { Runtime, FileSystem as lfs } from "aws-cdk-lib/aws-lambda";
Expand All @@ -21,6 +21,7 @@ import { BatchJob } from "../constructs/batch-job";
import {
Choice,
Condition,
DefinitionBody,
IntegrationPattern,
JsonPath,
LogLevel,
Expand All @@ -47,7 +48,7 @@ export class StepBatchStack extends Stack {

// VPC for the batch jobs to act within
const vpc = new Vpc(this, "BatchVpc", {
cidr: "100.64.0.0/22",
ipAddresses: IpAddresses.cidr("100.64.0.0/22"),
flowLogs: {
allTraffic: {
destination: FlowLogDestination.toCloudWatchLogs(),
Expand Down Expand Up @@ -325,7 +326,7 @@ export class StepBatchStack extends Stack {
// 5. Run the 'Check back jobs' lambda
// 6. Decide: If not finished, run step 5 again. Otherwise finish.
const stateMachine = new StateMachine(this, "BatchStateMachine", {
definition: startInitJob
definitionBody: DefinitionBody.fromChainable(startInitJob
.next(stepOne)
.next(stepTwo)
.next(stepThree)
Expand All @@ -335,6 +336,7 @@ export class StepBatchStack extends Stack {
.when(Condition.booleanEquals("$.check.Payload.finished", true), batchFinished)
.when(Condition.booleanEquals("$.check.Payload.finished", false), wait30.next(checkJob))
),
),
logs: { destination: stepFunctionLogGroup, level: LogLevel.ALL },
tracingEnabled: true,
});
Expand Down
Loading