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

Use a lower level API of the SDK in AwsCustomResource #2689

Closed
jogold opened this issue May 30, 2019 · 1 comment · Fixed by #5442
Closed

Use a lower level API of the SDK in AwsCustomResource #2689

jogold opened this issue May 30, 2019 · 1 comment · Fixed by #5442
Assignees
Labels
@aws-cdk/custom-resources Related to AWS CDK Custom Resources feature-request A feature should be added or improved. in-progress This issue is being actively worked on.

Comments

@jogold
Copy link
Contributor

jogold commented May 30, 2019

This would allow to issue API calls even if the version available on Lambda is not the most recent one.

See discussion in #1850.

@jogold jogold added the feature-request A feature should be added or improved. label May 30, 2019
@spg
Copy link
Contributor

spg commented Jun 14, 2019

Just hit this roadblock today. I was trying to create a Glue::Crawler, but the CatalogTargets property is neither supported by CloudFormation natively nor the JS SDK v2.437.0 (bundled with runtime nodejs10.x. Supported started in v2.453.0).

jogold added a commit to jogold/aws-cdk that referenced this issue Nov 18, 2019
Add a new package `@aws-cdk/lambda-layers` that offers pre-built layers.

Layer building is currently only supported for Node.js and works as follows:
* List static members of the `Layer` class (= layers to build)
* Create a dummy `package.json` file containing only dependencies for this layer
in the `layers` folder. Dependencies versions are extracted from the `package.json`
of `@aws-cdk/lambda-layers`.
* Run `npm install`

As layer dependencies are extracted from the main `package.json` they can be picked
up by `dependabot`, automatically updating the layer when needed.

The `getLayerVersion()` method returns a singleton `lambda.LayerVersion` that can be
used in Lambda functions.

The first layer is `AWS_SDK_JS` which offers a more recent version of the AWS SDK than
the one included in the Lambda runtime (it will also be updated more frequently).

Use the `AWS_SDK_JS` layer in `AwsCustomResource` and `AwsApi` event target.

Closes aws#2689
Closes aws#5063
@SomayaB SomayaB added the in-progress This issue is being actively worked on. label Nov 18, 2019
jogold added a commit to jogold/aws-cdk that referenced this issue Dec 16, 2019
Add a `useLatestSdk` prop to `AwsCustomResource`. When set to `true`, the
latest v2 of AWS SDK JS will be installed when a new container is initialized
for the Lambda function. Subsequent executions resuing this container will
skip installation.

Increase default timeout to 60 seconds when `useLatestSdk` is set to `true`.

Closes aws#2689
Closes aws#5063
@SomayaB SomayaB added the @aws-cdk/custom-resources Related to AWS CDK Custom Resources label Dec 16, 2019
eladb pushed a commit that referenced this issue Dec 18, 2019
Install the latest v2 of AWS SDK JS when a new container is initialized
for the Lambda function. Subsequent executions reusing this container will
skip installation.

Increase default timeout to 60 seconds.

Closes #2689
Closes #5063
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/custom-resources Related to AWS CDK Custom Resources feature-request A feature should be added or improved. in-progress This issue is being actively worked on.
Projects
None yet
4 participants