Open daniellorenzin opened 9 months ago
This essentially renders the ecs parameters for events rule target, but looks like EcsParameters in CFN does not allow to specify runtimePlatform or CpuArchitecture? https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-ecsparameters.html
I ended up working around the issue, by splitting up the task defination and putting the runtimePlatform
settings on that and it deployed and runs as expected.
const taskDefinitionScheduled = new ecs.FargateTaskDefinition(this, 'TaskSchDef', {
memoryLimitMiB: 1024,
cpu: 512,
runtimePlatform: {
cpuArchitecture: ecs.CpuArchitecture.ARM64,
operatingSystemFamily: ecs.OperatingSystemFamily.LINUX,
},
});
const containerScheduled = taskDefinitionScheduled.addContainer('ScheduledContainer', {
image: ecs.ContainerImage.fromDockerImageAsset(asset),
containerName: 'djangoScheduled',
command: ['python', 'manage.py'],
environment: {
DEBUG: "1",
},
secrets: {
...secrets
},
logging: new ecs.AwsLogDriver({ streamPrefix: 'ShovelTask' }),
});
const scheduledTask = new ecsPatterns.ScheduledFargateTask(this, 'ScheduledTask', {
cluster: cluster,
schedule: Schedule.expression('cron(*/1 * * * ? *)'),
subnetSelection: subnetsSelection,
scheduledFargateTaskDefinitionOptions: {
taskDefinition: taskDefinitionScheduled,
},
});
Describe the bug
The runtime platform on the pattern top level is getting ignored when set, for example as LINUX ARM64.
Expected Behavior
The task definition should have the image arch set to LINUX/ARM64
Current Behavior
The task definition should have the image arch is not set. Therefore defaults to LINUX/X86_64 during deployment
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.100
Framework Version
No response
Node.js Version
20.8
OS
Mac
Language
TypeScript
Language Version
No response
Other information
No response