Last active
May 29, 2022 01:57
-
-
Save Francisco-Castillo/af2455180d08c5b5d96a15d2153fa82a to your computer and use it in GitHub Desktop.
Crear bucket s3 y funcion lambda desde AWS CLI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws --endpoint-url=http://localhost:4566 secretsmanager create-secret --name testSecret --secret-string 'secret' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws s3 mb s3://nombre_bucket --profile default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws lambda create-function \ | |
--function-name lambda-test \ | |
--runtime java8 \ | |
--role arn:aws:iam::<account_id>:role/lambda_iam_role_test \ | |
--handler paquete.ClasePrincipal::handleRequest \ | |
--code S3Bucket=nombre_bucket,S3Key=nombre_archivo.jar \ | |
--timeout 15 \ | |
--memory-size 512 \ | |
--profile default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws iam create-policy \ | |
--policy-name lambda_iam_policy_test \ | |
--policy-document file://ubicacion_archivo.txt \ | |
--profile default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws iam create-role \ | |
--role-name lambda_iam_role_test \ | |
--assume-role-policy-document file://ubicacion_de_archivo.txt \ | |
--profile default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws --endpoint http://localhost:4566 secretsmanager \ | |
get-secret-value \ | |
--secret-id nombreSecreto |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws s3 cp target/archivo_java.jar s3://nombre_bucket/nuevo_nombre_archivo.jar --profile default |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment