Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(aws-s3-deployment): Typescript error for `destinationBucket`

See original GitHub issue

What is the problem?

Typescript is yelling at me because Property 'transferAccelerationUrlForObject' is missing in type 'Bucket' but required in type 'IBucket'.ts(2741) when setting a Bucket in the destinationBucket- property.

Reproduction Steps

Basically, I followed the instructions from the docs:

const websiteBucket = new s3.Bucket(this, 'WebsiteBucket', {
  websiteIndexDocument: 'index.html',
  publicReadAccess: true

new s3deploy.BucketDeployment(this, 'DeployWebsite', {
  sources: [s3deploy.Source.asset('./website-dist')],
  destinationBucket: websiteBucket,
  destinationKeyPrefix: 'web/static' // optional prefix in destination bucket

What did you expect to happen?

No errors.

What actually happened?

VS Code and Typescript are yelling at me.

Screenshot 2021-12-12 at 22 38 12

CDK CLI Version


Framework Version


Node.js Version






Language Version


Other information

As a workaround, I set // @ts-ignore above that property.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

peterwoodworthcommented, Dec 14, 2021

Have you checked your package.json to verify that all aws-cdk/* packages are the same version? Once you’ve verified that, delete your node_modules directory and package-lock.json then rerun npm install to verify that your installed packages are all the same version as well.

peterwoodworthcommented, Dec 13, 2021

This error typically results from misaligned cdk package versions, so the upgrade should help. Let us know if it doesn’t

Read more comments on GitHub >

github_iconTop Results From Across the Web

aws-cdk/aws-s3-deployment module - AWS Documentation
If the destination bucket is not dedicated to the specific BucketDeployment construct (i.e shared by other entities), we recommend to always configure the ......
Read more >
AWS CDK2: NoSuchBucket error when using a ...
I'm using CDK 2.8.0 in TypeScript. I'm trying to circumvent the usage of AWS SAM, for reasons irrelevant here. The idea is, when...
Read more >
aws.s3.Bucket - Pulumi
Get an existing Bucket resource's state with the given name, ID, and optional extra properties used to qualify the lookup. TypeScript; Python; Go;...
Read more >
AWS CDK and Typescript: Deploy a static React app to S3
aws #cdk #typescriptThis lesson is meant to teach you the very basics of working with AWS CDK in Typescript. We will take a...
Read more >
@aws-cdk/aws-s3-deployment | Yarn - Package Manager
If you are using s3deploy.Source.bucket() to take the file source from another bucket: the deployed files will only be updated if the key...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found