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

region-info: GovCloud missing Deep Learning Container Repository Account #29024

Closed
scottschreckengaust opened this issue Feb 8, 2024 · 3 comments
Labels
@aws-cdk/region-info Related to AWS Region information bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@scottschreckengaust
Copy link

Describe the bug

The Deep Learning Container (DLC) Elastic Container Repository (ECR) are missing for the two GovCloud regions:

  1. us-gov-west-1
  2. us-gov-east-1

However, from How Amazon Elastic Container Registry Differs for AWS GovCloud (US):

Amazon ECR public registries aren't supported.

Expected Behavior

An AWS Account for the DLC ECR path:

https://docs.aws.amazon.com/sagemaker/latest/dg-ecr-paths/ecr-us-gov-east-1.html
https://docs.aws.amazon.com/sagemaker/latest/dg-ecr-paths/ecr-us-gov-west-1.html

Current Behavior

Error: region-info: don't know dlcRepositoryAccount for region us-gov-west-1. Use 'Fact.register' to provide this value.

and

Error: region-info: don't know dlcRepositoryAccount for region us-gov-east-1. Use 'Fact.register' to provide this value.

Reproduction Steps

bin/testing_fact_name.ts:

#!/usr/bin/env node
import 'source-map-support/register';
import { App } from 'aws-cdk-lib';
import { TestingFactNameStack } from '../lib/testing_fact_name-stack';

const app = new App();
new TestingFactNameStack(app, 'TestingFactNameStack', {
   env: { account: process.env.CDK_DEFAULT_ACCOUNT, region: process.env.CDK_DEFAULT_REGION },
});

lib/testing_fact_name-stack.ts:

import { Stack, StackProps } from 'aws-cdk-lib';
import { Construct } from 'constructs';
import { FactName, IFact, Fact } from 'aws-cdk-lib/region-info';

export class TestingFactNameStack extends Stack {
  constructor(scope: Construct, id: string, props?: StackProps) {
    super(scope, id, props);
    console.log(`${this.region}`);
    const stack = Stack.of(this);
    const dlcRepositoryAccount = (() => {
      try {
        return stack.regionalFact(FactName.DLC_REPOSITORY_ACCOUNT);
      }
      catch (e) {
        console.error(e);
        return null;
      }
    })();
    console.log(`${FactName.DLC_REPOSITORY_ACCOUNT}=${dlcRepositoryAccount}`);
  }
}

Possible Solution

Create a stack to create a GovCloud ECR repository that copies all DLC images mimicking a public repository.

Additional Information/Context

No response

CDK CLI Version

2.126.0 (build fb74c41)

Framework Version

No response

Node.js Version

v20.11.0

OS

macOS 14.3 (23D56)

Language

TypeScript

Language Version

TypeScript (5.3.3)

Other information

No response

@scottschreckengaust scottschreckengaust added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 8, 2024
@github-actions github-actions bot added the @aws-cdk/region-info Related to AWS Region information label Feb 8, 2024
@pahud
Copy link
Contributor

pahud commented Feb 8, 2024

I don't have the access to GovCloud regions but according the provided doc, the images seem to be shared in the private ECR repos.

What are you trying to do with that using CDK? Can you share some code snippet and the error messages?

@pahud pahud added p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Feb 8, 2024
Copy link

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Feb 10, 2024
@mgwidmann
Copy link

For those coming to this issue later, I was able to get past this error with the following code added before trying to use any sagemaker constructs.

   Fact.register({
      name: 'dlcRepositoryAccount',
      region: Stack.of(this).region,
      value: '442386744353',
    });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/region-info Related to AWS Region information bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

3 participants