LambdaSharp::S3::WriteJson type creates a resource that writes a JSON file to an S3 bucket.
On creation and update, the
Contents property is serialized into a JSON document and written to the S3 bucket. On deletion, the JSON document is deleted from the S3 bucket.
Using: - Module: LambdaSharp.S3.IO:0.5@lambdasharp
Type: LambdaSharp::S3::WriteJson Properties: Bucket: String Key: String Contents: JSON
Bucketproperty specifies the destination S3 bucket name or ARN.
Contentsproperty specifies the contents of the JSON document to be written.
Keyproperty specifies the destination key where the JSON file is written to.
Urlattribute contains the S3 URL of the bucket and key:
config.json file that contains the API Gateway URL
- Resource: MyBucket Type: AWS::S3::Bucket - Resource: WriteConfigJson Type: LambdaSharp::S3::WriteJson Properties: Bucket: !Ref MyBucket Key: config.json Contents: Api: !Ref Module::RestApi::Url