Can not create a stepfunction with create-state-machine command in docker-compose

0

Hi, I am trying to create a step function in local using step-function-local docker images and ones the step function is created, I am using aws-cli docker image to create state machine, but I would like the aws-cli container to be alive so that I can do testing in my local environment, I tried setting tty option to true but that doesn't work. please help with achieving this, here is my docker-compose file.

version: "3.9"
services:
  dynamo-db:
    image: "amazon/dynamodb-local"
    ports:
      - "8000:8000"

  step-function:
    image: "amazon/aws-stepfunctions-local"
    environment:
      - AWS_ACCESS_KEY_ID=<access-key>
      - AWS_SECRET_ACCESS_KEY=<secret-key>
    ports:
      - "8083:8083"
  state-machine:
    image: amazon/aws-cli:latest
    stdin_open: true # equivalent of -i
    tty: true        # equivalent of -t
    network_mode: host
    #entrypoint: tail -F anything
    depends_on:
      - step-function
    deploy:
      mode: replicated
      replicas: 1
      resources:
        limits:
          cpus: "2"
          memory: 2048M
      restart_policy:
        condition: on-failure
        delay: 5s
        max_attempts: 3
        window: 120s
    env_file:
      - aws-stepfunctions-local-credentials.txt
    volumes:
      - ./config:/config
    command: stepfunctions --endpoint http://localhost:8083 create-state-machine --definition file:///config/<file-name> --name test --role-arn "arn:aws:iam::123456789012:role/HelloWorldFunctionRole"

gefragt vor 2 Jahren702 Aufrufe
1 Antwort
0

Hello,

As docker isn’t an AWS service I may not be able to help debug the docker file itself, however I did find our documentation on setting up step function local with docker and how to test this:

I’d recommend taking a peek at our documentation and seeing if you can scaffold a solution from within it. It can be hard to determine what is occurring since we have three items in play:

  • Your local machines setup
  • Docker
  • Step Function Local
AWS
SUPPORT-TECHNIKER
Tim_P
beantwortet vor 2 Jahren

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