2

My EC2 instance created via my pipeline is not able to create my tableTest in dynamodb. I'm not able to get more info in the console since there website for AWS DataPipeline is in maitenance...

My configuration pipeline definitions.json :

{
     "objects": [
     {
         "id" : "CreateDirectory",
         "type" : "ShellCommandActivity",
         "command" : "aws dynamodb create-table --table-name tableTest \
--attribute-definitions AttributeName=Test,AttributeType=S \
--key-schema AttributeName=Test,KeyType=HASH \
--provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 \
--stream-specification StreamEnabled=true,StreamViewType=NEW_AND_OLD_IMAGES",
         "runsOn" : {"ref": "instance"}
     },
     {
         "id": "Default",
         "scheduleType": "ondemand",
         "failureAndRerunMode": "CASCADE",
         "name": "Default",
         "role": "DataPipelineDefaultRole",
         "resourceRole": "DataPipelineDefaultRole"
     },
     {
         "id" : "instance",
         "name" : "instance",
         "type" : "Ec2Resource",
         "actionOnTaskFailure" : "terminate",
         "actionOnResourceFailure" : "retryAll",
         "maximumRetries" : "1",
         "instanceType" : "t2.micro",
         "securityGroups" : ["sg-XXXXX"],
         "subnetId":"subnet-YYYYY],
         "associatePublicAddress":"false",
         "role" : "DataPipelineDefaultRole",
         "resourceRole" : "DataPipelineDefaultResourceRole"
     }]
}

Roles are the same from https://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-iam-roles.html

When I activate pipeline, my EC2 is created but my command in the first block is not executed, why ???

Zokulko
  • 211
  • 4
  • 25
  • Are you certain that the EC2 is healthy after creation? Can you try and execute a dummy command like `echo test`? If yes, try running the DynamoDB command with the `--debug` and see if there's anything in logs. – Rafet Aug 31 '23 at 15:06
  • `echo test` returns me `echo`. I've run the `create-table` inside my ec2 instance and getting hundreds one lines debugging... – Zokulko Aug 31 '23 at 19:55

0 Answers0