We initially created a Request Driven Backend service without secrets that was successfully deployed, both manually and via a pipeline.
We then started adding secrets to SSM Parameter store using copilot secret init --cli-input-yaml. I successfully was able to inject these into the pipeline and a scheduled job. When attempting to deploy the backend service, I receive the following error:
✘ Proposing infrastructure changes for stack drakula-staging-backend
✘ execute deployment 1 of 1 in group 1: deploy service backend to environment staging: deploy service: check if changeset is empty: create
change set copilot-fd308a18-2202-4477-bad3-507021bf4c25 for stack drakula-staging-backend: ValidationError: Template format error: YAML not
well-formed. (line 215, column 13)
status code: 400, request id: 10e7a64f-683f-4baa-a4bb-8e7f89b6e75d: describe change set copilot-fd308a18-2202-4477-bad3-507021bf4c2
5 for stack drakula-staging-backend: ChangeSetNotFound: ChangeSet [copilot-fd308a18-2202-4477-bad3-507021bf4c25] does not exist
status code: 404, request id: e2729cbf-dfa4-42fd-97dd-32c61b54a38c
This is my manifest:
# The manifest for the "backend" service.
# Read the full specification for the "Request-Driven Web Service" type at:
# https://aws.github.io/copilot-cli/docs/manifest/rd-web-service/
# Your service name will be used in naming your resources like log groups, App Runner services, etc.
name: backend
# The "architecture" of the service you're running.
type: Request-Driven Web Service
image:
# Docker build arguments.
# For additional overrides: https://aws.github.io/copilot-cli/docs/manifest/rd-web-service/#image-build
build: Dockerfile
# Port exposed through your container to route traffic to it.
port: 8151
# http:
# healthcheck:
# path: /
# healthy_threshold: 3
# unhealthy_threshold: 5
# interval: 10s
# timeout: 5s
# Number of CPU units for the task.
cpu: 1024
# Amount of memory in MiB used by the task.
memory: 2048
# Connect your App Runner service to your environment's VPC.
#
network:
vpc:
placement: private
# Enable tracing for the service.
# observability:
# tracing: awsxray
# Optional fields for more advanced use-cases.
#
# variables: # Pass environment variables as key value pairs.
# LOG_LEVEL: info
#
# tags: # Pass tags as key value pairs.
# project: project-name
secrets:
NFT_STORAGE_API_KEY: NFT_STORAGE_API_KEY
BUNNY_STREAM_API_KEY: BUNNY_STREAM_API_KEY
BUNNY_STORAGE_ZONE_PASSWORD: BUNNY_STORAGE_ZONE_PASSWORD
SENTRY_AUTH_TOKEN: SENTRY_AUTH_TOKEN
PRIVY_APP_SECRET: PRIVY_APP_SECRET
I have also tried using the arn, the ${COPILOT_APPLICATION_NAME} substitution, the full name with no interpolated values, wrapping in single quotes, and wrapping in double quotes. Removing the secrets section deploys fine.
We initially created a Request Driven Backend service without secrets that was successfully deployed, both manually and via a pipeline.
We then started adding secrets to SSM Parameter store using
copilot secret init --cli-input-yaml. I successfully was able to inject these into the pipeline and a scheduled job. When attempting to deploy the backend service, I receive the following error:This is my manifest:
I have also tried using the
arn, the${COPILOT_APPLICATION_NAME}substitution, the full name with no interpolated values, wrapping in single quotes, and wrapping in double quotes. Removing thesecretssection deploys fine.