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

0

Hello,

The context is as follow:

  • Creating IoT TwinMaker Scene resource via CloudFormation
TwinMakerScene:
    Type: AWS::IoTTwinMaker::Scene
    Properties:
      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?
JangHG
gefragt vor einem Jahr251 Aufrufe
1 Antwort
0

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

Johnny

AWS
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen