(aws-s3-deployment): Typescript error for `destinationBucket`
See original GitHub issueWhat 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: https://docs.aws.amazon.com/cdk/api/latest/docs/aws-s3-deployment-readme.html
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.
CDK CLI Version
1.94.1
Framework Version
1.134
Node.js Version
16.13.0
OS
MacOS
Language
Typescript
Language Version
Typescript(4.5.2)
Other information
As a workaround, I set // @ts-ignore
above that property.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Have you checked your package.json to verify that all
aws-cdk/*
packages are the same version? Once you’ve verified that, delete yournode_modules
directory andpackage-lock.json
then rerunnpm install
to verify that your installed packages are all the same version as well.This error typically results from misaligned cdk package versions, so the upgrade should help. Let us know if it doesn’t