typescript aws
parent
00b5a67b1a
commit
47fd2f4da2
|
|
@ -31,7 +31,7 @@ Resources:
|
||||||
DeleteCFNLambda:
|
DeleteCFNLambda:
|
||||||
Type: "AWS::Lambda::Function"
|
Type: "AWS::Lambda::Function"
|
||||||
Properties:
|
Properties:
|
||||||
FunctionName: "DeleteCFNLambda"
|
FunctionName: !Join [ "", [ 'DeleteCFNLambda', !Ref BUILDID ] ]
|
||||||
Code:
|
Code:
|
||||||
ZipFile: |
|
ZipFile: |
|
||||||
import boto3
|
import boto3
|
||||||
|
|
@ -67,7 +67,7 @@ Resources:
|
||||||
- GenerateCronExpression
|
- GenerateCronExpression
|
||||||
Type: "AWS::Events::Rule"
|
Type: "AWS::Events::Rule"
|
||||||
Properties:
|
Properties:
|
||||||
Name: "DeleteStackEventRuleName"
|
Name: !Join [ "", [ 'DeleteStackEventRuleName', !Ref BUILDID ] ]
|
||||||
Description: Delete stack event
|
Description: Delete stack event
|
||||||
ScheduleExpression: !GetAtt GenerateCronExpression.cron_exp
|
ScheduleExpression: !GetAtt GenerateCronExpression.cron_exp
|
||||||
State: "ENABLED"
|
State: "ENABLED"
|
||||||
|
|
@ -80,14 +80,14 @@ Resources:
|
||||||
DependsOn:
|
DependsOn:
|
||||||
- DeleteStackEventRule
|
- DeleteStackEventRule
|
||||||
Properties:
|
Properties:
|
||||||
FunctionName: "DeleteCFNLambda"
|
FunctionName: !Join [ "", [ 'DeleteCFNLambda', !Ref BUILDID ] ]
|
||||||
Action: "lambda:InvokeFunction"
|
Action: "lambda:InvokeFunction"
|
||||||
Principal: "events.amazonaws.com"
|
Principal: "events.amazonaws.com"
|
||||||
SourceArn: !GetAtt DeleteStackEventRule.Arn
|
SourceArn: !GetAtt DeleteStackEventRule.Arn
|
||||||
GenerateCronExpLambda:
|
GenerateCronExpLambda:
|
||||||
Type: "AWS::Lambda::Function"
|
Type: "AWS::Lambda::Function"
|
||||||
Properties:
|
Properties:
|
||||||
FunctionName: "GenerateCronExpressionLambda"
|
FunctionName: !Join [ "", [ 'GenerateCronExpressionLambda', !Ref BUILDID ] ]
|
||||||
Code:
|
Code:
|
||||||
ZipFile: |
|
ZipFile: |
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
|
|
@ -131,6 +131,6 @@ Resources:
|
||||||
Type: "Custom::GenerateCronExpression"
|
Type: "Custom::GenerateCronExpression"
|
||||||
Version: "1.0"
|
Version: "1.0"
|
||||||
Properties:
|
Properties:
|
||||||
Name: "GenerateCronExpression"
|
Name: !Join [ "", [ 'GenerateCronExpression', !Ref BUILDID ] ]
|
||||||
ServiceToken: !GetAtt GenerateCronExpLambda.Arn
|
ServiceToken: !GetAtt GenerateCronExpLambda.Arn
|
||||||
ttl: !Ref 'TTL'
|
ttl: !Ref 'TTL'
|
||||||
|
|
|
||||||
|
|
@ -212,7 +212,7 @@ class AWS {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static async run(buildUid:string, stackName:string, image:string, entrypoint, commands, mountdir, workingdir, environment, secrets) {
|
static async run(buildUid:string, stackName:string, image:string, entrypoint:string[], commands, mountdir, workingdir, environment, secrets) {
|
||||||
const ECS = new SDK.ECS();
|
const ECS = new SDK.ECS();
|
||||||
const CF = new SDK.CloudFormation();
|
const CF = new SDK.CloudFormation();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue