@@ -51,6 +51,12 @@ export interface AssetProps extends AssetOptions {
5151 * and then can be referenced within a CDK application.
5252 */
5353export class Asset extends cdk . Construct implements assets . IAsset {
54+ /**
55+ * Attribute which represents the HTTP URL of this asset.
56+ * @example https://s3.us-west-1.amazonaws.com/bucket/key
57+ */
58+ public readonly httpUrl : string ;
59+
5460 /**
5561 * Attribute that represents the name of the bucket this asset exists in.
5662 */
@@ -63,9 +69,9 @@ export class Asset extends cdk.Construct implements assets.IAsset {
6369
6470 /**
6571 * Attribute which represents the S3 URL of this asset.
66- * @example https://s3.us-west-1.amazonaws.com /bucket/key
72+ * @example s3:/ /bucket/key
6773 */
68- public readonly s3Url : string ;
74+ public readonly s3ObjectUrl : string ;
6975
7076 /**
7177 * The path to the asset (stringinfied token).
@@ -116,9 +122,10 @@ export class Asset extends cdk.Construct implements assets.IAsset {
116122 fileName : staging . stagedPath ,
117123 } ) ;
118124
125+ this . httpUrl = location . httpUrl ;
119126 this . s3BucketName = location . bucketName ;
120127 this . s3ObjectKey = location . objectKey ;
121- this . s3Url = location . s3Url ;
128+ this . s3ObjectUrl = `s3:// ${ this . s3BucketName } / ${ this . s3ObjectKey } ` ;
122129
123130 this . bucket = s3 . Bucket . fromBucketName ( this , 'AssetBucket' , this . s3BucketName ) ;
124131
0 commit comments