Posts

Showing posts from April, 2022

AWS-Command

Configure aws credential aws configure Get I am user: aws iam get-user Create a bucket: aws s3 mb s3://bucketname Get a java function: sam init --location gh:symphoniacloud/sam-init-HelloWorldLambdaJava sam init --location gh:symphoniacloud/sam-init-HelloWorldLambdaJava-zip Deploy in AWS Lambda: sam deploy --s3-bucket $CF_BUCKET --stack-name HelloWorldLambdaJava --capabilities CAPABILITY_IAM Inovke lambda function aws lambda invoke --invocation-type RequestResponse --function-name HelloWorldJava --payload \"world\" outputfile.txt Invoke lambda function with invocation type aws lambda invoke --invocation-type Event --function-name HelloWorldJava --payload \"world\" outputfile.txt Delete the lambda: aws cloudformation delete-stack --stack-name HelloWorldLambda View the cloudformation of particular stack: aws cloudformation list-stack-resources --stack-name chapter4-sam View the format of input or output in aws services(in this case s3): sam local generate-event s3 del