Skip to content

Commit

Permalink
fix(amplify): deploy asset Custom Resource points to TS file (#18166)
Browse files Browse the repository at this point in the history
The .ts file is not packaged and exported when
distributed resulting in the CDK being unable to
find the index file. This has been corrected to
point to the .js version instead.


----

Error currently observed (CDK 1.137.0)

```
Cannot find entry file at /home/samkio/projects/activity-management-react-app/packages/server-cdk-stack/node_modules/@aws-cdk/aws-amplify/lib/asset-deployment-handler/index.ts
Subprocess exited with error 1
```

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
samkio authored Dec 31, 2021
1 parent e2cb83b commit a1508af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-amplify/lib/branch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class AmplifyAssetDeploymentProvider extends NestedStack {
{
entry: path.join(
__dirname,
'asset-deployment-handler/index.ts',
'asset-deployment-handler/index.js',
),
runtime: lambda.Runtime.NODEJS_14_X,
handler: 'onEvent',
Expand All @@ -247,7 +247,7 @@ class AmplifyAssetDeploymentProvider extends NestedStack {
{
entry: path.join(
__dirname,
'asset-deployment-handler/index.ts',
'asset-deployment-handler/index.js',
),
runtime: lambda.Runtime.NODEJS_14_X,
handler: 'isComplete',
Expand Down

0 comments on commit a1508af

Please sign in to comment.