How to refer arn for an S3 bucket created using cfn resource in cdk python ?
0
I have created an s3 bucket using CfnBucket construct like below. I am using cfn constructs due to strict requirement.
`bucket=s3.CfnBucket(
self,
"someId",
bucket_name="some_name"
)`
How to I refer to this bucket's arn in some other construct ? For eg I am trying something like below to refer to this bucket's arn in a firehose stream I am trying to create.
kinesisfirehose.CfnDeliveryStream(
self, "SomeId",
s3_destination_configuration=kinesisfirehose.CfnDeliveryStream.S3DestinationConfigurationProperty(
bucket_arn=f"arn:aws:s3:::{ksuite_analytic_bucket}",
)
)
)
This is not working and I am getting an error that s3 arn is not valid.
What's the correct way of doing this ?
asked a month ago11 views
1 Answers
0
There's an attribute called attr_arn
that returns the ARN of the bucket. You could simply pass bucket.attr_arn
as a parameter. See the CDK python documentation about the attribute.
Relevant questions
enable eventBridge prop on S3 bucket via CDK
asked 2 months agoHow can I restrict S3 bucket access to allow only VPC Flow logs from within an organization?
Accepted Answerasked 6 months agoHow to refer arn for an S3 bucket created using cfn resource in cdk python ?
asked a month agoS3 inventory failed due to an internal error.
asked 9 months agoHow to append timestamp to s3 bucket name in suffix using cloudformation template?
asked 2 days agoDoes an S3 bucket have to be provided for a Braket DWave run?
asked 2 years agoVirtual hosting an S3 bucket using Cloudfront + SSL
asked 3 years agoCreate aws_secret_access_key for S3 bucket
asked 9 months agoS3 Bucket for Tape Gateway??
asked 3 years agoTrying to share an S3 bucket across accounts using 'aws:PrincipalOrgPaths', how to debug?
asked 22 days ago