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

Improved documentation on how to run the Sample #419

Closed
SamStephens opened this issue Nov 21, 2023 · 1 comment · Fixed by #1099
Closed

Improved documentation on how to run the Sample #419

SamStephens opened this issue Nov 21, 2023 · 1 comment · Fixed by #1099
Labels
documentation Improvements or additions to documentation

Comments

@SamStephens
Copy link
Contributor

When I tried to run the Sample file as per README.md, NO_PREBUILT_LAMBDA=1 npx cdk deploy -a "npx ts-node -P tsconfig.dev.json --prefer-ts-exts test/example.ecr-deployment.ts", I got errors about missing dependencies.

This is because NodeJS, Yarn, and the dependencies Yarn installs, are prerequisites.

$ npm install --global yarn
$ yarn install --check-files --frozen-lockfile

Also I had to run the cdk executable, directly, not via npx:

NO_PREBUILT_LAMBDA=1 cdk deploy -a "npx ts-node -P tsconfig.dev.json --prefer-ts-exts test/example.ecr-deployment.ts"

Lastly, I had to update test/example.ecr-deployment.ts to use the region I've bootstrapped the CDK.

I think the actions here are:

  • Documentation on how to install development dependencies. This should probably be its own section, as it doesn't just apply to the Sample file.
  • Update the Sample line in README.md to be NO_PREBUILT_LAMBDA=1 cdk deploy -a "npx ts-node -P tsconfig.dev.json --prefer-ts-exts test/example.ecr-deployment.ts" with cdk not called via npx.
  • Remove the line in test/example.ecr-deployment.ts that hard codes the region - pick up the region from the users environment instead.
@SamStephens
Copy link
Contributor Author

SamStephens commented Nov 22, 2023

Also the sample requires dockerhub credentials as a secret. This isn't documented, and the whole way credential secrets work is confusing.

My take is that we deal with this by commenting out the lines in question, so that by default there's no reliance on secrets and the sample just deploys a locally built image. We can leave the Dockerhub deployment code commented out with a comment explaining it, just like the tarball from s3 code directly below the Dockerhub deployment code.

@mrgrain mrgrain added the documentation Improvements or additions to documentation label Oct 16, 2024
github-merge-queue bot pushed a commit that referenced this issue Mar 13, 2025
… examples (#1099)

Fixes #419

Also makes the test script more flexible for non standard environments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
2 participants