Replies: 2 comments 2 replies
-
You can remove the OAI config on your distribution with escape hatches. Here's an example: const dist = new Distribution(this, 'Dist', {
defaultBehavior: {
origin,
}
})
const cfdist = dist.node.defaultChild as CfnDistribution;
cfdist.addPropertyDeletionOverride('DistributionConfig.Origins.0.S3OriginConfig.OriginAccessIdentity') But also, nothing about using cdk v2 should prevent you from using the Hope this helps |
Beta Was this translation helpful? Give feedback.
2 replies
-
I too had to use |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using KMS to encrypt objects in my S3 bucket and serving them from cloudfront.
I need to disable OAI in cloudfront-origin to use KMS.
I'm using CDK 2.4.0 and I couldn't find
how to disable OAI
in the CDK documentation.If originAccessIdentity is not entered, the default for OAI in CDK v1 is
OAI is not used
.cdk v1 originaccessidentity
On the other hand, in CDK v2, if you do not input OAI,
CDK creates and uses OAI
.cdk v2 originaccessidentity
I can change that setting in the console, but I have to change it every time the CDK is finished deploying.
It is not easy to use only that stack as CDK v1 because all of the existing infrastructure is using CDK v2.
Is there any way to disable OAI in CDK v2?
Beta Was this translation helpful? Give feedback.
All reactions