Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

371
Vistas
Is it possible to use T2 Unlimited instances in Elastic Beanstalk?

I am trying to use T2 Unlimited instances with Elastic Beanstalk. I don't want to configure this after the instances have launched, so I am wondering if anyone knows if it's at all possible with EB configuration?

over 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

I found a solution. Posting it here in case others run into the same issue:

  1. Create an IAM policy that allows the ec2 instances in your elastic beanstalk environment to modify instance credit specification and attach it to your elastic beanstalk ec2 role.
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "InstanceCreditPolicy",
            "Effect": "Allow",
            "Action": [
                "ec2:ModifyInstanceCreditSpecification",
                "ec2:DescribeInstanceCreditSpecifications"
            ],
            "Resource": "*"
        }
    ]
}
  1. Create an eb extension (.ebextensions/01-set-instance-credit-unlimited.config)
commands:
  set-instance-credit-unlimited:
    command: |
      aws ec2 modify-instance-credit-specification --region <your_region> --instance-credit-specification '[{"InstanceId": "'"$(wget -q -O - http://169.254.169.254/latest/meta-data/instance-id)"'","CpuCredits": "unlimited"}]'
over 4 years ago · Santiago Trujillo Denunciar

0

In case you're using solution stack- "64bit Amazon Linux 2017.03 v4.1.1 running Node.js", in addition to creating the policy described by user steinim, you need to use these two config files instead:

1) upgrade-awscli.config

commands: 
  modify-instance-credit-specification:
    command: "sudo pip install --upgrade awscli"

2) t2-unlimited-test.config

commands: 
  modify-instance-credit-specification:
    command: "aws ec2 modify-instance-credit-specification --region us-west-2 --instance-credit-specification '[{\"InstanceId\": \"'\"$(wget -q -O - http://169.254.169.254/latest/meta-data/instance-id)\"'\",\"CpuCredits\": \"unlimited\"}]'"
over 4 years ago · Santiago Trujillo Denunciar

0

I was looking for an answer to this myself, but have noticed that t3 EC2 instances have unlimited mode enabled by default [1][2], as well as being cheaper than t2 instances. Therefore, if you use a t3 instance type in your EB env, you're good to go, with no additional EB env configuration required.

[1] https://aws.amazon.com/blogs/aws/new-t3-instances-burstable-cost-effective-performance/

[2] https://aws.amazon.com/ec2/instance-types/t3/

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda