AppSec & Pentest
CloudSec
CloudSec
  • Sandboxes, Containers, Virtualization
    • Какие бывают
    • Kubernetes
      • About
      • Tools
        • kubectl
        • minikube
        • helm
        • tiller
        • Others
      • Components
      • Concepts
      • Security
      • Learning
      • Conferences & Events
    • Container Runtime Interface (CRI)
      • containerd
      • CRI-0
      • Podman
      • Colima
      • Docker
        • About
        • CLI
        • Dockerfile
        • docker compose
        • Registry
        • Testcontainers
        • [Def] Security
        • [Off] Security
    • Red Hat OpenShift Container Platform (OCP)
      • About
      • OCP Components
        • Platform services
        • Application services
        • Developer services
        • OpenShift Kubernetes Engine
      • Security
        • Container Security
        • Podman
        • Kubernetes Security
        • Securing Platform Services
        • Vulnerabilities
        • CIS
    • VMWare
      • Workspace ONE Access
      • Workspace One UEM SSRF (AirWatch)
      • vSphere
      • vCenter
      • Learn
      • Horizon Security Server
      • VMWare log4j
    • Tools
      • Build container image inside containers
      • Moby
      • Security
  • Cloud
    • Google Cloud Platform (GCP)
      • GCP Components
      • GCP CLI
      • Security
        • Get access to GCP via service-account [json]
        • PrivEsc
        • Papers
      • Courses & Certifications
    • Azure
      • Azure Start
      • Azure CLI
      • Компоненты и механизмы
        • Azure Storage BLOB
        • Подписанные URL (SAS)
      • Papers and Resources
      • Azure Security Center
      • Tools
    • AWS
      • AWS Intro
      • AWS Basics
      • AWS Components
        • Computing
        • Storage
        • Messaging
        • Serverless
        • Business Productivity
        • Network and Content Delivery
        • Mobile
        • Databases
      • AWS Testing
      • Basic Work: Examples
        • AWS Cli
        • AWS SES
        • S3 Bucket
      • Security
        • Enumeration
        • AWS Lambda
        • Разные примеры
        • Learn Materials
      • Books & Papers
      • Courses & Certifications
    • Yandex Cloud
      • YC CLI
      • YC API
      • Cloud Organization
      • VM
        • Cloud Computing
        • Virtual Private Cloud (VPC)
        • Network Load Balancer
      • Data Platform
        • Definitions
        • Как выбрать БД
        • Реляционные БД
        • Нереляционные БД
        • Object Storage and S3
      • Yandex k8s
      • Serverless
      • Security
      • Billing
    • Another platforms
    • OpenStack
    • Tools
      • Tool list
      • Packer
      • Terraform
        • Intro
        • Getting started
        • Configuration
          • Basic
            • Terraform Block
            • Providers
            • Resources
            • Variables
            • Outputs
            • Functions
          • Modules
        • Security
        • Papers
    • Papers
Powered by GitBook
On this page
  • Cloud Functions (CF)
  • Usage
  • Нюансы
  • Триггеры
  • API Gateway
  • Serverless YDB
  • Yandex Message Queue (YMQ)

Was this helpful?

  1. Cloud
  2. Yandex Cloud

Serverless

Все это можно настраивать через AWS CLI, YC CLI/Console, или через Terraform.

  • Yandex Cloud Functions (CF)

  • API Gateway

  • Serverless YDB

  • Yandex Message Queue

Cloud Functions (CF)

Function-As-A-Service

Usage

Создать CF:

$ yc serverless function create --name my-first-function 

done (1s)
id: d4eor1nq6c7natelf0dl
...
http_invoke_url: https://functions.yandexcloud.net/d4eor1nq6c7natelf0dl
...

Загрузить код функции в облако и создать ее версию:

$ yc serverless function version create \
   --function-name my-first-function \
   --memory 256m \
   --execution-timeout 5s \
    --runtime python37 \
    --entrypoint main.handler \
    --service-account-id $SERVICE_ACCOUNT_ID \
    --source-path main.py 

Вызов функции:

$ yc serverless function list
$ yc serverless function version list --function-name my-first-function 
$ yc serverless function invoke <идентификатор_функции> 

Сделать функцию публичной:

$ yc serverless function allow-unauthenticated-invoke my-first-function

Получить публичную ссылку на функцию

$ yc serverless function get my-first-function 

Нюансы

Триггеры

Можно вызывать функцию при наступлении какого-то события. Причем и при наступлении событий в других сервисах. Примерно это выглядит так:

API Gateway

Прокси сервер

Serverless YDB

Отличие от обычной YDB, что здесь поддерживается Document API (совместимое с AWS Dinamo DB)

В общем, есть AWS SDK для работы с Document API, и обычное SDK для работы с YDB.

Yandex Message Queue (YMQ)

Примерно это так выглядит

YMQ поддерживает AWS API и другие подходы, которые используют в сервисе Amazon SQS, поэтому для работы с ними вы можете использовать уже существующие инструменты, например библиотеки boto3 для Python.

PreviousYandex k8sNextSecurity

Last updated 2 years ago

Was this helpful?

Каждая функция должна соответствовать .

модели программирования