IoT TwinMaker Scene "Got empty scene url" Error with CloudFormation



The context is as follow:

  • Creating IoT TwinMaker Scene resource via CloudFormation
    Type: AWS::IoTTwinMaker::Scene
      ContentLocation: !Sub s3://${MyBucketName}/
      SceneId: MySceneID
      WorkspaceId: !Ref TwinMakerWorkspace
  • TwinMakerWorkspace is defined on the same template
  • The CloudFormation Stack is created/updated successfully
  • The scene is created and shows up on the console
  • When I click on the scene on the console, I get an error message saying "Got empty scene url" and doesn't allow me to view the scene detail.

Could you help me figuring out what happening?

  • Edit:

    • When I create a new scene on the console, it creates a JSON file with some default contents in the S3 bucket that I set as the resource bucket (MyBucketName). However, when I create the scene through CloudFormation there is no JSON file created in the bucket. If I take the default JSON file content and create/upload in the resource bucket with the {Scene-ID-to-be}.json, and set the ContentLocation value under Properties as the "s3://{MyBucketName}/{Scene-ID-to-be}.json, then the scene resource is browsable without error. Although you can get around the error with the above solution, it defeats the purpose of automation ability of CloudFormation. Is there a way for me to make CloudFormation to automatically create and set the default content file upon TwinMaker Scene resource creation through CloudFormation?
asked a year ago277 views
1 Answer

Hi JangHG,

Right, the ContentLocation property should point to a scene JSON file. The scene JSON file can be created either with the TwinMaker console as you discovered, or using the Scene SDK and uploaded to the S3 location.

To have CFN automatically create and set default content you'll probably want to explore an approach similar to our CookieFactoryV2 sample: basically we're using CDK and a custom resource to upload a sample Scene json file as an asset into the S3 location, so cdk deploy will create a fully-working digital twin in TwinMaker.

Hope that helps


answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions