Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

375
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda