cloudfront_origins: CloudFrontOriginAccessIdentity is creating in the s3 stack instead of the cloudfront stack) #31234
Labels
@aws-cdk/aws-cloudfront-origins
Related to CloudFront Origins for the CDK CloudFront Library
bug
This issue is a bug.
closed-for-staleness
This issue was automatically closed because it hadn't received any attention in a while.
p3
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Describe the bug
I am creating two stack: one is the s3 and one is for the cloudfront, what i am seeing is that even tho in my s3 stack i didnt reference anything for cloudfront, it will create a AWS::CloudFront::CloudFrontOriginAccessIdentity resources
Regression Issue
Last Known Working CDK Version
2.138.0
Expected Behavior
the cloudfront components should be create within the cloudfront stack and not the s3 stack
Current Behavior
the AWS::CloudFront::CloudFrontOriginAccessIdentity is being created in the s3 stack
Reproduction Steps
s3 stack:
cloudfront stack:
if I remove the cloudfront stack from my app file, the AWS::CloudFront::CloudFrontOriginAccessIdentity will not be create. however if both are within my app file it will create it
Possible Solution
I am thinking cdk read through the whole stacks file and figure the s3 will need the
AWS::CloudFront::CloudFrontOriginAccessIdentity setting
Additional Information/Context
No response
CDK CLI Version
2.138.0
Framework Version
Python
Node.js Version
NA
OS
Linix
Language
Python
Language Version
Python 3.9.6
Other information
this is what my app file look like:
import aws_cdk as cdk
from stacks.s3_stack import S3Stack
from stacks.cloudfront_stack import CloudFrontStack
app = cdk.App()
s3_stack = S3Stack(app, "DemoS3Stack")
cloudfront_stack = CloudFrontStack(app, "DemoCloudFrontStack", s3_bucket=s3_stack.bucket)
app.synth()
The text was updated successfully, but these errors were encountered: