Q: AWS Lambda testing from console throws missing access token I have created a aws lambda function to read an object from bucket 1 and upload the object to bucket 2.
I have set trigger in bucket 1 to the lambda function for any object created.
The role associated to lambda execution has the following access

the code of my lambda funtion is 
@Override
public String handleRequest(S3Event input, Context context) {
    try {
        context.getLogger().log("Input: " + input);
        System.out.println("started!");
        InputStream objectData = null;
        String s = "";

        AWSCredentials credentials = new BasicAWSCredentials("abc","efg");
        AmazonS3Client s3Client = new AmazonS3Client(credentials);


        for (S3EventNotificationRecord record : input.getRecords()) {
            String s3Key = record.getS3().getObject().getKey();


            String s3Bucket = record.getS3().getBucket().getName();
            context.getLogger().log("found id: " + s3Bucket + " " + s3Key);

            // retrieve s3 object added
            S3Object object = s3Client.getObject(new GetObjectRequest(
                    s3Bucket, s3Key));
            objectData = object.getObjectContent();

            context.getLogger().log(objectData.toString());


            TransferManager transferManager = new TransferManager(s3Client);
            ObjectMetadata s3ObjectMetadata = new ObjectMetadata();
            s3ObjectMetadata.setContentLength(object.getObjectMetadata().getContentLength());
            s3ObjectMetadata.setContentType(object.getObjectMetadata()
                    .getContentType());
            transferManager.upload("bucket2", s3Key, objectData,
                    s3ObjectMetadata);
        }
        return objectData.toString();

when i try to execute the lambda fucntion from aws console, it throws up missing access token error. The lambda is uploaded to bucket1. Please help me with what am missing in the config/code.
