Skip to content

More documentation with samples in typescript #102

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

Open
JobaDiniz opened this issue Mar 6, 2023 · 2 comments
Open

More documentation with samples in typescript #102

JobaDiniz opened this issue Mar 6, 2023 · 2 comments

Comments

@JobaDiniz
Copy link

There's this walkthrough but it's using java as the language, and it's not very easy to understand.

From the documentation perspective, I don't understand how to call dynamodb from the handlers for example. It looks like I need to use the SessionProxy, but it's not documented how to get a hold of dynamodb aws client.
In the init example:

// Example:
        try {
            if (session instanceof SessionProxy) {
                const client = session.client('S3');
            }
  1. Where's the documentation of which string should I pass in the .client([string]) to get dynamodb, stepfunction (or others) clients?

  2. Even after I run npm install to install the dependencies, VSCode still does not find @amazon-web-services-cloudformation/cloudformation-cli-typescript-lib

image

  1. Also, do I need to implement all "create, update, list, read..." operations? I was looking for to implement only create, update and delete.
@mmaeng
Copy link
Contributor

mmaeng commented Mar 7, 2023

This will be out of order but for

Also, do I need to implement all "create, update, list, read..." operations? I was looking for to implement only create, update and delete.

The minimum needed would be "create", "read", and "delete".
https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-develop.html#resource-type-develop-implement-handlers

Even after I run npm install to install the dependencies, VSCode still does not find @amazon-web-services-cloudformation/cloudformation-cli-typescript-lib

Not sure on the VSCode error but is your node modules directory included in your tsconfig.json configuration?

Where's the documentation of which string should I pass in the .client([string]) to get dynamodb, stepfunction (or others) clients?

I'm deeper into the python stack but services are extended from the SDKs. In python this would be the reference I would use.
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html

Hopefully that helps?

@jabalsad
Copy link

I would like to also add a request for additional documentation. This plugin deserves its own document for how to write handlers with progress chaining and stabilization. The Java docs are not very useful here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants