I am attempting to connect to a s3 bucket for uplo...
# ask-questions
b
I am attempting to connect to a s3 bucket for uploads:
Copy code
ecs_container_growthbook_definitions = jsonencode([
    {
      name      = "pyxis-prod-orion-growthbook"
      image     = "<http://664114364032.dkr.ecr.us-east-1.amazonaws.com/pyxis-prod-orion-growthbook:latest|664114364032.dkr.ecr.us-east-1.amazonaws.com/pyxis-prod-orion-growthbook:latest>"
      essential = true
      command = [
        "sh",
        "-c",
        "wget -P packages/back-end <https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem> && yarn start"
      ]
      portMappings = [
        {
          containerPort = 3000
        },
        {
          containerPort = 3100
        }
      ]
      secrets = [
        {
          name      = "MONGODB_URI"
          valueFrom = "arn:aws:secretsmanager:us-east-1:664114364032:secret:MONGODB_URI-BKgfev"
        },
        {
          name      = "JWT_SECRET"
          valueFrom = "arn:aws:secretsmanager:us-east-1:664114364032:secret:growthbook_secrets-auJI7q"
        },
        {
          name      = "ENCRYPTION_KEY"
          valueFrom = "arn:aws:secretsmanager:us-east-1:664114364032:secret:growthbook_secrets-auJI7q"
        }
      ]
      environment = [
        {
          name  = "APP_ORIGIN"
          value = "<https://growthbook.664114364032.aws.bain.dev>"
        },
        {
          name  = "API_HOST"
          value = "<https://growthbook.664114364032.aws.bain.dev:3100>"
        },
        {
          name  = "CORS_ORIGIN_REGEX"
          value = "<https://growthbook.664114364032.aws.bain.dev>*"
        },
        {
          name  = "NODE_ENV"
          value = "production"
        },
        {
          name   = "S3_BUCKET"
          value  = "pyxis-prod-orion-growthbook"
        }
      ]
      logConfiguration = {
        logDriver = "awslogs"
        options = {
          "awslogs-group"         = "pyxis-prod-orion-ecs-logging-gb"
          "awslogs-region"        = "us-east-1"
          "awslogs-stream-prefix" = "ecs"
        }
      }
    }
  ])
f
@future-teacher-7046 do you have an example?
b
I have my terraform code
Is that what you are referring to?
this is the error I am getting:
503 Service Temporarily Unavailable
f
oh
b
yeah, I gave you alot of info
sorry
f
np
so for starters, hitting the API url directly should give you a json object
I get a 503 - which is likely throwing something to your container logs
b
yeah, I can see that on local
the logs aren't really showing anything
And, I can't exec into ecs fargate
If am I using s3, do I need this env variable? volumes: - uploads:/usr/local/src/app/packages/back-end/uploads
w
If am I using s3, do I need this env variable?
volumes:
- uploads:/usr/local/src/app/packages/back-end/uploads
No you don't.