Repositório para a Live Coding do dia 22/12/2021 sobre AWS Step Functions

Overview

DIO Live Step Functions - 22/12/2021

Serviços AWS utilizados

  • AWS Step Functions
  • AWS Lambda
  • Amazon S3
  • Amazon Rekognition
  • Amazon DynamoDB
  • Amazon Cloudwatch
  • Amazon Cloudtrail

Requisitos

  • Conta ativa na AWS

Roteiro de desenvolvimento

  • Criar uma tabela no Amazon DynamoDB
  • Criar duas funções AWS Lambda
  • Criar um bucket no Amazon S3
  • Criar uma máquina de estado no AWS Step Functions
  • Configurar uma trail no AWS Cloudtrail
  • Criar uma regra de evento no AWS Cloudwatch
  • Testar

Passos do desenvolvimento

Criar bucket no Amazon S3

  • S3 Console -> Create bucket -> Bucket name [seu_bucket] -> Create bucket

Criar tabela no Amazon DynamoDB

  • DynamoDB Console -> Create table - > Table name [nome_da_sua_tabela] -> Partition key [filename] -> Create table

Criar funções lambda

Função de extração de metadados do arquivo no Amazon S3

  • Lambda Console -> Create function -> Author from scratch -> Function name [extract-metadata-function] -> Runtime [Python3.8] -> Role [Create new role with basic Lambda permissions] -> Create function
  • Inserir o código no editor de código -> Deploy

Função para chamada da API do Amazon Rekognition

  • Lambda Console -> Create function -> Author from scratch -> Function name [rekognition-api-function] -> Runtime [Python3.8] -> Role [Create new role with basic Lambda permissions] -> Create function
  • Inserir o código no editor de código -> Deploy

Configurar políticas de acesso

  • Selecionar a função criada -> Configuration -> Permissions -> Execution role

  • Adicionar as seguintes Policies

    • CloudWatchFullAccess
    • AmazonRekognitionFullAccess
    • AmazonS3FullAccess
    • AmazonDynamoDBFullAccess
    • AWSCloudTrail_FullAccess

Criar máquina de estado no AWS Step Functions

  • Step Functions Console -> State machines -> Create state machine -> Write your workflow in code -> Standard -> Inserir o código no editor -> Next
  • Name [nome_da_sua_state_machine] -> Execution role [Create_new_role] -> Create state machine

Configurar o CloudTrail

  • CloudTrail Console -> Trails -> Trail name [nome_da_trail] -> Storage location [Create new S3 bucket] -> Next
  • Events -> Event type -> Data events -> Switch to basic event selectors -> Individual bucket selection [read, write] -> Choose bucket -> Next
  • Create trail

Configurar regra de evento no CloudWatch

  • CloudWatch Console -> Rules -> Create Rule -> Event Pattern -> Service Name [Simple Storage Service] -> Event Type [Object Level Operations] -> Specific Operations [PutObject] -> Specific bucket by name [bucket_criado]
  • Targets -> Add target -> Step Functions state machine -> State machine [sua_state_machine] -> Create a new role for this specific resource
  • Configure details -> Name [nome_da_rule]
You might also like...
Uma API pública contendo informações sobre o unvierso de Roberto Gomez Bolaños.

Chespirito API Objetivo Esta API tem como objetivo ser um ponto de referência para a procura sobre todo o universo do grande Roberto Gomez Bolaños, ta

Desafio de projeto sobre Git/Github

Maçã ou Laranja? 🤔 Desafio Projeto Dio para Git/Github 🔶 Para esse primeiro repositório, decidir adicionar o primeiro algoritmo de inteligência arti

Bot para automatizacao de registros no Vacivida para o COVID19
Bot para automatizacao de registros no Vacivida para o COVID19

VACIBOT v.06 - Bot para automatizacao de registros no Vacivida para o COVID19 by Victor Fragoso - Prefeitura Municipal de Santo André Email: vfragoso@

Um bot para contar quantas vezes o meu amigo troca de pfp/nick/tag essas coisas ae pq aquele mlk n para quieto

EkiBot Um bot que tem apenas as suas funções de audit log com as PFP's (avatares) dos usuários Pode ser usado para um usuário em específico, ou até me

Automatically compile an AWS Service Control Policy that ONLY allows AWS services that are compliant with your preferred compliance frameworks.
Automatically compile an AWS Service Control Policy that ONLY allows AWS services that are compliant with your preferred compliance frameworks.

aws-allowlister Automatically compile an AWS Service Control Policy that ONLY allows AWS services that are compliant with your preferred compliance fr

SSH-Restricted deploys an SSH compliance rule (AWS Config) with auto-remediation via AWS Lambda if SSH access is public.
SSH-Restricted deploys an SSH compliance rule (AWS Config) with auto-remediation via AWS Lambda if SSH access is public.

SSH-Restricted SSH-Restricted deploys an SSH compliance rule with auto-remediation via AWS Lambda if SSH access is public. SSH-Auto-Restricted checks

AWS Auto Inventory allows you to quickly and easily generate inventory reports of your AWS resources.
AWS Auto Inventory allows you to quickly and easily generate inventory reports of your AWS resources.

Photo by Denny Müller on Unsplash AWS Automated Inventory ( aws-auto-inventory ) Automates creation of detailed inventories from AWS resources. Table

aws-lambda-scheduler lets you call any existing AWS Lambda Function you have in a future time.

aws-lambda-scheduler aws-lambda-scheduler lets you call any existing AWS Lambda Function you have in the future. This functionality is achieved by dyn

Project template for using aws-cdk, Chalice and React in concert, including RDS Postgresql and AWS Cognito

What is This? This repository is an opinonated project template for using aws-cdk, Chalice and React in concert. Where aws-cdk and Chalice are in Pyth

Owner
Cassiano Ricardo de Oliveira Peres
NodeJs, blockchain and cloud developer. Cryptocurrency enthusiastic.
Cassiano Ricardo de Oliveira Peres
DIAL(Did I Alert Lambda?) is a centralised security misconfiguration detection framework which completely runs on AWS Managed services like AWS API Gateway, AWS Event Bridge & AWS Lambda

DIAL(Did I Alert Lambda?) is a centralised security misconfiguration detection framework which completely runs on AWS Managed services like AWS API Gateway, AWS Event Bridge & AWS Lambda

CRED 71 Dec 29, 2022
Live Coding - Mensageria na AWS com Amazon SNS e Amazon SQS

Live Coding - Mensageria na AWS com Amazon SNS e Amazon SQS Repositório para o Live Coding do dia 08/12/2021 Serviços utilizados Amazon SNS Amazon SQS

Cassiano Ricardo de Oliveira Peres 3 Mar 1, 2022
Step by Step Guide To Install Discord Py Master Branch on Replit

Guide to Install Discord Py Master Branch on Replit Step 1 Create an empty repl on replit Step 2 Add this Basic Code to the file main.py so as to chec

Pranav Saxena 7 Nov 18, 2022
Criando Lambda Functions para Ingerir Dados de APIs com AWS CDK

LIVE001 - AWS Lambda para Ingerir Dados de APIs Fazer o deploy de uma função lambda com infraestrutura como código Lambda vai numa API externa e extra

Andre Sionek 12 Nov 20, 2022
Implement backup and recovery with AWS Backup across your AWS Organizations using a CI/CD pipeline (AWS CodePipeline).

Backup and Recovery with AWS Backup This repository provides you with a management and deployment solution for implementing Backup and Recovery with A

AWS Samples 8 Nov 22, 2022
Repositório para meu Discord Bot pessoal

BassetinhoBot Escrevi o código usando o Python 3.8.3 e até agora não tive problemas rodando nas versões mais recentes. Repositório para o Discord Bot

Vinícius Bassete 1 Jan 4, 2022
WikiChecker - Repositorio oficial del complemento WikiChecker para NVDA.

WikiChecker Buscador rápido de artículos en Wikipedia. Introducción. El complemento WikiChecker para NVDA permite a los usuarios consultar de forma rá

null 2 Jan 10, 2022
A suite of utilities for AWS Lambda Functions that makes tracing with AWS X-Ray, structured logging and creating custom metrics asynchronously easier

A suite of utilities for AWS Lambda Functions that makes tracing with AWS X-Ray, structured logging and creating custom metrics asynchronously easier

Amazon Web Services - Labs 1.9k Jan 7, 2023
BiliBili-live-barrage-transceiver - A simple python program for sending and receiving barrage in bilibili live room

BiliBili-live-barrage-transceiver - A simple python program for sending and receiving barrage in bilibili live room

zeroy 2 Jan 18, 2022