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 ???
This is very likely caused by the fact you're using Datapipeline deprecated roles:
https://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-iam-roles.html
I would also question your need to use DataPipeline at all anymore, there are much better services which can achieve the same goals more efficiently, such as AWS Glue.