Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cdk-dynamodb-seeder] Fails to read JSON with error Unexpected token o in JSON at position 1 #214

Open
iabdelkareem opened this issue Aug 8, 2024 · 0 comments

Comments

@iabdelkareem
Copy link

When using DynamoDBSeeder with Seeds from either json file or bucket the creation of Custom::DynamodbSeeder resource fails with Unexpected token o in JSON at position 1. I checked that the file gets uploaded to S3 correctly (in case fromJsonFile is used) and has a valid JSON array.

Packages:
CDK: 2.147.0
Constructs: 10.3.0
@cloudcomponents/cdk-dynamodb-seeder: 2.4.0

      const seeder = new DynamoDBSeeder(this, 'TemplatesSeeder', {
        table: templatesTable,
        seeds: Seeds.fromBucket(
          s3.Bucket.fromBucketArn(
            this,
            'Seeder',
            '[bucket]'
          ),
          '[key]'
        ),
      });
 const seeder = new DynamoDBSeeder(this, 'TemplatesSeeder', {
        table: templatesTable,
        seeds: Seeds.fromJsonFile(initialTemplatesFilePath),
      });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant