Questions tagged [launch-template]
23 questions
7
votes
2 answers
Change Elastic Beanstalk environment from Launch Configuration to Launch Template
The Elastic Beanstalk docs say:
Web server environments have ... one of the following two resources.
AWSEBAutoScalingLaunchConfiguration (AWS::AutoScaling::LaunchConfiguration) – The launch configuration attached to your environment's Auto Scaling…

Zags
- 37,389
- 14
- 105
- 140
2
votes
2 answers
How can I update the launch template version to be set to latest in Terraform?
I am trying to set the the latest version to default in the launch template using Terraform.
You can do this quite easily in the AWS console:
enter image description here
But I can't seem to find in TF documentation a way to do so.
I am using AWS…

milakay
- 23
- 1
- 3
2
votes
1 answer
Can I put terraform variables in my Python.py which populates in a Lambda
I have a lambda function that triggers every 24 hours to create an instance based on a specific LaunchTemplate.
import boto3
AWS_REGION = XXXX
EC2_CLIENT = boto3.resource('ec2', region_name=AWS_REGION)
def lambda_handler(event, context):
…

Blake McNeal
- 31
- 3
2
votes
0 answers
AWS EKS managed node groups root volume encryption through Terraform
I have been exploring AWS EKS managed node groups node root volume encryption through Terraform module. Found the below documentation from terraform, as this can be done by…

thulasi39
- 521
- 2
- 5
- 19
1
vote
2 answers
Creating an EC2 instance with an AWS FSX mounted isn't showing files
I have created an FSX for Lustre service in AWS, with a Data Repository Association to an S3 bucket. I am looking to create an EC2 instance that has the FSX file share mounted and contains the files that are in the S3 bucket as locally mounted…

Brett
- 11,637
- 34
- 127
- 213
1
vote
3 answers
Issue when running terraform: Error: updating Auto Scaling Group XXX: AccessDenied: You are not authorized to use launch template: XXX
I have picked up a piece of work started by a contractor who has since left, and I was told the pipeline was working, but when I run it I get this error:
╷
│ Error: updating Auto Scaling Group (XXX): AccessDenied: You are not authorized to use…

berimbolo
- 3,319
- 8
- 43
- 78
0
votes
1 answer
What is sed -e expression unknown option to `s`
I have a EC2 userdata bash script with some sed entries as follows. The userdata was base64 encoded as part of a launch template.
sed -i -- "s/{{ data_dir }}/$${CONSUL_DATA_DIR//\//\\\/}/g" $CONSUL_DEFAULT_CONFIG
However I’m getting an error when…

Booboo
- 45
- 1
- 5
0
votes
1 answer
EKS -nodes fail when launched through a launch template (terraform)
when i launch the node normally, everything working fine, but when i try to launch it using a launch template, im having connection issues within the cluster.
more specifically, aws-node pod fails with the…

Niv Shitrit
- 3
- 2
0
votes
0 answers
New eks node instance not able to join cluster, getting "cni plugin not initialized"
I am pretty new to terraform and trying to create a new eks cluster with node-group and launch template. The EKS cluster, node-group, launch template, nodes all created successfully. However, when I changed the desired size of the node group (using…

BrianY
- 1
0
votes
1 answer
How to stop launch template versions from incrementing?
I am trying to write some code to automate AMI image updates for ASG with launch templates. I had some deployed code that created a new launch template version, but it was failing with exception and creating new launch templates without fully…

dom159
- 13
- 2
0
votes
0 answers
AWS: Userdata block on EC2 launch template is not running the provided powershell script
I'm working on migrating a VM from azure to AWS. I have successfully migrated using a migration service and it boots up a VM on completion. I had created an AMI out of that VM which also turned out to be successful. But when I try creating a ec2 or…
0
votes
0 answers
aws_launch_template makes batch job in runnable
I added a launch template to IaC and and when I run the batch job it stuck in runnable state
this my launch template code :
resource "aws_launch_template" "conversion_launch_template" {
name = "conversion-launch-template"
…

Yafaa Ben Tili
- 176
- 1
- 7
0
votes
0 answers
How to add swap memory in Ec2 which is created using AWS Batch?
We have batch job which uses Ec2 and the RAM of the ec2 is being over utilised whereas CPU is not utilised much,Hence I want to attach a 100 GB of EBS to the EC2 and add a swap space.
I need to attach a 100GB EBS & create a swap space in Ec2 in…

Thejus A P
- 71
- 1
- 11
0
votes
1 answer
Update AMI ID in launch template
I have set up an Amazon EC2 Auto Scaling Group that is based on a Launch Template using its latest version. The Launch Template uses an AMI. I have also set up a Data Lifecycle Manager that makes a back-up every X hours so that my data is up to…

kiroroki
- 3
- 1
- 2
0
votes
1 answer
Executing npm install in user data
I am attempting to create a launch template in aws with the following in the user data
#!/bin/bash
home=/home/ec2-user
nodev='8.11.2'
nvmv='0.33.11'
#install node
su - ec2-user -c "curl…