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

Unmarshal error on copilot deploy in a fresh project #2823

Closed
rorybyrne opened this issue Sep 13, 2021 · 3 comments
Closed

Unmarshal error on copilot deploy in a fresh project #2823

rorybyrne opened this issue Sep 13, 2021 · 3 comments

Comments

@rorybyrne
Copy link

Hi, here's a screenshot of the steps taken to reproduce the error:

image

And here's the manifest:

# The manifest for the "api" service.
# Read the full specification for the "Load Balanced Web Service" type at:
#  https://aws.github.io/copilot-cli/docs/manifest/lb-web-service/

# Your service name will be used in naming your resources like log groups, ECS services, etc.
name: api
type: Load Balanced Web Service

# Distribute traffic to your service.
http:
  path: '/'
  healthcheck: '/health'
  alias: api.letsmatchmums.com

# Configuration for your containers and service.
image:
  # Docker build arguments. For additional overrides: https://aws.github.io/copilot-cli/docs/manifest/lb-web-service/#image-build
  build: Dockerfile
  # Port exposed through your container to route traffic to it.
  port: 80

cpu: 256       # Number of CPU units for the task.
memory: 512    # Amount of memory in MiB used by the task.
count: 1       # Number of tasks that should be running in your service.
exec: true     # Enable running commands in your container.

variables:
  LETSHELP_DB_URL = "xxx"
  LETSHELP_API_KEY = "xxx"
  LETSHELP_TYPEFORM_SECRET = "xxx"
  LETSHELP_MAILCHIMP_SERVER = "xxx"
  LETSHELP_MAILCHIMP_API_KEY = "xxx"
  LETSHELP_MAILCHIMP_AUDIENCE_ID = "xxx"
  LETSHELP_MAILCHIMP_TAG_NEW_MEMBER = "xxx"
  LETSHELP_MAILCHIMP_TAG_MATCH_FOUND = "xxx"

#secrets:                      # Pass secrets from AWS Systems Manager (SSM) Parameter Store.
#  GITHUB_TOKEN: GITHUB_TOKEN  # The key is the name of the environment variable, the value is the name of the SSM parameter.

# You can override any of the values defined above by environment.
#environments:
#  test:
#    count: 2               # Number of tasks to run for the "test" environment.
@rorybyrne
Copy link
Author

rorybyrne commented Sep 13, 2021

Perhaps it's the quoted environment variables - checking that now.

Edit: Nope, that didn't fix it.

@rorybyrne
Copy link
Author

Oh of course, it was the = in the environment variables definitions. You should consider adding a failsafe check for invalid YAML and a useful error message to help stupid people like me! :)

@iamhopaul123
Copy link
Contributor

Hi @synek! I am glad you got it working 😄

Funny enough we are currently working on improving our manifest validation here: #2818. Where we're validating statically if fields have valid values.

Hopefully, it'll go out next release!

I'll close the issue now, but feel free to re-open it if you have any other questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants