Closed tdalbo92 closed 4 months ago
@tdalbo92 these addons use AWS SDK API call to detect the right version. Please make sure that either 1/ credentials are available at build time (e.g. aws configure
has creds and region setup) or 2/ no credentials are available (in that case we fall back onto an internal map of versions, which may not be exactly what AWS has by default).
Another option to work around this issue is to pass the version to these addons, then the framework won't attempt to make any API calls.
@elamaran11 logically region should not be required, let's have a look at this issue.
@tdalbo92 @shapirov103 The EKSClient
on the sdk call needs region
setup in the terminal to make api calls to retrieve the specific version of the addon. If region is not passed, it defaults to other methods, also see its a warning and not a hard error. So this is not an issue and this is how it works.
I am facing the same error. I also read through the older related issue and still don't really understand why the SDK call doesn't use the specified region from the cluster. Here is how I set the region:
const builder = blueprints.EksBlueprint.builder()
.account(config.aws.account)
.region(config.aws.region)
@shapirov103 credentials are available during build time for me but the error is not thrown during build time. It only arises during the deploy step.
Setting the AWS_REGION solves this but feels dirty because I am deploying 2 stacks with a cluster each and they may be in different regions.
@2start: I will take a look at the code that creates the SDK client to describe addon versions. I mentioned "build time" incorrectly, meant "synth time".
I assume you are on 1.15.1
The region of the stack should not matter for the dynamic resolution the core addon version - it is needed to construct the API endpoint URL. Semantically the describe-addon-version
API is supposed to be region agnostic.
Describe the bug
After the latest upgrade we're seeing ERROR messages in our console during cdk deploy regarding "Region is missing". It seems like three add-ons are affected: VpcCniAddOn, CoreDnsAddOn, and KubeProxyAddOn. This issue doesn't seem to actually affect the deploy, and isn't causing problems, but it seems like a regression regardless.
Expected Behavior
No error is thrown by these add-ons.
Current Behavior
Stacktrace:
Reproduction Steps
Install any of the three aforementioned add-ons and run cdk deploy. The error seems to reliably happen.
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.133.0
EKS Blueprints Version
1.14.1
Node.js Version
v18.20.1
Environment details (OS name and version, etc.)
MacOS 14.5 Sonoma ARM64
Other information
No response