[Bug]: Services which are explicitly configured to be placed in private subnets are deployed in public subnets.
Description:
I have created a worker service with following configuration:
name: ...
type: Worker Service
network:
vpc:
placement: 'private'
image:
build: ../Dockerfile
healthcheck:
command: [ "CMD-SHELL", "python run.py || exit 1" ]
interval: 60s
retries: 2
timeout: 30s
cpu: 256 # Number of CPU units for the task.
memory: 512 # Amount of memory in MiB used by the task.
platform: linux/x86_64 # See https://aws.github.io/copilot-cli/docs/manifest/worker-service/#platform
exec: true # Enable running commands in your container.
Details:
copilot version: v1.33.2
host os: mac OS Ventura Version 13.5.2
aws regions include us-east-1 and us-east-2
Observed result:
It seems like the configuration for placement is ignored - the service/tasks are placed in a public subnet with public IPs.
Expected result:
I would expect the service/tasks to be deployed in the private subnets associated with the env and without any public IP.
Thank you
Note that the VPC i'm using was not copilot generated but I do explicitly supply 2 public and 2 private subnets from the VPC in the env config.
Hello @oakhan3. There's a missing space before vpc and vpc.placement in your manifest. Can you check if it works if you fix the manifest?
network:
vpc:
placement: 'private'
This issue is stale because it has been open 60 days with no response activity. Remove the stale label, add a comment, or this will be closed in 14 days.
This issue is closed due to inactivity. Feel free to reopen the issue if you have any further questions!