Skip to content
v2.278.0

IEcsFargateContainerDefinition Interface ​

A container orchestrated by ECS that uses Fargate resources and is orchestrated by ECS.

Properties ​

assignPublicIpmay be undefinedbooleanassign_public_ipmay be undefinedboolassignPublicIpmay be undefinedBooleanAssignPublicIpmay be undefinedboolAssignPublicIpmay be undefined*bool = false #
Indicates whether the job has a public IP address.

For a job that's running on Fargate resources in a private subnet to send outbound traffic to the internet (for example, to pull container images), the private subnet requires a NAT gateway be attached to route requests to the internet.

commandmay be undefinedstring[]commandmay be undefinedtyping.List[str]commandmay be undefinedList<String>Commandmay be undefinedstring[]Commandmay be undefined*[]*string #
The command that's passed to the container.
cpunumbercpuint | floatcpuNumberCpudoubleCpu*float64 #
The number of vCPUs reserved for the container.

Each vCPU is equivalent to 1,024 CPU shares. For containers running on EC2 resources, you must specify at least one vCPU.

enableExecuteCommandmay be undefinedbooleanenable_execute_commandmay be undefinedboolenableExecuteCommandmay be undefinedBooleanEnableExecuteCommandmay be undefinedboolEnableExecuteCommandmay be undefined*bool #
Whether to enable ecs exec for this container.

Default: undefined - AWS Batch default is false

environmentmay be undefined{ [key: string]: string }environmentmay be undefinedtyping.Mapping[str, str]environmentmay be undefinedMap<String, String>Environmentmay be undefinedIDictionary<string, string>Environmentmay be undefined*map[string]*string #
The environment variables to pass to a container.

Default: no environment variables

Cannot start with AWS_BATCH. We don't recommend using plaintext environment variables for sensitive information, such as credential data.

ephemeralStorageSizemay be undefinedSizeephemeral_storage_sizemay be undefinedSizeephemeralStorageSizemay be undefinedSizeEphemeralStorageSizemay be undefinedSizeEphemeralStorageSizemay be undefinedSize #
The size for ephemeral storage.

Default: 20 GiB

executionRoleIRoleexecution_roleIRoleexecutionRoleIRoleExecutionRoleIRoleExecutionRoleIRole #
The role used by Amazon ECS container and AWS Fargate agents to make AWS API calls on your behalf.
fargateCpuArchitecturemay be undefinedCpuArchitecturefargate_cpu_architecturemay be undefinedCpuArchitecturefargateCpuArchitecturemay be undefinedCpuArchitectureFargateCpuArchitecturemay be undefinedCpuArchitectureFargateCpuArchitecturemay be undefinedCpuArchitecture = X86_64 #
The vCPU architecture of Fargate Runtime.
fargateOperatingSystemFamilymay be undefinedOperatingSystemFamilyfargate_operating_system_familymay be undefinedOperatingSystemFamilyfargateOperatingSystemFamilymay be undefinedOperatingSystemFamilyFargateOperatingSystemFamilymay be undefinedOperatingSystemFamilyFargateOperatingSystemFamilymay be undefinedOperatingSystemFamily = LINUX #
The operating system for the compute environment.
fargatePlatformVersionmay be undefinedFargatePlatformVersionfargate_platform_versionmay be undefinedFargatePlatformVersionfargatePlatformVersionmay be undefinedFargatePlatformVersionFargatePlatformVersionmay be undefinedFargatePlatformVersionFargatePlatformVersionmay be undefinedFargatePlatformVersion = LATEST #
Which version of Fargate to use when running this container.
The image that this container will run.
jobRolemay be undefinedIRolejob_rolemay be undefinedIRolejobRolemay be undefinedIRoleJobRolemay be undefinedIRoleJobRolemay be undefinedIRole #
The role that the container can assume.

Default: no jobRole

linuxParametersmay be undefinedLinuxParameterslinux_parametersmay be undefinedLinuxParameterslinuxParametersmay be undefinedLinuxParametersLinuxParametersmay be undefinedLinuxParametersLinuxParametersmay be undefinedLinuxParameters = none #
Linux-specific modifications that are applied to the container, such as details for device mappings.
logDriverConfigmay be undefinedLogDriverConfiglog_driver_configmay be undefinedLogDriverConfiglogDriverConfigmay be undefinedLogDriverConfigLogDriverConfigmay be undefinedLogDriverConfigLogDriverConfigmay be undefinedLogDriverConfig #
The configuration of the log driver.
memorySizememorySizememorySizeMemorySizeMemorySize #
The memory hard limit present to the container.

If your container attempts to exceed the memory specified, the container is terminated. You must specify at least 4 MiB of memory for a job.

nodeNodenodeNodenodeNodeNodeNodeNodeNode #
The tree node.
readonlyRootFilesystemmay be undefinedbooleanreadonly_root_filesystemmay be undefinedboolreadonlyRootFilesystemmay be undefinedBooleanReadonlyRootFilesystemmay be undefinedboolReadonlyRootFilesystemmay be undefined*bool = false #
Gives the container readonly access to its root filesystem.
secretsmay be undefined{ [key: string]: Secret }secretsmay be undefinedtyping.Mapping[str, Secret]secretsmay be undefinedMap<String, Secret>Secretsmay be undefinedIDictionary<string, Secret>Secretsmay be undefined*map[string]Secret #
A map from environment variable names to the secrets for the container.

Default: no secrets

Allows your job definitions to reference the secret by the environment variable name defined in this property.

usermay be undefinedstringusermay be undefinedstrusermay be undefinedStringUsermay be undefinedstringUsermay be undefined*string #
The user name to use inside the container.

Default: no user

volumesEcsVolume[]volumestyping.List[EcsVolume]volumesList<EcsVolume>VolumesEcsVolume[]Volumes*[]EcsVolume #
The volumes to mount to this container.

Default: no volumes

Automatically added to the job definition.

Methods ​

addVolume(volume: EcsVolume): voiddef add_volume(self, volume: EcsVolume) -> Nonepublic void addVolume(EcsVolume volume)public void AddVolume(EcsVolume volume)func AddVolume(Volume EcsVolume) #
Add a Volume to this container.
with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct #
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited.

1 parameter · returns

Parameters

  • mixinsmixinsmixinsmixinsMixins — The mixins to apply.

Returns: This construct for chaining