aws lambda create-function --function-name CliTestFun --runtime java8 --region ap-south-1 --role arn:aws:iam::XXXXXXXXXXXXX:role/aws-lambda-basic-execution-role --handler com.example.demo.Search::handleRequest --zip fileb:///home/workspace/example/target/testfunction-1.0.0.jar
from the above command, I am able to create the function but the problem is after I run this command I checked it in aws console, So there are so many unnecessary resources like iot,ec2,s3... added to it but I wanted to add specific resources only required to that lambda ,how can I ignore those resources when I try to create it from aws CLI.
Is it any configuration related problem or something?