diff --git a/lib/template.js b/lib/template.js index 9a297472..c5656c36 100644 --- a/lib/template.js +++ b/lib/template.js @@ -344,7 +344,7 @@ module.exports = (options = {}) => { Family: options.family, ContainerDefinitions: [ { - Name: prefixed(`-${options.service}`).toLowerCase(), + Name: cf.join('-', [prefixed(''), cf.stackName]), Image: cf.join([ cf.accountId, '.dkr.ecr.us-east-1.amazonaws.com/', diff --git a/test/__snapshots__/template.jest.js.snap b/test/__snapshots__/template.jest.js.snap index e30dc3df..36bbe7d0 100644 --- a/test/__snapshots__/template.jest.js.snap +++ b/test/__snapshots__/template.jest.js.snap @@ -589,7 +589,17 @@ Object { "SourceVolume": "mnt-1", }, ], - "Name": "soup-example", + "Name": Object { + "Fn::Join": Array [ + "-", + Array [ + "Soup", + Object { + "Ref": "AWS::StackName", + }, + ], + ], + }, "Privileged": true, "ReadonlyRootFilesystem": true, "Ulimits": Array [ @@ -1249,7 +1259,17 @@ Object { "SourceVolume": "tmp", }, ], - "Name": "watchbot-example", + "Name": Object { + "Fn::Join": Array [ + "-", + Array [ + "Watchbot", + Object { + "Ref": "AWS::StackName", + }, + ], + ], + }, "Privileged": false, "ReadonlyRootFilesystem": true, "Ulimits": Array [