FileAssetLocation

class aws_cdk.core.FileAssetLocation(*, bucket_name, http_url, object_key, s3_object_url, s3_url, kms_key_arn=None)

Bases: object

The location of the published file asset.

This is where the asset can be consumed at runtime.

Parameters
  • bucket_name (str) – The name of the Amazon S3 bucket.

  • http_url (str) – The HTTP URL of this asset on Amazon S3.

  • object_key (str) – The Amazon S3 object key.

  • s3_object_url (str) – The S3 URL of this asset on Amazon S3.

  • s3_url (str) – (deprecated) The HTTP URL of this asset on Amazon S3.

  • kms_key_arn (Optional[str]) – (deprecated) The ARN of the KMS key used to encrypt the file asset bucket, if any. If so, the consuming role should be given “kms:Decrypt” permissions in its identity policy. It’s the responsibility of they key’s creator to make sure that all consumers that the key’s key policy is configured such that the key can be used by all consumers that need it. The default bootstrap stack provisioned by the CDK CLI ensures this, and can be used as an example for how to configure the key properly. Default: - Asset bucket is not encrypted

Attributes

bucket_name

The name of the Amazon S3 bucket.

Return type

str

http_url

The HTTP URL of this asset on Amazon S3.

Example:

# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
https:
Return type

str

kms_key_arn

(deprecated) The ARN of the KMS key used to encrypt the file asset bucket, if any.

If so, the consuming role should be given “kms:Decrypt” permissions in its identity policy.

It’s the responsibility of they key’s creator to make sure that all consumers that the key’s key policy is configured such that the key can be used by all consumers that need it.

The default bootstrap stack provisioned by the CDK CLI ensures this, and can be used as an example for how to configure the key properly.

Default
  • Asset bucket is not encrypted

Deprecated

Since bootstrap bucket v4, the key policy properly allows use of the key via the bucket and no additional parameters have to be granted anymore.

Stability

deprecated

Return type

Optional[str]

object_key

The Amazon S3 object key.

Return type

str

s3_object_url

The S3 URL of this asset on Amazon S3.

Example:

# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
s3:
Return type

str

s3_url

(deprecated) The HTTP URL of this asset on Amazon S3.

Deprecated

use httpUrl

Stability

deprecated

Return type

str