Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[aws-eks] EksOptimizedImage returns wrong image SSM path /aws/service/eks/optimized-ami/1.14/recommended/image_id #6891

Closed
IronforgeV opened this issue Mar 20, 2020 · 1 comment · Fixed by #7672
Assignees
Labels
@aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service bug This issue is a bug. p1

Comments

@IronforgeV
Copy link

IronforgeV commented Mar 20, 2020

EksOptimizedImage returns the wrong image ssm path without amazon-linux-2

`aws ssm get-parameter --name /aws/service/eks/optimized-ami/1.14/recommended/image_id --query "Parameter.[Name,Value]" --output text

An error occurred (ParameterNotFound) when calling the GetParameter operation:
`

aws ssm get-parameter --name /aws/service/eks/optimized-ami/1.14/amazon-linux-2/recommended/image_id --query "Parameter.[Name,Value]" --output text /aws/service/eks/optimized-ami/1.14/amazon-linux-2/recommended/image_id ami-0d373fa5015bc43be

Reproduction Steps

Create autoscaling group using EksOptimizedImage
asg = autoscaling.AutoScalingGroup( self, "KubeFleet", instance_type=InstanceType("t3.large"), machine_image=eks.EksOptimizedImage(), associate_public_ip_address=False, update_type=autoscaling.UpdateType.REPLACING_UPDATE, desired_capacity=3, vpc=vpc, vpc_subnets={'subnet_type': SubnetType.PRIVATE} )

Error Log

Error [ValidationError]: Unable to fetch parameters [/aws/service/eks/optimized-ami/1.14/recommended/image_id] from parameter store for this account.
    at Request.extractError (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/protocol/query.js:50:29)
    at Request.callListeners (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
    at Request.emit (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
    at Request.emit (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:683:14)
    at Request.transition (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:38:9)
    at Request.<anonymous> (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:685:12)
    at Request.callListeners (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/sequential_executor.js:116:18) {
  message: 'Unable to fetch parameters [/aws/service/eks/optimized-ami/1.14/recommended/image_id] from parameter store for this account.',

Environment

  • CLI Version :2.0.0
  • Framework Version: 1.28.0
  • OS : OSX 10
  • Language : Python 3.7.6

Other


This is 🐛 Bug Report

@IronforgeV IronforgeV added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Mar 20, 2020
@SomayaB SomayaB added the @aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service label Mar 20, 2020
@eladb eladb added the p1 label Mar 31, 2020
@eladb
Copy link
Contributor

eladb commented Apr 30, 2020

The issue here is that we don't honor the default for nodeType, so until this is fixed you can use:

new EksOptimizedAmi({ nodeType: NodeType.STANDARD });

Fix is on it's way through #7672

@SomayaB SomayaB added in-progress This issue is being actively worked on. and removed needs-triage This issue or PR still needs to be triaged. labels Apr 30, 2020
@mergify mergify bot closed this as completed in #7672 May 1, 2020
mergify bot pushed a commit that referenced this issue May 1, 2020
According to the [document](https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html), the path should be /**aws/service/eks/optimized-ami/1.15/amazon-linux-2/recommended/image_id**

Also fixes #6891
@iliapolo iliapolo changed the title EksOptimizedImage returns wrong image SSM path /aws/service/eks/optimized-ami/1.14/recommended/image_id [aws-eks] EksOptimizedImage returns wrong image SSM path /aws/service/eks/optimized-ami/1.14/recommended/image_id Aug 16, 2020
@iliapolo iliapolo removed the in-progress This issue is being actively worked on. label Aug 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service bug This issue is a bug. p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants