Deployment template aws
aws:app-runner@1
Table of Inputs:
Variable | Required/Optional | Description |
---|---|---|
region | Required | Region name for the cluster. |
ecr_role | Required | Role to pull image from private ECR. |
instance_role | Optional | Role to be used by App Runner to interact with other AWS services. |
memory | Optional | Memory to be consumed by App Runner. |
cpu | Optional | CPU to be consumed by App Runner. |
vpc_connector_arn | Optional | ARN for a connector to a specific VPC. |
is_public | Optional | Should this service be exposed to public network. |
port | Required | Container port. |
The deployment template itself is a configuration file for AWS App Runner. It specifies various parameters and settings for deploying an application using App Runner. Here's a summary of what is happening in the deployment template:
- The template defines metadata such as the provisioner, name, version, author, and description.
- It specifies the input artifacts and their properties required for the deployment.
- The template includes a script for creating a JSON configuration file for source and instance configurations.
- It sets some variables and generates a service name based on the provided inputs.
- The template has different phases: install and build.
- In the install phase, the AWS region is configured.
- In the build phase, there is a conditional statement based on the job type (deploy or undeploy).
- If the job type is "deploy," the script performs the following actions:
- It creates an
env.json
file that contains runtime environment variables based on the provided pipeline environment file. - It deletes any existing secrets related to the service.
- It creates a
env_secrets.json
file that contains secrets retrieved from the pipeline secret file. The secrets are stored in AWS Secrets Manager, and the ARNs are added to the JSON file. - It generates a JSON configuration file named
app.json
based on the provided inputs, including the repository, tag, port, and environment variables/secrets. - It generates an
instance.json
file for instance configuration, including CPU and memory specifications. - It generates a
network.json
file for network configuration, including ingress/egress settings. - It checks if the service already exists and either creates or updates the service accordingly using AWS App Runner.
- The service URL is captured and added as an output.
- It creates an
- If the job type is not "deploy," it deletes the App Runner service based on the service name.
Overall, the deployment template is used to deploy an application using AWS App Runner, and it handles environment variables, secrets, instance configuration, network configuration, and service creation/update based on the specified inputs.
aws:basic-eks-regional@1
Table of Inputs:
Variable | Description |
---|---|
ports | An array of objects describing the ports used in services. |
ingress | An array of objects describing the ingress details. |
cluster | The name of the cluster in which the deployment will happen. |
region | The region name for the cluster. |
roleArn | The role for deployment in EKS. |
app_env | Application-related environments (object). |
files | Files mounted in the container (object). |
repository | Container repository URL without tag. |
tag | Container tag. |
applicationName | Application name. |
environment | Environment name. |
project | Project name. |
customer_bucket | Customer bucket name. |
job_type | Job type (deploy or undeploy application). |
deployment_timeout | Time to wait for pods to be ready before terminating deployment as unsuccessful. |
Summary:
The provided YAML script describes an EKS (Elastic Kubernetes Service) deployment configuration. It includes inputs and a deployment template written in bash script. The deployment template utilizes Helm for managing Kubernetes resources. The script performs actions such as installing Helm, configuring the Kubernetes context, retrieving input values, generating a Helm values.yaml file, deploying the application, and retrieving the service URL.
aws:lambda-gateway-code@1
Variable | Required/Optional | Comments |
---|---|---|
region | Required | Region name for lambda deployment. |
app_env | Optional | Application environment variables. |
memory | Optional | Memory in MB, default 1024MB. |
timeout | Optional | Timeout in seconds, default 10 seconds. |
applicationName | Optional | A Code Pipes application name. |
environment | Optional | A Code Pipes environment name. |
architecture | Optional | Processor architecture x86_64 or arm64, default x86_64. |
bucket | Required | S3 bucket to hold serverless state file. |
runtime | Required | Application runtime. |
repo_dir | Optional | Repo Dir. |
funcs | Required | Function configuration. |
job_type | Optional | This is to deploy or undeploy application. |
This deployment template is designed to provision AWS Lambda functions with API Gateway using the Serverless framework. It utilizes the AWS provisioner and includes configurations for various deployment parameters. The template allows for deploying or undeploying applications based on the specified job type.
The template includes the following main sections:
-
Meta Information: Contains details such as the provisioner, version, revision, display name, description, target, keywords, and author of the template.
-
Inputs: Defines the input variables required for the deployment. These include the region name, application environment variables, memory size, timeout, application name, environment name, processor architecture, S3 bucket for storing state, runtime, repository directory, function configurations, and job type.
-
Template: This section contains the actual deployment template written using the Jinja2 templating language. It starts with some variable assignments and configurations. Then it defines the phases of the deployment, including installation and build. The build phase generates a
serverless.yml
file based on the input variables and deploys the Lambda functions using the Serverless framework. The actual deployment or undeployment commands are executed based on the job type specified.
The deployment template allows for customization and automation of the deployment process for AWS Lambda functions with API Gateway.
Updated over 1 year ago