Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Services which are explicitly configured to be placed in private subnets are deployed in public subnets. #5807

Closed
oakhan3 opened this issue May 6, 2024 · 4 comments
Labels
guidance Issue requesting guidance or information about usage stale

Comments

@oakhan3
Copy link

oakhan3 commented May 6, 2024

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

@oakhan3 oakhan3 added the type/bug Issues that are bugs. label May 6, 2024
@oakhan3
Copy link
Author

oakhan3 commented May 6, 2024

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.

@iamhopaul123
Copy link
Contributor

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'

@dannyrandall dannyrandall added guidance Issue requesting guidance or information about usage and removed type/bug Issues that are bugs. labels May 21, 2024
Copy link

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.

@github-actions github-actions bot added the stale label Jul 21, 2024
Copy link

github-actions bot commented Aug 5, 2024

This issue is closed due to inactivity. Feel free to reopen the issue if you have any further questions!

@github-actions github-actions bot closed this as completed Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
guidance Issue requesting guidance or information about usage stale
Projects
None yet
Development

No branches or pull requests

3 participants