typescript aws

pull/235/head
mdugdale 2021-03-28 21:42:14 +01:00
parent 00b5a67b1a
commit 47fd2f4da2
2 changed files with 6 additions and 6 deletions

View File

@ -31,7 +31,7 @@ Resources:
DeleteCFNLambda:
Type: "AWS::Lambda::Function"
Properties:
FunctionName: "DeleteCFNLambda"
FunctionName: !Join [ "", [ 'DeleteCFNLambda', !Ref BUILDID ] ]
Code:
ZipFile: |
import boto3
@ -67,7 +67,7 @@ Resources:
- GenerateCronExpression
Type: "AWS::Events::Rule"
Properties:
Name: "DeleteStackEventRuleName"
Name: !Join [ "", [ 'DeleteStackEventRuleName', !Ref BUILDID ] ]
Description: Delete stack event
ScheduleExpression: !GetAtt GenerateCronExpression.cron_exp
State: "ENABLED"
@ -80,14 +80,14 @@ Resources:
DependsOn:
- DeleteStackEventRule
Properties:
FunctionName: "DeleteCFNLambda"
FunctionName: !Join [ "", [ 'DeleteCFNLambda', !Ref BUILDID ] ]
Action: "lambda:InvokeFunction"
Principal: "events.amazonaws.com"
SourceArn: !GetAtt DeleteStackEventRule.Arn
GenerateCronExpLambda:
Type: "AWS::Lambda::Function"
Properties:
FunctionName: "GenerateCronExpressionLambda"
FunctionName: !Join [ "", [ 'GenerateCronExpressionLambda', !Ref BUILDID ] ]
Code:
ZipFile: |
from datetime import datetime, timedelta
@ -131,6 +131,6 @@ Resources:
Type: "Custom::GenerateCronExpression"
Version: "1.0"
Properties:
Name: "GenerateCronExpression"
Name: !Join [ "", [ 'GenerateCronExpression', !Ref BUILDID ] ]
ServiceToken: !GetAtt GenerateCronExpLambda.Arn
ttl: !Ref 'TTL'

View File

@ -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 CF = new SDK.CloudFormation();