1

I am trying to set up an EC2 instance that I can use for R.

I am using this cloudfront template which I found on this help article.

It is so close to working, but not quite there. I tried to launch the instance and received this msg:

The pending-interface-placement instance to which 'eni-001a6e8290f522251' is attached is not in a valid state for this operation (Service: AmazonEC2; Status Code: 400; Error Code: IncorrectInstanceState; Request ID: c372ab81-053d-4225-b6f4-b3edd2421296)

The default ami_id didn't work on the first go, so I replaced it with ami-0cd3dfa4e37921605.

After the error, the rest of the operation rolled back. The AWS account is a new account without any other settings. I created a VPC and an associated subnet and internet gateway for security, plus a key pair for EC2 and an S3 bucket.

0

1 Answer 1

3

You need to make a change in the cloudformation template.

Find this section

  RStatsEC2Instance:
Type: AWS::EC2::Instance
DependsOn: RStatsEIP
Properties:
  ImageId: !Ref ImageId
  InstanceType: !Ref InstanceType

Here you need to replace RStatsEIP with RStatsEIPAssociation

This will ensure that the EC2 instance will be created after the elastic IP will be associated with the network interface.

Upload the yaml file and continue.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.