question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Python: AWS Batch Fargate Compatibility Not Working

See original GitHub issue

I am trying to set up an aws.batch.ComputeEnvironment and there seem to be several issues with the batch api.

Steps to reproduce

This basic example (more or less copied from the documentation for this API) is throwing an error:

batch_compute_environment = aws.batch.ComputeEnvironment(
    'batch-compute-environment',
    compute_environment_name='batch-compute-environment',
    compute_resources=aws.batch.ComputeEnvironmentComputeResourcesArgs(
        max_vcpus=256,
        security_group_ids=batch_security_group.id,
        subnets=vpc_subnet_ids,
        type="FARGATE",
    ),
    service_role=batch_service_role.arn,
    type="FARGATE",
)

It’s worth calling out that the example in the documentation sets type="Managed", which the documentation does not list as a valid value. Either way throws the same error.

Expected: I would like Pulumi to stand up the resource.

Actual: TypeError: __init__() missing 3 required keyword-only arguments: 'instance_role', 'instance_types', and 'min_vcpus'. Appears that the type is reverting to the default of EC2

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
lukehobancommented, Jun 22, 2021

Confirmed that if I use an older version of pulumi_aws I see the same errors as above, so will close this out. If you upgrade to >=4.2.0 this should work as expected.

0reactions
lukehobancommented, Jun 22, 2021

Ahh - actually - what version of pulumi_aws are you using? Support for Fargate w/ Batch was added in version 4.2.0. The issues above look like they could all be caused by using an older version of the provider from before that feature was supported.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AWS Batch on AWS Fargate
AWS Batch compute environments on Fargate don't support all of the compute environment parameters that are available. Some parameters are not supported at...
Read more >
AWS Batch Dos and Don'ts: Best Practices in a Nutshell
In this blog post, we share a set of best practices and practical guidance devised from our experience working with customers in running...
Read more >
Resolve "No space left on device" errors from AWS Batch
To resolve the error, first verify that your Docker volume hosted on Amazon EBS has enough disk space. If there's not enough disk...
Read more >
Getting Started with AWS Batch
In the Platform compatibility section: For Execution role, choose a task execution role that lets Amazon Elastic Container Service (Amazon ECS) agents make...
Read more >
Serverless Batch Scheduling with AWS Batch and AWS Fargate
You can submit your Fargate-compatible jobs to Batch, and don't have to worry about maintaining two different services if you have workloads ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found